summaryrefslogtreecommitdiff
path: root/toolchain/glibc/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'toolchain/glibc/Makefile')
-rw-r--r--toolchain/glibc/Makefile20
1 files changed, 16 insertions, 4 deletions
diff --git a/toolchain/glibc/Makefile b/toolchain/glibc/Makefile
index 684da9b78..4d87f5789 100644
--- a/toolchain/glibc/Makefile
+++ b/toolchain/glibc/Makefile
@@ -6,25 +6,30 @@ include ../rules.mk
include Makefile.inc
include ${ADK_TOPDIR}/mk/buildhlp.mk
-# glibc does not compile with Os and CPU specific FLAGS for m68k/x86_64
-ifeq ($(ADK_TARGET_ARCH_X86_64)$(ADK_TARGET_ARCH_M68K),y)
+# 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))
GLIBC_CONFOPTS:= --build=$(GNU_HOST_NAME) \
--host=$(GNU_TARGET_NAME) \
--with-headers=$(STAGING_TARGET_DIR)/usr/include \
- --enable-stackguard-randomization \
--disable-sanity-checks \
- --disable-nls \
--disable-werror \
--disable-nscd \
--enable-shared
+ifeq ($(ADK_TARGET_LINUX_ARCH_SPARC64),y)
+GLIBC_CONFOPTS+= --disable-default-pie
+else
+GLIBC_CONFOPTS+= --enable-default-pie
+endif
+
ifeq ($(ADK_TARGET_USE_STATIC_LIBS_ONLY),y)
GLIBC_CONFOPTS+= --enable-static-nss
endif
@@ -40,6 +45,13 @@ GLIBC_ENV:= PATH='${HOST_PATH}:${TARGET_PATH}' \
libc_cv_gnu99_inline=yes \
libc_cv_initfini_array=yes
+ifeq ($(ADK_TARGET_ARCH_RISCV64),y)
+GLIBC_ENV+= libc_cv_slibdir=/lib libc_cv_rtlddir=/lib
+endif
+ifeq ($(ADK_TARGET_ARCH_RISCV32),y)
+GLIBC_ENV+= libc_cv_slibdir=/lib libc_cv_rtlddir=/lib
+endif
+
GLIBC_MAKEOPTS+= cross-compiling=yes
ifeq (${ADK_MAKE_PARALLEL},y)
GLIBC_MAKEOPTS+= PARALLELMFLAGS="-j$(ADK_MAKE_JOBS)"