summaryrefslogtreecommitdiff
path: root/toolchain/glibc/Makefile
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@uclibc-ng.org>2015-12-08 07:29:55 +0100
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2015-12-08 07:29:55 +0100
commit17f20eabcab0e7e6f07d12e35e777f8b9abcda23 (patch)
tree73c6508f8be950fa33e1ef616b719f7351071589 /toolchain/glibc/Makefile
parent9a79ea17c1a43534d14ccba203b6d6531ba6fbf8 (diff)
glibc: move env/flags back to Makefile, fix cross-compile on MacOS X
Diffstat (limited to 'toolchain/glibc/Makefile')
-rw-r--r--toolchain/glibc/Makefile49
1 files changed, 43 insertions, 6 deletions
diff --git a/toolchain/glibc/Makefile b/toolchain/glibc/Makefile
index c952a9c12..555ad4e4f 100644
--- a/toolchain/glibc/Makefile
+++ b/toolchain/glibc/Makefile
@@ -3,8 +3,51 @@
include $(ADK_TOPDIR)/rules.mk
include ../rules.mk
+include Makefile.inc
+include ${ADK_TOPDIR}/mk/buildhlp.mk
TARGET_CFLAGS:= $(filter-out -ffast-math,$(TARGET_CFLAGS))
+TARGET_CFLAGS:= $(filter-out -fno-asynchronous-unwind-tables,$(TARGET_CFLAGS))
+TARGET_CFLAGS:= $(filter-out -fstack-protector-all,$(TARGET_CFLAGS))
+TARGET_LDFLAGS:= $(filter-out -fstack-protector-all,$(TARGET_LDFLAGS))
+
+GLIBC_CONFOPTS:= --build=$(GNU_HOST_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --with-headers=$(STAGING_TARGET_DIR)/usr/include \
+ --disable-sanity-checks \
+ --disable-werror \
+ --disable-nls \
+ --disable-werror \
+ --without-cvs \
+ --disable-profile \
+ --disable-debug \
+ --without-gd \
+ --disable-nscd \
+ --with-__thread \
+ --with-tls \
+ --enable-kernel="2.6.32" \
+ --enable-add-ons
+
+ifeq ($(ADK_TARGET_FLOAT),soft)
+GLIBC_CONFOPTS+= --without-fp
+endif
+ifeq ($(ADK_TARGET_FLOAT),hard)
+GLIBC_CONFOPTS+= --with-fp
+endif
+
+GLIBC_ENV:= PATH='${TARGET_PATH}' \
+ CONFIG_SHELL='$(strip ${SHELL})' \
+ BUILD_CC=${CC_FOR_BUILD} \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ CC="${TARGET_CC}" \
+ CXX="${TARGET_CXX}" \
+ AR="${TARGET_AR}" \
+ RANLIB="${TARGET_RANLIB}" \
+ libc_cv_forced_unwind=yes \
+ libc_cv_cc_with_libunwind=yes \
+ libc_cv_c_cleanup=yes \
+ libc_cv_gnu99_inline=yes \
+ libc_cv_initfini_array=yes \
# glibc does not compile with Os
TARGET_CFLAGS:= $(subst Os,O2,$(TARGET_CFLAGS))
@@ -12,9 +55,6 @@ ifneq ($(ADK_DEBUG),)
TARGET_CFLAGS+= -O2
endif
-include Makefile.inc
-include ${ADK_TOPDIR}/mk/buildhlp.mk
-
GLIBC_MAKEOPTS+= cross-compiling=yes
ifeq (${ADK_MAKE_PARALLEL},y)
GLIBC_MAKEOPTS+= PARALLELMFLAGS="-j$(ADK_MAKE_JOBS)"
@@ -47,7 +87,4 @@ $(WRKBUILD)/.installed:
${INSTALL_DATA} ${WRKBUILD}/nss/nsswitch.conf ${STAGING_TARGET_DIR}/etc
touch $@
-$(WRKBUILD)/.final:
- touch $@
-
include ${ADK_TOPDIR}/mk/toolchain.mk