aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-07-29 07:22:31 +0000
committerFelix Fietkau <nbd@openwrt.org>2013-07-29 07:22:31 +0000
commite6d3041b29a0662600242bf80ed9cb046a6031a5 (patch)
tree99257a69a71fa6eab87c01275f39993bb5433ad4
parentb87696121790f34164b50c0c9df58532bb533bfb (diff)
downloadupstream-e6d3041b29a0662600242bf80ed9cb046a6031a5.tar.gz
upstream-e6d3041b29a0662600242bf80ed9cb046a6031a5.tar.bz2
upstream-e6d3041b29a0662600242bf80ed9cb046a6031a5.zip
AA: eglibc: sync with trunk, delete old versions
Fixes build errors in the RPC code and adds parallel build support Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@37596 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--toolchain/eglibc/Config.in17
-rw-r--r--toolchain/eglibc/Config.version12
-rw-r--r--toolchain/eglibc/Makefile3
-rw-r--r--toolchain/eglibc/common.mk9
-rw-r--r--toolchain/eglibc/config/Config.in4
-rw-r--r--toolchain/eglibc/include/libintl.h6
-rw-r--r--toolchain/eglibc/patches/2.12/110-fix_cross_rpcgen.patch71
-rw-r--r--toolchain/eglibc/patches/2.12/120-fix_cross_zic.patch27
-rw-r--r--toolchain/eglibc/patches/2.12/200-add-dl-search-paths.patch16
-rw-r--r--toolchain/eglibc/patches/2.13/100-fix_cross_rpcgen.patch71
-rw-r--r--toolchain/eglibc/patches/2.13/110-fix_cross_zic.patch27
-rw-r--r--toolchain/eglibc/patches/2.13/200-add-dl-search-paths.patch16
-rw-r--r--toolchain/eglibc/patches/2.14.1/050-all_glibc-2.14-leak-revert-crash.patch110
-rw-r--r--toolchain/eglibc/patches/2.14.1/100-fix_cross_rpcgen.patch71
-rw-r--r--toolchain/eglibc/patches/2.14.1/110-fix_cross_zic.patch27
-rw-r--r--toolchain/eglibc/patches/2.14.1/200-add-dl-search-paths.patch16
-rw-r--r--toolchain/eglibc/patches/2.15/120-use_host_cflags.patch22
17 files changed, 46 insertions, 479 deletions
diff --git a/toolchain/eglibc/Config.in b/toolchain/eglibc/Config.in
index 3f5d368c78..5220dd5f1e 100644
--- a/toolchain/eglibc/Config.in
+++ b/toolchain/eglibc/Config.in
@@ -1,30 +1,19 @@
choice
prompt "eglibc version"
depends on TOOLCHAINOPTS && USE_EGLIBC
- default EGLIBC_VERSION_2_15
+ default EGLIBC_USE_VERSION_2_15
help
Select the version of eglibc you wish to use.
- config EGLIBC_VERSION_2_13
- bool "eglibc 2.13"
- depends !GCC_VERSION_LLVM
-
- config EGLIBC_VERSION_2_14
- bool "eglibc 2.14"
- depends !GCC_VERSION_LLVM
-
- config EGLIBC_VERSION_2_15
+ config EGLIBC_USE_VERSION_2_15
bool "eglibc 2.15"
- depends !GCC_VERSION_LLVM
+ select EGLIBC_VERSION_2_15
endchoice
config EGLIBC_REVISION
string
- prompt "eglibc revision"
depends on TOOLCHAINOPTS && USE_EGLIBC
- default "15508" if EGLIBC_VERSION_2_13
- default "16488" if EGLIBC_VERSION_2_14
default "18909" if EGLIBC_VERSION_2_15
default ""
diff --git a/toolchain/eglibc/Config.version b/toolchain/eglibc/Config.version
index 6b8895f0b5..3ff53c1620 100644
--- a/toolchain/eglibc/Config.version
+++ b/toolchain/eglibc/Config.version
@@ -1,7 +1,11 @@
+if USE_EGLIBC
+
config EGLIBC_VERSION
string
- depends on USE_EGLIBC
- default "2.13" if EGLIBC_VERSION_2_13
- default "2.14.1" if EGLIBC_VERSION_2_14
default "2.15" if EGLIBC_VERSION_2_15
- default "2.13"
+
+config EGLIBC_VERSION_2_15
+ default y if !TOOLCHAINOPTS
+ bool
+
+endif
diff --git a/toolchain/eglibc/Makefile b/toolchain/eglibc/Makefile
index c975b7a2ee..429ed3036b 100644
--- a/toolchain/eglibc/Makefile
+++ b/toolchain/eglibc/Makefile
@@ -1,10 +1,11 @@
PATH_PREFIX := .
VARIANT:=final
+HOST_BUILD_PARALLEL:=1
include ./common.mk
define Host/Compile
- $(MAKE) -C $(CUR_BUILD_DIR) all
+ $(MAKE) -C $(CUR_BUILD_DIR) all PARALLELMFLAGS="$(HOST_JOBS)"
endef
define Host/Install
diff --git a/toolchain/eglibc/common.mk b/toolchain/eglibc/common.mk
index 9f7916ee7a..5d63cbfcc6 100644
--- a/toolchain/eglibc/common.mk
+++ b/toolchain/eglibc/common.mk
@@ -15,12 +15,6 @@ PKG_SOURCE_VERSION:=$(PKG_REVISION)
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-r$(PKG_REVISION)
PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.bz2
-ifneq ($(CONFIG_EGLIBC_VERSION_2_13),)
- PKG_SOURCE_URL:=svn://svn.eglibc.org/branches/eglibc-2_13
-endif
-ifneq ($(CONFIG_EGLIBC_VERSION_2_14),)
- PKG_SOURCE_URL:=svn://svn.eglibc.org/branches/eglibc-2_14
-endif
ifneq ($(CONFIG_EGLIBC_VERSION_2_15),)
PKG_SOURCE_URL:=svn://svn.eglibc.org/branches/eglibc-2_15
endif
@@ -57,6 +51,7 @@ EGLIBC_CONFIGURE:= \
export libc_cv_ssp=no
export ac_cv_header_cpuid_h=yes
+export HOST_CFLAGS := $(HOST_CFLAGS) -idirafter $(CURDIR)/$(PATH_PREFIX)/include
define Host/SetToolchainInfo
$(SED) 's,^\(LIBC_TYPE\)=.*,\1=$(PKG_NAME),' $(TOOLCHAIN_DIR)/info.mk
@@ -82,7 +77,9 @@ define Host/Prepare
$(call Host/Prepare/Default)
ln -snf $(PKG_SOURCE_SUBDIR) $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)
$(SED) 's,y,n,' $(HOST_BUILD_DIR)/libc/option-groups.defaults
+ifneq ($(CONFIG_EGLIBC_VERSION_2_17),y)
ln -sf ../ports $(HOST_BUILD_DIR)/libc/
+endif
endef
define Host/Clean
diff --git a/toolchain/eglibc/config/Config.in b/toolchain/eglibc/config/Config.in
index a1e2eb60c3..6f022234a6 100644
--- a/toolchain/eglibc/config/Config.in
+++ b/toolchain/eglibc/config/Config.in
@@ -534,7 +534,7 @@ config EGLIBC_OPTION_EGLIBC_MEMUSAGE
config EGLIBC_OPTION_EGLIBC_NIS
bool "Support for NIS, NIS+, and the special 'compat' services."
- default y
+ default n
select EGLIBC_OPTION_EGLIBC_INET
select EGLIBC_OPTION_EGLIBC_SUNRPC
help
@@ -718,7 +718,7 @@ config EGLIBC_OPTION_EGLIBC_STREAMS
config EGLIBC_OPTION_EGLIBC_SUNRPC
bool "Support for the Sun 'RPC' protocol."
- default y
+ default n
select EGLIBC_OPTION_EGLIBC_INET
help
This option group includes support for the Sun RPC protocols,
diff --git a/toolchain/eglibc/include/libintl.h b/toolchain/eglibc/include/libintl.h
new file mode 100644
index 0000000000..69cb887a26
--- /dev/null
+++ b/toolchain/eglibc/include/libintl.h
@@ -0,0 +1,6 @@
+#ifndef __FAKE_LIBINTL_H
+#define __FAKE_LIBINTL_H
+
+#define _(X) (X)
+
+#endif
diff --git a/toolchain/eglibc/patches/2.12/110-fix_cross_rpcgen.patch b/toolchain/eglibc/patches/2.12/110-fix_cross_rpcgen.patch
deleted file mode 100644
index 3c8d419544..0000000000
--- a/toolchain/eglibc/patches/2.12/110-fix_cross_rpcgen.patch
+++ /dev/null
@@ -1,71 +0,0 @@
---- a/libc/sunrpc/proto.h
-+++ b/libc/sunrpc/proto.h
-@@ -56,12 +56,14 @@ void add_type(int len, const char *type)
- $build's C library and $host's GLIBC. */
- #ifdef _CROSS_RPCGEN_
-
-+#undef stpcpy
-+
- /* Rather then defining _GNU_SOURCE before including $build's <string.h>
- we just declare stpcpy here. */
- extern char *stpcpy (char *, const char *);
-
--/* Use $build's i18n support as we can't use $host's. */
--#define _(X) (gettext (X))
-+/* Do not use i18n support */
-+#define _(X) (X)
-
- /* rpcgen sources check for __GNU_LIBRARY__ to tweak for GLIBC code
- that rpcgen generates. The proper fix would be to rename all those checks
---- a/libc/sunrpc/rpc/types.h
-+++ b/libc/sunrpc/rpc/types.h
-@@ -69,18 +69,23 @@ typedef unsigned long rpcport_t;
- #endif
-
- #ifndef __u_char_defined
--typedef __u_char u_char;
--typedef __u_short u_short;
--typedef __u_int u_int;
--typedef __u_long u_long;
--typedef __quad_t quad_t;
--typedef __u_quad_t u_quad_t;
--typedef __fsid_t fsid_t;
-+typedef unsigned char u_char;
-+typedef unsigned short u_short;
-+typedef unsigned int u_int;
-+typedef unsigned long u_long;
-+#if __WORDSIZE == 64
-+typedef long int quad_t;
-+typedef unsigned long int u_quad_t;
-+#elif defined __GLIBC_HAVE_LONG_LONG
-+typedef long long int quad_t;
-+typedef unsigned long long int u_quad_t;
-+#endif
-+typedef u_quad_t fsid_t;
- # define __u_char_defined
- #endif
--#ifndef __daddr_t_defined
--typedef __daddr_t daddr_t;
--typedef __caddr_t caddr_t;
-+#if !defined(__daddr_t_defined) && defined(linux)
-+typedef long int daddr_t;
-+typedef char *caddr_t;
- # define __daddr_t_defined
- #endif
-
---- a/libc/sunrpc/rpc_main.c
-+++ b/libc/sunrpc/rpc_main.c
-@@ -996,9 +996,10 @@ mkfile_output (struct commandline *cmd)
- abort ();
- temp = rindex (cmd->infile, '.');
- cp = stpcpy (mkfilename, "Makefile.");
-- if (temp != NULL)
-- *((char *) stpncpy (cp, cmd->infile, temp - cmd->infile)) = '\0';
-- else
-+ if (temp != NULL) {
-+ strncpy(cp, cmd->infile, temp - cmd->infile);
-+ cp[temp - cmd->infile - 1] = 0;
-+ } else
- stpcpy (cp, cmd->infile);
-
- }
diff --git a/toolchain/eglibc/patches/2.12/120-fix_cross_zic.patch b/toolchain/eglibc/patches/2.12/120-fix_cross_zic.patch
deleted file mode 100644
index 221eb28709..0000000000
--- a/toolchain/eglibc/patches/2.12/120-fix_cross_zic.patch
+++ /dev/null
@@ -1,27 +0,0 @@
---- a/libc/timezone/zic.c
-+++ b/libc/timezone/zic.c
-@@ -8,6 +8,8 @@ static char elsieid[] = "@(#)zic.c 8.19"
- #ifdef CROSS_ZIC
- #define REPORT_BUGS_TO ""
- #define PKGVERSION ""
-+#undef _
-+#define _(X) (X)
- #else
- #include "config.h"
- #endif
-@@ -490,6 +492,7 @@ char * argv[];
- #ifdef unix
- (void) umask(umask(S_IWGRP | S_IWOTH) | (S_IWGRP | S_IWOTH));
- #endif /* defined unix */
-+#ifndef CROSS_ZIC
- #if HAVE_GETTEXT
- (void) setlocale(LC_ALL, "");
- #ifdef TZ_DOMAINDIR
-@@ -497,6 +500,7 @@ char * argv[];
- #endif /* defined TEXTDOMAINDIR */
- (void) textdomain(TZ_DOMAIN);
- #endif /* HAVE_GETTEXT */
-+#endif
- progname = argv[0];
- if (TYPE_BIT(zic_t) < 64) {
- (void) fprintf(stderr, "%s: %s\n", progname,
diff --git a/toolchain/eglibc/patches/2.12/200-add-dl-search-paths.patch b/toolchain/eglibc/patches/2.12/200-add-dl-search-paths.patch
deleted file mode 100644
index 91ef61b1ea..0000000000
--- a/toolchain/eglibc/patches/2.12/200-add-dl-search-paths.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-add /usr/lib to default search path for the dynamic linker
-
-diff --git a/libc/Makeconfig b/libc/Makeconfig
-index 1a9ad87..2d4d3f7 100644
---- a/libc/Makeconfig
-+++ b/libc/Makeconfig
-@@ -479,6 +479,9 @@ else
- default-rpath = $(libdir)
- endif
-
-+# Add /usr/lib to default search path for the dynamic linker
-+user-defined-trusted-dirs := /usr/lib
-+
- ifndef link-extra-libs
- link-extra-libs = $(LDLIBS-$(@F))
- link-extra-libs-static = $(link-extra-libs)
diff --git a/toolchain/eglibc/patches/2.13/100-fix_cross_rpcgen.patch b/toolchain/eglibc/patches/2.13/100-fix_cross_rpcgen.patch
deleted file mode 100644
index 8fe5cf3f7c..0000000000
--- a/toolchain/eglibc/patches/2.13/100-fix_cross_rpcgen.patch
+++ /dev/null
@@ -1,71 +0,0 @@
---- a/libc/sunrpc/proto.h
-+++ b/libc/sunrpc/proto.h
-@@ -56,12 +56,14 @@ void add_type(int len, const char *type)
- $build's C library and $host's GLIBC. */
- #ifdef _CROSS_RPCGEN_
-
-+#undef stpcpy
-+
- /* Rather then defining _GNU_SOURCE before including $build's <string.h>
- we just declare stpcpy here. */
- extern char *stpcpy (char *, const char *);
-
--/* Use $build's i18n support as we can't use $host's. */
--#define _(X) (gettext (X))
-+/* Do not use i18n support */
-+#define _(X) (X)
-
- /* rpcgen sources check for __GNU_LIBRARY__ to tweak for GLIBC code
- that rpcgen generates. The proper fix would be to rename all those checks
---- a/libc/sunrpc/rpc/types.h
-+++ b/libc/sunrpc/rpc/types.h
-@@ -70,18 +70,23 @@ typedef unsigned long rpcport_t;
- #endif
-
- #ifndef __u_char_defined
--typedef __u_char u_char;
--typedef __u_short u_short;
--typedef __u_int u_int;
--typedef __u_long u_long;
--typedef __quad_t quad_t;
--typedef __u_quad_t u_quad_t;
--typedef __fsid_t fsid_t;
-+typedef unsigned char u_char;
-+typedef unsigned short u_short;
-+typedef unsigned int u_int;
-+typedef unsigned long u_long;
-+#if __WORDSIZE == 64
-+typedef long int quad_t;
-+typedef unsigned long int u_quad_t;
-+#elif defined __GLIBC_HAVE_LONG_LONG
-+typedef long long int quad_t;
-+typedef unsigned long long int u_quad_t;
-+#endif
-+typedef u_quad_t fsid_t;
- # define __u_char_defined
- #endif
--#ifndef __daddr_t_defined
--typedef __daddr_t daddr_t;
--typedef __caddr_t caddr_t;
-+#if !defined(__daddr_t_defined) && defined(linux)
-+typedef long int daddr_t;
-+typedef char *caddr_t;
- # define __daddr_t_defined
- #endif
-
---- a/libc/sunrpc/rpc_main.c
-+++ b/libc/sunrpc/rpc_main.c
-@@ -997,9 +997,10 @@ mkfile_output (struct commandline *cmd)
- abort ();
- temp = rindex (cmd->infile, '.');
- cp = stpcpy (mkfilename, "Makefile.");
-- if (temp != NULL)
-- *((char *) stpncpy (cp, cmd->infile, temp - cmd->infile)) = '\0';
-- else
-+ if (temp != NULL) {
-+ strncpy(cp, cmd->infile, temp - cmd->infile);
-+ cp[temp - cmd->infile - 1] = 0;
-+ } else
- stpcpy (cp, cmd->infile);
-
- }
diff --git a/toolchain/eglibc/patches/2.13/110-fix_cross_zic.patch b/toolchain/eglibc/patches/2.13/110-fix_cross_zic.patch
deleted file mode 100644
index 221eb28709..0000000000
--- a/toolchain/eglibc/patches/2.13/110-fix_cross_zic.patch
+++ /dev/null
@@ -1,27 +0,0 @@
---- a/libc/timezone/zic.c
-+++ b/libc/timezone/zic.c
-@@ -8,6 +8,8 @@ static char elsieid[] = "@(#)zic.c 8.19"
- #ifdef CROSS_ZIC
- #define REPORT_BUGS_TO ""
- #define PKGVERSION ""
-+#undef _
-+#define _(X) (X)
- #else
- #include "config.h"
- #endif
-@@ -490,6 +492,7 @@ char * argv[];
- #ifdef unix
- (void) umask(umask(S_IWGRP | S_IWOTH) | (S_IWGRP | S_IWOTH));
- #endif /* defined unix */
-+#ifndef CROSS_ZIC
- #if HAVE_GETTEXT
- (void) setlocale(LC_ALL, "");
- #ifdef TZ_DOMAINDIR
-@@ -497,6 +500,7 @@ char * argv[];
- #endif /* defined TEXTDOMAINDIR */
- (void) textdomain(TZ_DOMAIN);
- #endif /* HAVE_GETTEXT */
-+#endif
- progname = argv[0];
- if (TYPE_BIT(zic_t) < 64) {
- (void) fprintf(stderr, "%s: %s\n", progname,
diff --git a/toolchain/eglibc/patches/2.13/200-add-dl-search-paths.patch b/toolchain/eglibc/patches/2.13/200-add-dl-search-paths.patch
deleted file mode 100644
index 91ef61b1ea..0000000000
--- a/toolchain/eglibc/patches/2.13/200-add-dl-search-paths.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-add /usr/lib to default search path for the dynamic linker
-
-diff --git a/libc/Makeconfig b/libc/Makeconfig
-index 1a9ad87..2d4d3f7 100644
---- a/libc/Makeconfig
-+++ b/libc/Makeconfig
-@@ -479,6 +479,9 @@ else
- default-rpath = $(libdir)
- endif
-
-+# Add /usr/lib to default search path for the dynamic linker
-+user-defined-trusted-dirs := /usr/lib
-+
- ifndef link-extra-libs
- link-extra-libs = $(LDLIBS-$(@F))
- link-extra-libs-static = $(link-extra-libs)
diff --git a/toolchain/eglibc/patches/2.14.1/050-all_glibc-2.14-leak-revert-crash.patch b/toolchain/eglibc/patches/2.14.1/050-all_glibc-2.14-leak-revert-crash.patch
deleted file mode 100644
index ce2e184e25..0000000000
--- a/toolchain/eglibc/patches/2.14.1/050-all_glibc-2.14-leak-revert-crash.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-partially revert commit 4bff6e0175ed195871f4e01cc4c4c33274b8f6e3 - caused segmentation faults in dlopen
-
-References:
-http://comments.gmane.org/gmane.comp.lib.glibc.user/1227
-http://sourceware.org/ml/libc-alpha/2011-06/msg00006.html
-
-diff --git a/libc/elf/dl-close.c b/libc/elf/dl-close.c
-index 493ed54..aa147d7 100644
---- a/libc/elf/dl-close.c
-+++ b/libc/elf/dl-close.c
-@@ -119,17 +119,8 @@ _dl_close_worker (struct link_map *map)
- if (map->l_direct_opencount > 0 || map->l_type != lt_loaded
- || dl_close_state != not_pending)
- {
-- if (map->l_direct_opencount == 0)
-- {
-- if (map->l_type == lt_loaded)
-- dl_close_state = rerun;
-- else if (map->l_type == lt_library)
-- {
-- struct link_map **oldp = map->l_initfini;
-- map->l_initfini = map->l_orig_initfini;
-- _dl_scope_free (oldp);
-- }
-- }
-+ if (map->l_direct_opencount == 0 && map->l_type == lt_loaded)
-+ dl_close_state = rerun;
-
- /* There are still references to this object. Do nothing more. */
- if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_FILES, 0))
-diff --git a/libc/elf/dl-deps.c b/libc/elf/dl-deps.c
-index 326fc16..ad05c8d 100644
---- a/libc/elf/dl-deps.c
-+++ b/libc/elf/dl-deps.c
-@@ -478,6 +478,7 @@ _dl_map_object_deps (struct link_map *map,
- nneeded * sizeof needed[0]);
- atomic_write_barrier ();
- l->l_initfini = l_initfini;
-+ l->l_free_initfini = 1;
- }
-
- /* If we have no auxiliary objects just go on to the next map. */
-@@ -678,6 +679,7 @@ Filters not supported with LD_TRACE_PRELINKING"));
- l_initfini[nlist] = NULL;
- atomic_write_barrier ();
- map->l_initfini = l_initfini;
-+ map->l_free_initfini = 1;
- if (l_reldeps != NULL)
- {
- atomic_write_barrier ();
-@@ -686,7 +688,7 @@ Filters not supported with LD_TRACE_PRELINKING"));
- _dl_scope_free (old_l_reldeps);
- }
- if (old_l_initfini != NULL)
-- map->l_orig_initfini = old_l_initfini;
-+ _dl_scope_free (old_l_initfini);
-
- if (errno_reason)
- _dl_signal_error (errno_reason == -1 ? 0 : errno_reason, objname,
-diff --git a/libc/elf/dl-libc.c b/libc/elf/dl-libc.c
-index 7be9483..c7616b9 100644
---- a/libc/elf/dl-libc.c
-+++ b/libc/elf/dl-libc.c
-@@ -279,6 +279,10 @@ libc_freeres_fn (free_mem)
- if (! old->dont_free)
- free (old);
- }
-+
-+ /* Free the initfini dependency list. */
-+ if (l->l_free_initfini)
-+ free (l->l_initfini);
- }
-
- if (__builtin_expect (GL(dl_ns)[ns]._ns_global_scope_alloc, 0) != 0
-diff --git a/libc/elf/rtld.c b/libc/elf/rtld.c
-index 78fa12a..e261b27 100644
---- a/libc/elf/rtld.c
-+++ b/libc/elf/rtld.c
-@@ -2264,6 +2264,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
- lnp->dont_free = 1;
- lnp = lnp->next;
- }
-+ l->l_free_initfini = 0;
-
- if (l != &GL(dl_rtld_map))
- _dl_relocate_object (l, l->l_scope, GLRO(dl_lazy) ? RTLD_LAZY : 0,
-diff --git a/libc/include/link.h b/libc/include/link.h
-index e877104..b1b4065 100644
---- a/libc/include/link.h
-+++ b/libc/include/link.h
-@@ -192,6 +192,9 @@ struct link_map
- during LD_TRACE_PRELINKING=1
- contains any DT_SYMBOLIC
- libraries. */
-+ unsigned int l_free_initfini:1; /* Nonzero if l_initfini can be
-+ freed, ie. not allocated with
-+ the dummy malloc in ld.so. */
-
- /* Collected information about own RPATH directories. */
- struct r_search_path_struct l_rpath_dirs;
-@@ -240,9 +243,6 @@ struct link_map
-
- /* List of object in order of the init and fini calls. */
- struct link_map **l_initfini;
-- /* The init and fini list generated at startup, saved when the
-- object is also loaded dynamically. */
-- struct link_map **l_orig_initfini;
-
- /* List of the dependencies introduced through symbol binding. */
- struct link_map_reldeps
diff --git a/toolchain/eglibc/patches/2.14.1/100-fix_cross_rpcgen.patch b/toolchain/eglibc/patches/2.14.1/100-fix_cross_rpcgen.patch
deleted file mode 100644
index 8fe5cf3f7c..0000000000
--- a/toolchain/eglibc/patches/2.14.1/100-fix_cross_rpcgen.patch
+++ /dev/null
@@ -1,71 +0,0 @@
---- a/libc/sunrpc/proto.h
-+++ b/libc/sunrpc/proto.h
-@@ -56,12 +56,14 @@ void add_type(int len, const char *type)
- $build's C library and $host's GLIBC. */
- #ifdef _CROSS_RPCGEN_
-
-+#undef stpcpy
-+
- /* Rather then defining _GNU_SOURCE before including $build's <string.h>
- we just declare stpcpy here. */
- extern char *stpcpy (char *, const char *);
-
--/* Use $build's i18n support as we can't use $host's. */
--#define _(X) (gettext (X))
-+/* Do not use i18n support */
-+#define _(X) (X)
-
- /* rpcgen sources check for __GNU_LIBRARY__ to tweak for GLIBC code
- that rpcgen generates. The proper fix would be to rename all those checks
---- a/libc/sunrpc/rpc/types.h
-+++ b/libc/sunrpc/rpc/types.h
-@@ -70,18 +70,23 @@ typedef unsigned long rpcport_t;
- #endif
-
- #ifndef __u_char_defined
--typedef __u_char u_char;
--typedef __u_short u_short;
--typedef __u_int u_int;
--typedef __u_long u_long;
--typedef __quad_t quad_t;
--typedef __u_quad_t u_quad_t;
--typedef __fsid_t fsid_t;
-+typedef unsigned char u_char;
-+typedef unsigned short u_short;
-+typedef unsigned int u_int;
-+typedef unsigned long u_long;
-+#if __WORDSIZE == 64
-+typedef long int quad_t;
-+typedef unsigned long int u_quad_t;
-+#elif defined __GLIBC_HAVE_LONG_LONG
-+typedef long long int quad_t;
-+typedef unsigned long long int u_quad_t;
-+#endif
-+typedef u_quad_t fsid_t;
- # define __u_char_defined
- #endif
--#ifndef __daddr_t_defined
--typedef __daddr_t daddr_t;
--typedef __caddr_t caddr_t;
-+#if !defined(__daddr_t_defined) && defined(linux)
-+typedef long int daddr_t;
-+typedef char *caddr_t;
- # define __daddr_t_defined
- #endif
-
---- a/libc/sunrpc/rpc_main.c
-+++ b/libc/sunrpc/rpc_main.c
-@@ -997,9 +997,10 @@ mkfile_output (struct commandline *cmd)
- abort ();
- temp = rindex (cmd->infile, '.');
- cp = stpcpy (mkfilename, "Makefile.");
-- if (temp != NULL)
-- *((char *) stpncpy (cp, cmd->infile, temp - cmd->infile)) = '\0';
-- else
-+ if (temp != NULL) {
-+ strncpy(cp, cmd->infile, temp - cmd->infile);
-+ cp[temp - cmd->infile - 1] = 0;
-+ } else
- stpcpy (cp, cmd->infile);
-
- }
diff --git a/toolchain/eglibc/patches/2.14.1/110-fix_cross_zic.patch b/toolchain/eglibc/patches/2.14.1/110-fix_cross_zic.patch
deleted file mode 100644
index 221eb28709..0000000000
--- a/toolchain/eglibc/patches/2.14.1/110-fix_cross_zic.patch
+++ /dev/null
@@ -1,27 +0,0 @@
---- a/libc/timezone/zic.c
-+++ b/libc/timezone/zic.c
-@@ -8,6 +8,8 @@ static char elsieid[] = "@(#)zic.c 8.19"
- #ifdef CROSS_ZIC
- #define REPORT_BUGS_TO ""
- #define PKGVERSION ""
-+#undef _
-+#define _(X) (X)
- #else
- #include "config.h"
- #endif
-@@ -490,6 +492,7 @@ char * argv[];
- #ifdef unix
- (void) umask(umask(S_IWGRP | S_IWOTH) | (S_IWGRP | S_IWOTH));
- #endif /* defined unix */
-+#ifndef CROSS_ZIC
- #if HAVE_GETTEXT
- (void) setlocale(LC_ALL, "");
- #ifdef TZ_DOMAINDIR
-@@ -497,6 +500,7 @@ char * argv[];
- #endif /* defined TEXTDOMAINDIR */
- (void) textdomain(TZ_DOMAIN);
- #endif /* HAVE_GETTEXT */
-+#endif
- progname = argv[0];
- if (TYPE_BIT(zic_t) < 64) {
- (void) fprintf(stderr, "%s: %s\n", progname,
diff --git a/toolchain/eglibc/patches/2.14.1/200-add-dl-search-paths.patch b/toolchain/eglibc/patches/2.14.1/200-add-dl-search-paths.patch
deleted file mode 100644
index 91ef61b1ea..0000000000
--- a/toolchain/eglibc/patches/2.14.1/200-add-dl-search-paths.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-add /usr/lib to default search path for the dynamic linker
-
-diff --git a/libc/Makeconfig b/libc/Makeconfig
-index 1a9ad87..2d4d3f7 100644
---- a/libc/Makeconfig
-+++ b/libc/Makeconfig
-@@ -479,6 +479,9 @@ else
- default-rpath = $(libdir)
- endif
-
-+# Add /usr/lib to default search path for the dynamic linker
-+user-defined-trusted-dirs := /usr/lib
-+
- ifndef link-extra-libs
- link-extra-libs = $(LDLIBS-$(@F))
- link-extra-libs-static = $(link-extra-libs)
diff --git a/toolchain/eglibc/patches/2.15/120-use_host_cflags.patch b/toolchain/eglibc/patches/2.15/120-use_host_cflags.patch
new file mode 100644
index 0000000000..4c58fb4fb4
--- /dev/null
+++ b/toolchain/eglibc/patches/2.15/120-use_host_cflags.patch
@@ -0,0 +1,22 @@
+--- a/libc/sunrpc/Makefile
++++ b/libc/sunrpc/Makefile
+@@ -175,7 +175,7 @@ $(objpfx)rpcgen: $(addprefix $(objpfx),$
+ $(+link)
+
+ $(addprefix $(objpfx)cross-,$(rpcgen-objs)): $(objpfx)cross-%.o: %.c
+- gcc $< -c -D_RPC_THREAD_SAFE_ -D_CROSS_RPCGEN_ \
++ gcc $< -c -D_RPC_THREAD_SAFE_ -D_CROSS_RPCGEN_ $(HOST_CFLAGS) \
+ $(OUTPUT_OPTION) $(compile-mkdep-flags)
+
+ $(objpfx)cross-rpcgen: $(addprefix $(objpfx)cross-,$(rpcgen-objs))
+--- a/libc/timezone/Makefile
++++ b/libc/timezone/Makefile
+@@ -182,7 +182,7 @@ $(objpfx)zic: $(addprefix $(objpfx), $(z
+
+ $(addprefix $(objpfx)cross-,$(zic-objs)): $(objpfx)cross-%.o: %.c
+ gcc $< -c $(OUTPUT_OPTION) $(CFLAGS-$*.c) $(CPPFLAGS-$*) \
+- -DCROSS_ZIC $(compile-mkdep-flags)
++ -DCROSS_ZIC $(HOST_CFLAGS) $(compile-mkdep-flags)
+
+ $(objpfx)cross-zic: $(addprefix $(objpfx)cross-,$(zic-objs))
+ gcc $(addprefix $(objpfx)cross-,$(zic-objs)) -o $@