Browse Source

nios2: fix glibc bootup

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Waldemar Brodkorb 2 years ago
parent
commit
d7daffed36
1 changed files with 6 additions and 0 deletions
  1. 6 0
      toolchain/glibc/Makefile

+ 6 - 0
toolchain/glibc/Makefile

@@ -6,6 +6,12 @@ include ../rules.mk
 include Makefile.inc
 include ${ADK_TOPDIR}/mk/buildhlp.mk
 
+# glibc does not boot with Os and CPU specific FLAGS for nios2
+ifeq ($(ADK_TARGET_ARCH_NIOS2),y)
+TARGET_CFLAGS:=		-O2
+TARGET_CXXFLAGS:=	-O2
+endif
+
 # glibc does not compile with NEON suggested CFLAGS/CXXFLAGS
 TARGET_CFLAGS:=		$(filter-out -ffast-math,$(TARGET_CFLAGS))
 TARGET_CXXFLAGS:=	$(filter-out -ffast-math,$(TARGET_CXXFLAGS))