eglibc: add version 2.19
authorFelix Fietkau <nbd@openwrt.org>
Mon, 24 Feb 2014 15:35:07 +0000 (15:35 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 24 Feb 2014 15:35:07 +0000 (15:35 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 39742

toolchain/eglibc/Config.in
toolchain/eglibc/Config.version
toolchain/eglibc/Makefile
toolchain/eglibc/common.mk
toolchain/eglibc/headers/Makefile
toolchain/eglibc/patches/2.19/100-fix_cross_rpcgen.patch [new file with mode: 0644]
toolchain/eglibc/patches/2.19/200-add-dl-search-paths.patch [new file with mode: 0644]

index 791033662ac688d3336cf5d8fbef1261f7ef3efb..4b956bcb89172f2fe5d7bd8d53eb345daf234fbf 100644 (file)
@@ -17,6 +17,10 @@ choice
                bool "eglibc 2.17"
                select EGLIBC_VERSION_2_17
 
+       config EGLIBC_USE_VERSION_2_19
+               bool "eglibc 2.19"
+               select EGLIBC_VERSION_2_19
+
 endchoice
 
 config EGLIBC_REVISION
@@ -25,6 +29,7 @@ config EGLIBC_REVISION
        default "18909" if EGLIBC_VERSION_2_15
        default "21110" if EGLIBC_VERSION_2_16
        default "22243" if EGLIBC_VERSION_2_17
+       default "25243" if EGLIBC_VERSION_2_19
        default ""
 
 menu "eglibc configuration"
index a383bb211d8608fdb681a110384edd5afba45918..46d9b2e5e63ff645d41cd1626696ad4e6f9dee02 100644 (file)
@@ -5,6 +5,7 @@ config EGLIBC_VERSION
        default "2.15" if EGLIBC_VERSION_2_15
        default "2.16" if EGLIBC_VERSION_2_16
        default "2.17" if EGLIBC_VERSION_2_17
+       default "2.19" if EGLIBC_VERSION_2_19
 
 config EGLIBC_VERSION_2_15
        default y if !TOOLCHAINOPTS
@@ -16,4 +17,7 @@ config EGLIBC_VERSION_2_16
 config EGLIBC_VERSION_2_17
        bool
 
+config EGLIBC_VERSION_2_19
+       bool
+
 endif
index 429ed3036ba11aaf9818f076e17f498d89256cf6..774500a46dff0319582bb93245f2e988709eff3f 100644 (file)
@@ -5,12 +5,16 @@ HOST_BUILD_PARALLEL:=1
 include ./common.mk
 
 define Host/Compile
-       $(MAKE) -C $(CUR_BUILD_DIR) all PARALLELMFLAGS="$(HOST_JOBS)"
+       $(MAKE) -C $(CUR_BUILD_DIR) \
+               PARALLELMFLAGS="$(HOST_JOBS)" \
+               BUILD_CFLAGS="$(HOST_CFLAGS)" \
+               all
 endef
 
 define Host/Install
        $(call Host/SetToolchainInfo)
        $(MAKE) -C $(CUR_BUILD_DIR) \
+               BUILD_CFLAGS="$(HOST_CFLAGS)" \
                install_root="$(TOOLCHAIN_DIR)" \
                install
        ( cd $(TOOLCHAIN_DIR) ; \
index 483f57db829b718aaa141cc74f44ae9f2a0e38c2..d54e09881f26bd783c7e47b0198ab85bf69cf09a 100644 (file)
@@ -24,6 +24,9 @@ endif
 ifneq ($(CONFIG_EGLIBC_VERSION_2_17),)
   PKG_SOURCE_URL:=svn://svn.eglibc.org/branches/eglibc-2_17
 endif
+ifneq ($(CONFIG_EGLIBC_VERSION_2_19),)
+  PKG_SOURCE_URL:=svn://svn.eglibc.org/branches/eglibc-2_19
+endif
 
 PATCH_DIR:=$(PATH_PREFIX)/patches/$(PKG_VERSION)
 
@@ -83,7 +86,7 @@ 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)
+ifneq ($(CONFIG_EGLIBC_VERSION_2_15)$(CONFIG_EGLIBC_VERSION_2_16),)
        ln -sf ../ports $(HOST_BUILD_DIR)/libc/
 endif
 endef
index 69495c9bde88b323adede7e745ccd6090fc7ab62..f9f411b1f0a4e3c8e827bbf75fd9a058dae63522 100644 (file)
@@ -11,6 +11,7 @@ define Host/Install
        $(call Host/SetToolchainInfo)
        mkdir -p $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/{include,lib}
        $(MAKE) -C $(CUR_BUILD_DIR) \
+               BUILD_CFLAGS="$(HOST_CFLAGS)" \
                install_root="$(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev" \
                install-bootstrap-headers=yes \
                install-headers
diff --git a/toolchain/eglibc/patches/2.19/100-fix_cross_rpcgen.patch b/toolchain/eglibc/patches/2.19/100-fix_cross_rpcgen.patch
new file mode 100644 (file)
index 0000000..5c0d45b
--- /dev/null
@@ -0,0 +1,52 @@
+--- a/libc/sunrpc/rpc/types.h
++++ b/libc/sunrpc/rpc/types.h
+@@ -75,18 +75,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
+@@ -958,9 +958,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.19/200-add-dl-search-paths.patch b/toolchain/eglibc/patches/2.19/200-add-dl-search-paths.patch
new file mode 100644 (file)
index 0000000..fa192ca
--- /dev/null
@@ -0,0 +1,14 @@
+add /usr/lib to default search path for the dynamic linker
+
+--- a/libc/Makeconfig
++++ b/libc/Makeconfig
+@@ -501,6 +501,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)