diff options
author | Waldemar Brodkorb <wbx@uclibc-ng.org> | 2015-12-08 07:29:55 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@uclibc-ng.org> | 2015-12-08 07:29:55 +0100 |
commit | 17f20eabcab0e7e6f07d12e35e777f8b9abcda23 (patch) | |
tree | 73c6508f8be950fa33e1ef616b719f7351071589 /toolchain/glibc | |
parent | 9a79ea17c1a43534d14ccba203b6d6531ba6fbf8 (diff) |
glibc: move env/flags back to Makefile, fix cross-compile on MacOS X
Diffstat (limited to 'toolchain/glibc')
-rw-r--r-- | toolchain/glibc/Makefile | 49 | ||||
-rw-r--r-- | toolchain/glibc/Makefile.inc | 38 | ||||
-rw-r--r-- | toolchain/glibc/patches/2.22/glibc-cross.patch | 17 |
3 files changed, 59 insertions, 45 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 diff --git a/toolchain/glibc/Makefile.inc b/toolchain/glibc/Makefile.inc index 942d8ce6d..3a261c069 100644 --- a/toolchain/glibc/Makefile.inc +++ b/toolchain/glibc/Makefile.inc @@ -32,41 +32,3 @@ PKG_RELEASE:= 1 PKG_HASH:= 2d3997f588401ea095a0b27227b1d50cdfdd416236f6567b564549d3b46ea2a2 endif DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tar.xz -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 -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_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 \ diff --git a/toolchain/glibc/patches/2.22/glibc-cross.patch b/toolchain/glibc/patches/2.22/glibc-cross.patch index e29af8dc3..c38ea8a3c 100644 --- a/toolchain/glibc/patches/2.22/glibc-cross.patch +++ b/toolchain/glibc/patches/2.22/glibc-cross.patch @@ -1,6 +1,6 @@ diff -Nur glibc-2.22.orig/sunrpc/rpc_main.c glibc-2.22/sunrpc/rpc_main.c --- glibc-2.22.orig/sunrpc/rpc_main.c 2015-08-05 08:42:21.000000000 +0200 -+++ glibc-2.22/sunrpc/rpc_main.c 2015-08-19 02:37:42.912687500 +0200 ++++ glibc-2.22/sunrpc/rpc_main.c 2015-12-08 06:21:38.000000000 +0100 @@ -38,7 +38,11 @@ #include <stdio.h> #include <string.h> @@ -24,3 +24,18 @@ diff -Nur glibc-2.22.orig/sunrpc/rpc_main.c glibc-2.22/sunrpc/rpc_main.c #include "../version.h" #define PACKAGE _libc_intl_domainname +diff -Nur glibc-2.22.orig/sunrpc/rpc_scan.c glibc-2.22/sunrpc/rpc_scan.c +--- glibc-2.22.orig/sunrpc/rpc_scan.c 2015-08-05 08:42:21.000000000 +0200 ++++ glibc-2.22/sunrpc/rpc_scan.c 2015-12-08 06:22:36.000000000 +0100 +@@ -37,7 +37,11 @@ + #include <stdio.h> + #include <ctype.h> + #include <string.h> ++#if defined(__APPLE__) || defined(__CYGWIN__) ++#define gettext(X) (X) ++#else + #include <libintl.h> ++#endif + #include "rpc_scan.h" + #include "rpc_parse.h" + #include "rpc_util.h" |