From 2a68cf4d315cdd18766de0c75928ff17846a6cd7 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 21 Jun 2011 15:53:38 -0700 Subject: eglibc: Upgrade recipes from 2.13 -> 2.14 Signed-off-by: Khem Raj --- .../eglibc/cross-localedef-native_2.13.bb | 44 -------- .../eglibc/cross-localedef-native_2.14.bb | 44 ++++++++ .../eglibc/eglibc-2.13/IO-acquire-lock-fix.patch | 17 --- .../eglibc-svn-arm-lowlevellock-include-tls.patch | 21 ---- .../recipes-core/eglibc/eglibc-2.13/etc/ld.so.conf | 0 .../eglibc/eglibc-2.13/generate-supported.mk | 11 -- .../eglibc/eglibc-2.13/ld-search-order.patch | 56 ---------- .../eglibc/eglibc-2.13/mips-rld-map-check.patch | 26 ----- .../eglibc-2.13/shorten-build-commands.patch | 83 --------------- .../eglibc/eglibc-2.13/stack-protector-test.patch | 35 ------- .../eglibc/eglibc-2.14/IO-acquire-lock-fix.patch | 17 +++ .../eglibc-svn-arm-lowlevellock-include-tls.patch | 21 ++++ .../recipes-core/eglibc/eglibc-2.14/etc/ld.so.conf | 0 .../eglibc/eglibc-2.14/generate-supported.mk | 11 ++ .../eglibc/eglibc-2.14/ld-search-order.patch | 56 ++++++++++ .../eglibc/eglibc-2.14/mips-rld-map-check.patch | 26 +++++ .../eglibc-2.14/shorten-build-commands.patch | 83 +++++++++++++++ .../eglibc/eglibc-2.14/stack-protector-test.patch | 35 +++++++ meta/recipes-core/eglibc/eglibc-initial_2.13.bb | 6 -- meta/recipes-core/eglibc/eglibc-initial_2.14.bb | 6 ++ meta/recipes-core/eglibc/eglibc_2.13.bb | 115 --------------------- meta/recipes-core/eglibc/eglibc_2.14.bb | 114 ++++++++++++++++++++ 22 files changed, 413 insertions(+), 414 deletions(-) delete mode 100644 meta/recipes-core/eglibc/cross-localedef-native_2.13.bb create mode 100644 meta/recipes-core/eglibc/cross-localedef-native_2.14.bb delete mode 100644 meta/recipes-core/eglibc/eglibc-2.13/IO-acquire-lock-fix.patch delete mode 100644 meta/recipes-core/eglibc/eglibc-2.13/eglibc-svn-arm-lowlevellock-include-tls.patch delete mode 100644 meta/recipes-core/eglibc/eglibc-2.13/etc/ld.so.conf delete mode 100644 meta/recipes-core/eglibc/eglibc-2.13/generate-supported.mk delete mode 100644 meta/recipes-core/eglibc/eglibc-2.13/ld-search-order.patch delete mode 100644 meta/recipes-core/eglibc/eglibc-2.13/mips-rld-map-check.patch delete mode 100644 meta/recipes-core/eglibc/eglibc-2.13/shorten-build-commands.patch delete mode 100644 meta/recipes-core/eglibc/eglibc-2.13/stack-protector-test.patch create mode 100644 meta/recipes-core/eglibc/eglibc-2.14/IO-acquire-lock-fix.patch create mode 100644 meta/recipes-core/eglibc/eglibc-2.14/eglibc-svn-arm-lowlevellock-include-tls.patch create mode 100644 meta/recipes-core/eglibc/eglibc-2.14/etc/ld.so.conf create mode 100644 meta/recipes-core/eglibc/eglibc-2.14/generate-supported.mk create mode 100644 meta/recipes-core/eglibc/eglibc-2.14/ld-search-order.patch create mode 100644 meta/recipes-core/eglibc/eglibc-2.14/mips-rld-map-check.patch create mode 100644 meta/recipes-core/eglibc/eglibc-2.14/shorten-build-commands.patch create mode 100644 meta/recipes-core/eglibc/eglibc-2.14/stack-protector-test.patch delete mode 100644 meta/recipes-core/eglibc/eglibc-initial_2.13.bb create mode 100644 meta/recipes-core/eglibc/eglibc-initial_2.14.bb delete mode 100644 meta/recipes-core/eglibc/eglibc_2.13.bb create mode 100644 meta/recipes-core/eglibc/eglibc_2.14.bb (limited to 'meta/recipes-core') diff --git a/meta/recipes-core/eglibc/cross-localedef-native_2.13.bb b/meta/recipes-core/eglibc/cross-localedef-native_2.13.bb deleted file mode 100644 index 68ef86439..000000000 --- a/meta/recipes-core/eglibc/cross-localedef-native_2.13.bb +++ /dev/null @@ -1,44 +0,0 @@ -DESCRIPTION = "Cross locale generation tool for eglibc" -HOMEPAGE = "http://www.eglibc.org/home" -SECTION = "libs" -PRIORITY = "required" -LICENSE = "LGPL" - -LIC_DIR = "${WORKDIR}/${EGLIBC_BRANCH}/libc" -LIC_FILES_CHKSUM = "file://${LIC_DIR}/LICENSES;md5=07a394b26e0902b9ffdec03765209770 \ - file://${LIC_DIR}/COPYING;md5=393a5ca445f6965873eca0259a17f833 \ - file://${LIC_DIR}/posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \ - file://${LIC_DIR}/COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff " - - -inherit native -inherit autotools - -PR = "r1" -SRCREV="11982" -EGLIBC_BRANCH="eglibc-2_12" -SRC_URI = "svn://www.eglibc.org/svn/branches/;module=${EGLIBC_BRANCH};proto=http " -S = "${WORKDIR}/${EGLIBC_BRANCH}/localedef" - -do_unpack_append() { - bb.build.exec_func('do_move_ports', d) -} - -do_move_ports() { - if test -d ${WORKDIR}/${EGLIBC_BRANCH}/ports ; then - rm -rf ${WORKDIR}/libc/ports - mv ${WORKDIR}/${EGLIBC_BRANCH}/ports ${WORKDIR}/libc/ - fi -} - -EXTRA_OECONF = "--with-glibc=${WORKDIR}/${EGLIBC_BRANCH}/libc" - -do_configure () { - ./configure ${EXTRA_OECONF} -} - - -do_install() { - install -d ${D}${bindir} - install -m 0755 ${S}/localedef ${D}${bindir}/cross-localedef -} diff --git a/meta/recipes-core/eglibc/cross-localedef-native_2.14.bb b/meta/recipes-core/eglibc/cross-localedef-native_2.14.bb new file mode 100644 index 000000000..68ef86439 --- /dev/null +++ b/meta/recipes-core/eglibc/cross-localedef-native_2.14.bb @@ -0,0 +1,44 @@ +DESCRIPTION = "Cross locale generation tool for eglibc" +HOMEPAGE = "http://www.eglibc.org/home" +SECTION = "libs" +PRIORITY = "required" +LICENSE = "LGPL" + +LIC_DIR = "${WORKDIR}/${EGLIBC_BRANCH}/libc" +LIC_FILES_CHKSUM = "file://${LIC_DIR}/LICENSES;md5=07a394b26e0902b9ffdec03765209770 \ + file://${LIC_DIR}/COPYING;md5=393a5ca445f6965873eca0259a17f833 \ + file://${LIC_DIR}/posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \ + file://${LIC_DIR}/COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff " + + +inherit native +inherit autotools + +PR = "r1" +SRCREV="11982" +EGLIBC_BRANCH="eglibc-2_12" +SRC_URI = "svn://www.eglibc.org/svn/branches/;module=${EGLIBC_BRANCH};proto=http " +S = "${WORKDIR}/${EGLIBC_BRANCH}/localedef" + +do_unpack_append() { + bb.build.exec_func('do_move_ports', d) +} + +do_move_ports() { + if test -d ${WORKDIR}/${EGLIBC_BRANCH}/ports ; then + rm -rf ${WORKDIR}/libc/ports + mv ${WORKDIR}/${EGLIBC_BRANCH}/ports ${WORKDIR}/libc/ + fi +} + +EXTRA_OECONF = "--with-glibc=${WORKDIR}/${EGLIBC_BRANCH}/libc" + +do_configure () { + ./configure ${EXTRA_OECONF} +} + + +do_install() { + install -d ${D}${bindir} + install -m 0755 ${S}/localedef ${D}${bindir}/cross-localedef +} diff --git a/meta/recipes-core/eglibc/eglibc-2.13/IO-acquire-lock-fix.patch b/meta/recipes-core/eglibc/eglibc-2.13/IO-acquire-lock-fix.patch deleted file mode 100644 index cf5803585..000000000 --- a/meta/recipes-core/eglibc/eglibc-2.13/IO-acquire-lock-fix.patch +++ /dev/null @@ -1,17 +0,0 @@ -import http://sourceware.org/ml/libc-ports/2007-12/msg00000.html - -Upstream-Status: Pending - -Index: libc/bits/stdio-lock.h -=================================================================== ---- libc.orig/bits/stdio-lock.h 2009-10-28 14:34:19.000000000 -0700 -+++ libc/bits/stdio-lock.h 2009-10-28 14:34:54.000000000 -0700 -@@ -50,6 +50,8 @@ __libc_lock_define_recursive (typedef, _ - _IO_cleanup_region_start ((void (*) (void *)) _IO_funlockfile, (_fp)); \ - _IO_flockfile (_fp) - -+# define _IO_acquire_lock_clear_flags2(_fp) _IO_acquire_lock (_fp) -+ - # define _IO_release_lock(_fp) \ - _IO_funlockfile (_fp); \ - _IO_cleanup_region_end (0) diff --git a/meta/recipes-core/eglibc/eglibc-2.13/eglibc-svn-arm-lowlevellock-include-tls.patch b/meta/recipes-core/eglibc/eglibc-2.13/eglibc-svn-arm-lowlevellock-include-tls.patch deleted file mode 100644 index 4313aa519..000000000 --- a/meta/recipes-core/eglibc/eglibc-2.13/eglibc-svn-arm-lowlevellock-include-tls.patch +++ /dev/null @@ -1,21 +0,0 @@ -In file included from ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c:21: -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c: In function '__lll_lock_wait_private': -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:34: warning: implicit declaration of function 'THREAD_GETMEM' -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:34: error: 'THREAD_SELF' undeclared (first use in this function) -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:34: error: (Each undeclared identifier is reported only once -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:34: error: for each function it appears in.) -../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:34: error: 'header' undeclared (first use in this function) -make[4]: *** [/var/tmp/portage/sys-libs/glibc-2.7-r1/work/build-default-armv4l-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os] Error 1 - -Upstream-Status: Pending - ---- libc/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h.orig -+++ libc/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h -@@ -25,6 +25,7 @@ - #include - #include - #include -+#include - - #define FUTEX_WAIT 0 - #define FUTEX_WAKE 1 diff --git a/meta/recipes-core/eglibc/eglibc-2.13/etc/ld.so.conf b/meta/recipes-core/eglibc/eglibc-2.13/etc/ld.so.conf deleted file mode 100644 index e69de29bb..000000000 diff --git a/meta/recipes-core/eglibc/eglibc-2.13/generate-supported.mk b/meta/recipes-core/eglibc/eglibc-2.13/generate-supported.mk deleted file mode 100644 index d2a28c2dc..000000000 --- a/meta/recipes-core/eglibc/eglibc-2.13/generate-supported.mk +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/make - -include $(IN) - -all: - rm -f $(OUT) - touch $(OUT) - for locale in $(SUPPORTED-LOCALES); do \ - [ $$locale = true ] && continue; \ - echo $$locale | sed 's,/, ,' >> $(OUT); \ - done diff --git a/meta/recipes-core/eglibc/eglibc-2.13/ld-search-order.patch b/meta/recipes-core/eglibc/eglibc-2.13/ld-search-order.patch deleted file mode 100644 index 40ae6d37f..000000000 --- a/meta/recipes-core/eglibc/eglibc-2.13/ld-search-order.patch +++ /dev/null @@ -1,56 +0,0 @@ -Upstream-Status: Inappropriate [embedded specific] - -The default lib search path order is: - - 1) LD_LIBRARY_PATH - 2) RPATH from the binary - 3) ld.so.cache - 4) default search paths embedded in the linker - -For nativesdk binaries which are being used alongside binaries on a host system, we -need the search paths to firstly search the shipped nativesdk libs but then also -cover the host system. For example we want the host system's libGL and this may be -in a non-standard location like /usr/lib/mesa. The only place the location is know -about is in the ld.so.cache of the host system. - -Since nativesdk has a simple structure and doesn't need to use a cache itself, we -repurpose the cache for use as a last resort in finding host system binaries. This -means we need to switch the order of 3 and 4 above to make this work effectively. - -RP 14/10/2010 - -Index: libc/elf/dl-load.c -=================================================================== ---- libc.orig/elf/dl-load.c -+++ libc/elf/dl-load.c -@@ -2107,6 +2107,15 @@ _dl_map_object (struct link_map *loader, - &loader->l_runpath_dirs, &realname, &fb, loader, - LA_SER_RUNPATH, &found_other_class); - -+ /* try the default path. */ -+ if (fd == -1 -+ && ((l = loader ?: GL(dl_ns)[nsid]._ns_loaded) == NULL -+ || __builtin_expect (!(l->l_flags_1 & DF_1_NODEFLIB), 1)) -+ && rtld_search_dirs.dirs != (void *) -1) -+ fd = open_path (name, namelen, mode & __RTLD_SECURE, &rtld_search_dirs, -+ &realname, &fb, l, LA_SER_DEFAULT, &found_other_class); -+ -+ /* Finally try ld.so.cache */ - if (fd == -1 - && (__builtin_expect (! (mode & __RTLD_SECURE), 1) - || ! INTUSE(__libc_enable_secure))) -@@ -2169,14 +2178,6 @@ _dl_map_object (struct link_map *loader, - } - } - -- /* Finally, try the default path. */ -- if (fd == -1 -- && ((l = loader ?: GL(dl_ns)[nsid]._ns_loaded) == NULL -- || __builtin_expect (!(l->l_flags_1 & DF_1_NODEFLIB), 1)) -- && rtld_search_dirs.dirs != (void *) -1) -- fd = open_path (name, namelen, mode & __RTLD_SECURE, &rtld_search_dirs, -- &realname, &fb, l, LA_SER_DEFAULT, &found_other_class); -- - /* Add another newline when we are tracing the library loading. */ - if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_LIBS, 0)) - _dl_debug_printf ("\n"); diff --git a/meta/recipes-core/eglibc/eglibc-2.13/mips-rld-map-check.patch b/meta/recipes-core/eglibc/eglibc-2.13/mips-rld-map-check.patch deleted file mode 100644 index 7772e6ffa..000000000 --- a/meta/recipes-core/eglibc/eglibc-2.13/mips-rld-map-check.patch +++ /dev/null @@ -1,26 +0,0 @@ -Upstream-Status: Pending - -On mips target, binutils currently sets DT_MIPS_RLD_MAP to 0 in dynamic -section if a --version-script sets _RLD_MAP to local. This is apparently -a binutils bug, but libc shouldn't segfault in this case. - -see also: http://sourceware.org/bugilla/show_bug.cgi?id=11615 - -9/19/2010 - added by Qing He - -Upstream-Status: Pending - ---- -diff -ru glibc-2.10.1.orig/ports/sysdeps/mips/dl-machine.h glibc-2.10.1/ports/sysdeps/mips/dl-machine.h ---- glibc-2.10.1.orig/ports/sysdeps/mips/dl-machine.h 2009-05-16 16:36:20.000000000 +0800 -+++ glibc-2.10.1/ports/sysdeps/mips/dl-machine.h 2010-09-19 09:11:53.000000000 +0800 -@@ -70,7 +70,8 @@ - /* If there is a DT_MIPS_RLD_MAP entry in the dynamic section, fill it in - with the run-time address of the r_debug structure */ - #define ELF_MACHINE_DEBUG_SETUP(l,r) \ --do { if ((l)->l_info[DT_MIPS (RLD_MAP)]) \ -+do { if ((l)->l_info[DT_MIPS (RLD_MAP)] && \ -+ (l)->l_info[DT_MIPS (RLD_MAP)]->d_un.d_ptr) \ - *(ElfW(Addr) *)((l)->l_info[DT_MIPS (RLD_MAP)]->d_un.d_ptr) = \ - (ElfW(Addr)) (r); \ - } while (0) diff --git a/meta/recipes-core/eglibc/eglibc-2.13/shorten-build-commands.patch b/meta/recipes-core/eglibc/eglibc-2.13/shorten-build-commands.patch deleted file mode 100644 index c17d58b28..000000000 --- a/meta/recipes-core/eglibc/eglibc-2.13/shorten-build-commands.patch +++ /dev/null @@ -1,83 +0,0 @@ -Upstream-Status: Pending - -Source: http://sourceware.org/ml/libc-alpha/2010-03/msg00064.html - -This patch scratches an itch. Each individual gcc command in the -glibc build is over 1K, which means it takes up a good chunk of my -terminal. Most of that is include paths. Any version of GCC new -enough to build glibc supports response files, which were added in -2005. So use a response file for the static list of include paths. -Now the build commands are a lot shorter, and easier to use when -developing glibc. - -Tested on x86_64-linux-gnu. Please apply if acceptable. - --- -Daniel Jacobowitz -CodeSourcery - -2010-03-30 Daniel Jacobowitz - - * Makeconfig (+common-includes): Define. - (+includes): Use @$(common-objpfx)includes. - * Makefile (postclean): Remove includes and includes.mk. - * Makerules ($(common-objpfx)includes.mk): Include and create - includes.mk. Create includes. - -Upstream-Status: Pending - -Index: libc/Makeconfig -=================================================================== ---- libc.orig/Makeconfig 2009-10-13 22:55:12.000000000 -0700 -+++ libc/Makeconfig 2010-03-31 16:02:37.120489733 -0700 -@@ -678,9 +678,10 @@ endif # $(+cflags) == "" - # library source directory, in the include directory, and in the - # current directory. - +sysdep-includes = $(addprefix -I,$(+sysdep_dirs)) -++common-includes = $(+sysdep-includes) $(includes) $(sysincludes) - +includes = -I$(..)include $(if $(subdir),$(objpfx:%/=-I%)) \ -- $(+sysdep-includes) $(includes) \ -- $(patsubst %/,-I%,$(..)) $(libio-include) -I. $(sysincludes) -+ @$(common-objpfx)includes \ -+ $(patsubst %/,-I%,$(..)) $(libio-include) -I. - - # Since libio has several internal header files, we use a -I instead - # of many little headers in the include directory. -Index: libc/Makefile -=================================================================== ---- libc.orig/Makefile 2009-12-09 12:06:28.000000000 -0800 -+++ libc/Makefile 2010-03-31 16:02:37.132481508 -0700 -@@ -247,7 +247,7 @@ parent-mostlyclean: common-mostlyclean # - parent-clean: parent-mostlyclean common-clean - - postclean = $(addprefix $(common-objpfx),$(postclean-generated)) \ -- $(addprefix $(objpfx),sysd-dirs sysd-rules) \ -+ $(addprefix $(objpfx),sysd-dirs sysd-rules includes includes.mk) \ - $(addprefix $(objpfx),sysd-sorted soversions.mk soversions.i) - - clean: parent-clean -Index: libc/Makerules -=================================================================== ---- libc.orig/Makerules 2009-12-09 12:06:28.000000000 -0800 -+++ libc/Makerules 2010-03-31 16:02:37.140481645 -0700 -@@ -254,6 +254,20 @@ ifndef sysd-rules-done - no_deps=t - endif - -+-include $(common-objpfx)includes.mk -+ifneq ($(+common-includes),$(saved-includes)) -+# Recreate includes.mk (and includes). -+includes-force = FORCE -+FORCE: -+endif -+$(common-objpfx)includes.mk: $(includes-force) -+ -@rm -f $@T $(common-objpfx)includesT -+ for inc in $(+common-includes); do echo "$$inc"; done \ -+ > $(common-objpfx)includesT -+ mv -f $(common-objpfx)includesT $(common-objpfx)includes -+ echo 'saved-includes := $(+common-includes)' > $@T -+ mv -f $@T $@ -+ - define o-iterator-doit - $(objpfx)%$o: %.S $(before-compile); $$(compile-command.S) - endef diff --git a/meta/recipes-core/eglibc/eglibc-2.13/stack-protector-test.patch b/meta/recipes-core/eglibc/eglibc-2.13/stack-protector-test.patch deleted file mode 100644 index dbf70a974..000000000 --- a/meta/recipes-core/eglibc/eglibc-2.13/stack-protector-test.patch +++ /dev/null @@ -1,35 +0,0 @@ -Test for -fstack-protector is compile only test. One might have the option but -might have build the compiler with --disable-ssp which means ssp should not be -enabled. Therefore we change the test to a link time test. It will fail if -libssp is not available. - -Upstream-Status: Pending - -Signed-off-by: Khem Raj - -Index: libc/configure -=================================================================== ---- libc.orig/configure -+++ libc/configure -@@ -6937,7 +6937,7 @@ if test "${libc_cv_ssp+set}" = set; then - $as_echo_n "(cached) " >&6 - else - if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -Werror -fstack-protector -- -o /dev/null -c -x c /dev/null 1>&5' -+ -o /dev/null -x c /dev/null 1>&5' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -Index: libc/configure.in -=================================================================== ---- libc.orig/configure.in -+++ libc/configure.in -@@ -1787,7 +1787,7 @@ AC_SUBST(fno_unit_at_a_time) - - AC_CACHE_CHECK(for -fstack-protector, libc_cv_ssp, [dnl - if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -Werror -fstack-protector -- -o /dev/null -c -x c /dev/null 1>&AS_MESSAGE_LOG_FD]) -+ -o /dev/null -x c /dev/null 1>&AS_MESSAGE_LOG_FD]) - then - libc_cv_ssp=yes - else diff --git a/meta/recipes-core/eglibc/eglibc-2.14/IO-acquire-lock-fix.patch b/meta/recipes-core/eglibc/eglibc-2.14/IO-acquire-lock-fix.patch new file mode 100644 index 000000000..cf5803585 --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc-2.14/IO-acquire-lock-fix.patch @@ -0,0 +1,17 @@ +import http://sourceware.org/ml/libc-ports/2007-12/msg00000.html + +Upstream-Status: Pending + +Index: libc/bits/stdio-lock.h +=================================================================== +--- libc.orig/bits/stdio-lock.h 2009-10-28 14:34:19.000000000 -0700 ++++ libc/bits/stdio-lock.h 2009-10-28 14:34:54.000000000 -0700 +@@ -50,6 +50,8 @@ __libc_lock_define_recursive (typedef, _ + _IO_cleanup_region_start ((void (*) (void *)) _IO_funlockfile, (_fp)); \ + _IO_flockfile (_fp) + ++# define _IO_acquire_lock_clear_flags2(_fp) _IO_acquire_lock (_fp) ++ + # define _IO_release_lock(_fp) \ + _IO_funlockfile (_fp); \ + _IO_cleanup_region_end (0) diff --git a/meta/recipes-core/eglibc/eglibc-2.14/eglibc-svn-arm-lowlevellock-include-tls.patch b/meta/recipes-core/eglibc/eglibc-2.14/eglibc-svn-arm-lowlevellock-include-tls.patch new file mode 100644 index 000000000..4313aa519 --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc-2.14/eglibc-svn-arm-lowlevellock-include-tls.patch @@ -0,0 +1,21 @@ +In file included from ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c:21: +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c: In function '__lll_lock_wait_private': +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:34: warning: implicit declaration of function 'THREAD_GETMEM' +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:34: error: 'THREAD_SELF' undeclared (first use in this function) +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:34: error: (Each undeclared identifier is reported only once +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:34: error: for each function it appears in.) +../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:34: error: 'header' undeclared (first use in this function) +make[4]: *** [/var/tmp/portage/sys-libs/glibc-2.7-r1/work/build-default-armv4l-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os] Error 1 + +Upstream-Status: Pending + +--- libc/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h.orig ++++ libc/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + + #define FUTEX_WAIT 0 + #define FUTEX_WAKE 1 diff --git a/meta/recipes-core/eglibc/eglibc-2.14/etc/ld.so.conf b/meta/recipes-core/eglibc/eglibc-2.14/etc/ld.so.conf new file mode 100644 index 000000000..e69de29bb diff --git a/meta/recipes-core/eglibc/eglibc-2.14/generate-supported.mk b/meta/recipes-core/eglibc/eglibc-2.14/generate-supported.mk new file mode 100644 index 000000000..d2a28c2dc --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc-2.14/generate-supported.mk @@ -0,0 +1,11 @@ +#!/usr/bin/make + +include $(IN) + +all: + rm -f $(OUT) + touch $(OUT) + for locale in $(SUPPORTED-LOCALES); do \ + [ $$locale = true ] && continue; \ + echo $$locale | sed 's,/, ,' >> $(OUT); \ + done diff --git a/meta/recipes-core/eglibc/eglibc-2.14/ld-search-order.patch b/meta/recipes-core/eglibc/eglibc-2.14/ld-search-order.patch new file mode 100644 index 000000000..40ae6d37f --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc-2.14/ld-search-order.patch @@ -0,0 +1,56 @@ +Upstream-Status: Inappropriate [embedded specific] + +The default lib search path order is: + + 1) LD_LIBRARY_PATH + 2) RPATH from the binary + 3) ld.so.cache + 4) default search paths embedded in the linker + +For nativesdk binaries which are being used alongside binaries on a host system, we +need the search paths to firstly search the shipped nativesdk libs but then also +cover the host system. For example we want the host system's libGL and this may be +in a non-standard location like /usr/lib/mesa. The only place the location is know +about is in the ld.so.cache of the host system. + +Since nativesdk has a simple structure and doesn't need to use a cache itself, we +repurpose the cache for use as a last resort in finding host system binaries. This +means we need to switch the order of 3 and 4 above to make this work effectively. + +RP 14/10/2010 + +Index: libc/elf/dl-load.c +=================================================================== +--- libc.orig/elf/dl-load.c ++++ libc/elf/dl-load.c +@@ -2107,6 +2107,15 @@ _dl_map_object (struct link_map *loader, + &loader->l_runpath_dirs, &realname, &fb, loader, + LA_SER_RUNPATH, &found_other_class); + ++ /* try the default path. */ ++ if (fd == -1 ++ && ((l = loader ?: GL(dl_ns)[nsid]._ns_loaded) == NULL ++ || __builtin_expect (!(l->l_flags_1 & DF_1_NODEFLIB), 1)) ++ && rtld_search_dirs.dirs != (void *) -1) ++ fd = open_path (name, namelen, mode & __RTLD_SECURE, &rtld_search_dirs, ++ &realname, &fb, l, LA_SER_DEFAULT, &found_other_class); ++ ++ /* Finally try ld.so.cache */ + if (fd == -1 + && (__builtin_expect (! (mode & __RTLD_SECURE), 1) + || ! INTUSE(__libc_enable_secure))) +@@ -2169,14 +2178,6 @@ _dl_map_object (struct link_map *loader, + } + } + +- /* Finally, try the default path. */ +- if (fd == -1 +- && ((l = loader ?: GL(dl_ns)[nsid]._ns_loaded) == NULL +- || __builtin_expect (!(l->l_flags_1 & DF_1_NODEFLIB), 1)) +- && rtld_search_dirs.dirs != (void *) -1) +- fd = open_path (name, namelen, mode & __RTLD_SECURE, &rtld_search_dirs, +- &realname, &fb, l, LA_SER_DEFAULT, &found_other_class); +- + /* Add another newline when we are tracing the library loading. */ + if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_LIBS, 0)) + _dl_debug_printf ("\n"); diff --git a/meta/recipes-core/eglibc/eglibc-2.14/mips-rld-map-check.patch b/meta/recipes-core/eglibc/eglibc-2.14/mips-rld-map-check.patch new file mode 100644 index 000000000..7772e6ffa --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc-2.14/mips-rld-map-check.patch @@ -0,0 +1,26 @@ +Upstream-Status: Pending + +On mips target, binutils currently sets DT_MIPS_RLD_MAP to 0 in dynamic +section if a --version-script sets _RLD_MAP to local. This is apparently +a binutils bug, but libc shouldn't segfault in this case. + +see also: http://sourceware.org/bugilla/show_bug.cgi?id=11615 + +9/19/2010 - added by Qing He + +Upstream-Status: Pending + +--- +diff -ru glibc-2.10.1.orig/ports/sysdeps/mips/dl-machine.h glibc-2.10.1/ports/sysdeps/mips/dl-machine.h +--- glibc-2.10.1.orig/ports/sysdeps/mips/dl-machine.h 2009-05-16 16:36:20.000000000 +0800 ++++ glibc-2.10.1/ports/sysdeps/mips/dl-machine.h 2010-09-19 09:11:53.000000000 +0800 +@@ -70,7 +70,8 @@ + /* If there is a DT_MIPS_RLD_MAP entry in the dynamic section, fill it in + with the run-time address of the r_debug structure */ + #define ELF_MACHINE_DEBUG_SETUP(l,r) \ +-do { if ((l)->l_info[DT_MIPS (RLD_MAP)]) \ ++do { if ((l)->l_info[DT_MIPS (RLD_MAP)] && \ ++ (l)->l_info[DT_MIPS (RLD_MAP)]->d_un.d_ptr) \ + *(ElfW(Addr) *)((l)->l_info[DT_MIPS (RLD_MAP)]->d_un.d_ptr) = \ + (ElfW(Addr)) (r); \ + } while (0) diff --git a/meta/recipes-core/eglibc/eglibc-2.14/shorten-build-commands.patch b/meta/recipes-core/eglibc/eglibc-2.14/shorten-build-commands.patch new file mode 100644 index 000000000..c17d58b28 --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc-2.14/shorten-build-commands.patch @@ -0,0 +1,83 @@ +Upstream-Status: Pending + +Source: http://sourceware.org/ml/libc-alpha/2010-03/msg00064.html + +This patch scratches an itch. Each individual gcc command in the +glibc build is over 1K, which means it takes up a good chunk of my +terminal. Most of that is include paths. Any version of GCC new +enough to build glibc supports response files, which were added in +2005. So use a response file for the static list of include paths. +Now the build commands are a lot shorter, and easier to use when +developing glibc. + +Tested on x86_64-linux-gnu. Please apply if acceptable. + +-- +Daniel Jacobowitz +CodeSourcery + +2010-03-30 Daniel Jacobowitz + + * Makeconfig (+common-includes): Define. + (+includes): Use @$(common-objpfx)includes. + * Makefile (postclean): Remove includes and includes.mk. + * Makerules ($(common-objpfx)includes.mk): Include and create + includes.mk. Create includes. + +Upstream-Status: Pending + +Index: libc/Makeconfig +=================================================================== +--- libc.orig/Makeconfig 2009-10-13 22:55:12.000000000 -0700 ++++ libc/Makeconfig 2010-03-31 16:02:37.120489733 -0700 +@@ -678,9 +678,10 @@ endif # $(+cflags) == "" + # library source directory, in the include directory, and in the + # current directory. + +sysdep-includes = $(addprefix -I,$(+sysdep_dirs)) +++common-includes = $(+sysdep-includes) $(includes) $(sysincludes) + +includes = -I$(..)include $(if $(subdir),$(objpfx:%/=-I%)) \ +- $(+sysdep-includes) $(includes) \ +- $(patsubst %/,-I%,$(..)) $(libio-include) -I. $(sysincludes) ++ @$(common-objpfx)includes \ ++ $(patsubst %/,-I%,$(..)) $(libio-include) -I. + + # Since libio has several internal header files, we use a -I instead + # of many little headers in the include directory. +Index: libc/Makefile +=================================================================== +--- libc.orig/Makefile 2009-12-09 12:06:28.000000000 -0800 ++++ libc/Makefile 2010-03-31 16:02:37.132481508 -0700 +@@ -247,7 +247,7 @@ parent-mostlyclean: common-mostlyclean # + parent-clean: parent-mostlyclean common-clean + + postclean = $(addprefix $(common-objpfx),$(postclean-generated)) \ +- $(addprefix $(objpfx),sysd-dirs sysd-rules) \ ++ $(addprefix $(objpfx),sysd-dirs sysd-rules includes includes.mk) \ + $(addprefix $(objpfx),sysd-sorted soversions.mk soversions.i) + + clean: parent-clean +Index: libc/Makerules +=================================================================== +--- libc.orig/Makerules 2009-12-09 12:06:28.000000000 -0800 ++++ libc/Makerules 2010-03-31 16:02:37.140481645 -0700 +@@ -254,6 +254,20 @@ ifndef sysd-rules-done + no_deps=t + endif + ++-include $(common-objpfx)includes.mk ++ifneq ($(+common-includes),$(saved-includes)) ++# Recreate includes.mk (and includes). ++includes-force = FORCE ++FORCE: ++endif ++$(common-objpfx)includes.mk: $(includes-force) ++ -@rm -f $@T $(common-objpfx)includesT ++ for inc in $(+common-includes); do echo "$$inc"; done \ ++ > $(common-objpfx)includesT ++ mv -f $(common-objpfx)includesT $(common-objpfx)includes ++ echo 'saved-includes := $(+common-includes)' > $@T ++ mv -f $@T $@ ++ + define o-iterator-doit + $(objpfx)%$o: %.S $(before-compile); $$(compile-command.S) + endef diff --git a/meta/recipes-core/eglibc/eglibc-2.14/stack-protector-test.patch b/meta/recipes-core/eglibc/eglibc-2.14/stack-protector-test.patch new file mode 100644 index 000000000..dbf70a974 --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc-2.14/stack-protector-test.patch @@ -0,0 +1,35 @@ +Test for -fstack-protector is compile only test. One might have the option but +might have build the compiler with --disable-ssp which means ssp should not be +enabled. Therefore we change the test to a link time test. It will fail if +libssp is not available. + +Upstream-Status: Pending + +Signed-off-by: Khem Raj + +Index: libc/configure +=================================================================== +--- libc.orig/configure ++++ libc/configure +@@ -6937,7 +6937,7 @@ if test "${libc_cv_ssp+set}" = set; then + $as_echo_n "(cached) " >&6 + else + if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -Werror -fstack-protector +- -o /dev/null -c -x c /dev/null 1>&5' ++ -o /dev/null -x c /dev/null 1>&5' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +Index: libc/configure.in +=================================================================== +--- libc.orig/configure.in ++++ libc/configure.in +@@ -1787,7 +1787,7 @@ AC_SUBST(fno_unit_at_a_time) + + AC_CACHE_CHECK(for -fstack-protector, libc_cv_ssp, [dnl + if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -Werror -fstack-protector +- -o /dev/null -c -x c /dev/null 1>&AS_MESSAGE_LOG_FD]) ++ -o /dev/null -x c /dev/null 1>&AS_MESSAGE_LOG_FD]) + then + libc_cv_ssp=yes + else diff --git a/meta/recipes-core/eglibc/eglibc-initial_2.13.bb b/meta/recipes-core/eglibc/eglibc-initial_2.13.bb deleted file mode 100644 index 787c76260..000000000 --- a/meta/recipes-core/eglibc/eglibc-initial_2.13.bb +++ /dev/null @@ -1,6 +0,0 @@ -require eglibc_${PV}.bb -require eglibc-initial.inc - -do_configure_prepend () { - unset CFLAGS -} diff --git a/meta/recipes-core/eglibc/eglibc-initial_2.14.bb b/meta/recipes-core/eglibc/eglibc-initial_2.14.bb new file mode 100644 index 000000000..787c76260 --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc-initial_2.14.bb @@ -0,0 +1,6 @@ +require eglibc_${PV}.bb +require eglibc-initial.inc + +do_configure_prepend () { + unset CFLAGS +} diff --git a/meta/recipes-core/eglibc/eglibc_2.13.bb b/meta/recipes-core/eglibc/eglibc_2.13.bb deleted file mode 100644 index 3490d2db9..000000000 --- a/meta/recipes-core/eglibc/eglibc_2.13.bb +++ /dev/null @@ -1,115 +0,0 @@ -require eglibc.inc - -SRCREV = "14157" - -DEPENDS += "gperf-native" -FILESPATHPKG =. "eglibc-svn:" -PR = "r2" -PR_append = "+svnr${SRCPV}" - -EGLIBC_BRANCH="eglibc-2_13" -SRC_URI = "svn://www.eglibc.org/svn/branches/;module=${EGLIBC_BRANCH};proto=http \ - file://eglibc-svn-arm-lowlevellock-include-tls.patch \ - file://IO-acquire-lock-fix.patch \ - file://shorten-build-commands.patch \ - file://mips-rld-map-check.patch \ - file://stack-protector-test.patch \ - file://etc/ld.so.conf \ - file://generate-supported.mk \ - " -LIC_FILES_CHKSUM = "file://LICENSES;md5=98a1128c4b58120182cbea3b1752d8b9 \ - file://COPYING;md5=393a5ca445f6965873eca0259a17f833 \ - file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \ - file://COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff " - -SRC_URI_append_virtclass-nativesdk = " file://ld-search-order.patch" -S = "${WORKDIR}/${EGLIBC_BRANCH}/libc" -B = "${WORKDIR}/build-${TARGET_SYS}" - -PACKAGES_DYNAMIC = "libc6*" -RPROVIDES_${PN}-dev = "libc6-dev virtual-libc-dev" -PROVIDES_${PN}-dbg = "glibc-dbg" - -# the -isystem in bitbake.conf screws up glibc do_stage -BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}" -TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${layout_includedir}" - -GLIBC_ADDONS ?= "ports,nptl,libidn" - -GLIBC_BROKEN_LOCALES = " _ER _ET so_ET yn_ER sid_ET tr_TR mn_MN gez_ET gez_ER bn_BD te_IN es_CR.ISO-8859-1" - -FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/eglibc-${PV}', '${FILE_DIRNAME}/eglibc', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}" - -# -# For now, we will skip building of a gcc package if it is a uclibc one -# and our build is not a uclibc one, and we skip a glibc one if our build -# is a uclibc build. -# -# See the note in gcc/gcc_3.4.0.oe -# - -python __anonymous () { - import bb, re - uc_os = (re.match('.*uclibc$', bb.data.getVar('TARGET_OS', d, 1)) != None) - if uc_os: - raise bb.parse.SkipPackage("incompatible with target %s" % - bb.data.getVar('TARGET_OS', d, 1)) -} - -export libc_cv_slibdir = "${base_libdir}" - -EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \ - --without-cvs --disable-profile --disable-debug --without-gd \ - --enable-clocale=gnu \ - --enable-add-ons=${GLIBC_ADDONS},ports \ - --with-headers=${STAGING_INCDIR} \ - --without-selinux \ - ${GLIBC_EXTRA_OECONF}" - -EXTRA_OECONF += "${@get_libc_fpu_setting(bb, d)}" - -do_unpack_append() { - bb.build.exec_func('do_move_ports', d) -} - -do_move_ports() { - if test -d ${WORKDIR}/${EGLIBC_BRANCH}/ports ; then - rm -rf ${S}/ports - mv ${WORKDIR}/${EGLIBC_BRANCH}/ports ${S}/ - fi -} - -do_configure () { -# override this function to avoid the autoconf/automake/aclocal/autoheader -# calls for now -# don't pass CPPFLAGS into configure, since it upsets the kernel-headers -# version check and doesn't really help with anything - if [ -z "`which rpcgen`" ]; then - echo "rpcgen not found. Install glibc-devel." - exit 1 - fi - (cd ${S} && gnu-configize) || die "failure in running gnu-configize" - find ${S} -name "configure" | xargs touch - CPPFLAGS="" oe_runconf -} - -rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \ - yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \ - rusers.x spray.x nfs_prot.x rquota.x key_prot.x" - -do_compile () { - # -Wl,-rpath-link /lib in LDFLAGS can cause breakage if another glibc is in staging - unset LDFLAGS - base_do_compile - ( - cd ${S}/sunrpc/rpcsvc - for r in ${rpcsvc}; do - h=`echo $r|sed -e's,\.x$,.h,'` - rpcgen -h $r -o $h || oewarn "unable to generate header for $r" - done - ) -} - -require eglibc-package.inc - -BBCLASSEXTEND = "nativesdk" diff --git a/meta/recipes-core/eglibc/eglibc_2.14.bb b/meta/recipes-core/eglibc/eglibc_2.14.bb new file mode 100644 index 000000000..8936d9ca9 --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc_2.14.bb @@ -0,0 +1,114 @@ +require eglibc.inc + +SRCREV = "14285" + +DEPENDS += "gperf-native" +PR = "r0" +PR_append = "+svnr${SRCPV}" + +EGLIBC_BRANCH="eglibc-2_14" +SRC_URI = "svn://www.eglibc.org/svn/branches/;module=${EGLIBC_BRANCH};proto=http \ + file://eglibc-svn-arm-lowlevellock-include-tls.patch \ + file://IO-acquire-lock-fix.patch \ + file://shorten-build-commands.patch \ + file://mips-rld-map-check.patch \ + file://stack-protector-test.patch \ + file://etc/ld.so.conf \ + file://generate-supported.mk \ + " +LIC_FILES_CHKSUM = "file://LICENSES;md5=98a1128c4b58120182cbea3b1752d8b9 \ + file://COPYING;md5=393a5ca445f6965873eca0259a17f833 \ + file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \ + file://COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff " + +SRC_URI_append_virtclass-nativesdk = " file://ld-search-order.patch" +S = "${WORKDIR}/${EGLIBC_BRANCH}/libc" +B = "${WORKDIR}/build-${TARGET_SYS}" + +PACKAGES_DYNAMIC = "libc6*" +RPROVIDES_${PN}-dev = "libc6-dev virtual-libc-dev" +PROVIDES_${PN}-dbg = "glibc-dbg" + +# the -isystem in bitbake.conf screws up glibc do_stage +BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}" +TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${layout_includedir}" + +GLIBC_ADDONS ?= "ports,nptl,libidn" + +GLIBC_BROKEN_LOCALES = " _ER _ET so_ET yn_ER sid_ET tr_TR mn_MN gez_ET gez_ER bn_BD te_IN es_CR.ISO-8859-1" + +FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/eglibc-${PV}', '${FILE_DIRNAME}/eglibc', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}" + +# +# For now, we will skip building of a gcc package if it is a uclibc one +# and our build is not a uclibc one, and we skip a glibc one if our build +# is a uclibc build. +# +# See the note in gcc/gcc_3.4.0.oe +# + +python __anonymous () { + import bb, re + uc_os = (re.match('.*uclibc$', bb.data.getVar('TARGET_OS', d, 1)) != None) + if uc_os: + raise bb.parse.SkipPackage("incompatible with target %s" % + bb.data.getVar('TARGET_OS', d, 1)) +} + +export libc_cv_slibdir = "${base_libdir}" + +EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \ + --without-cvs --disable-profile --disable-debug --without-gd \ + --enable-clocale=gnu \ + --enable-add-ons=${GLIBC_ADDONS},ports \ + --with-headers=${STAGING_INCDIR} \ + --without-selinux \ + ${GLIBC_EXTRA_OECONF}" + +EXTRA_OECONF += "${@get_libc_fpu_setting(bb, d)}" + +do_unpack_append() { + bb.build.exec_func('do_move_ports', d) +} + +do_move_ports() { + if test -d ${WORKDIR}/${EGLIBC_BRANCH}/ports ; then + rm -rf ${S}/ports + mv ${WORKDIR}/${EGLIBC_BRANCH}/ports ${S}/ + fi +} + +do_configure () { +# override this function to avoid the autoconf/automake/aclocal/autoheader +# calls for now +# don't pass CPPFLAGS into configure, since it upsets the kernel-headers +# version check and doesn't really help with anything + if [ -z "`which rpcgen`" ]; then + echo "rpcgen not found. Install glibc-devel." + exit 1 + fi + (cd ${S} && gnu-configize) || die "failure in running gnu-configize" + find ${S} -name "configure" | xargs touch + CPPFLAGS="" oe_runconf +} + +rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \ + yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \ + rusers.x spray.x nfs_prot.x rquota.x key_prot.x" + +do_compile () { + # -Wl,-rpath-link /lib in LDFLAGS can cause breakage if another glibc is in staging + unset LDFLAGS + base_do_compile + ( + cd ${S}/sunrpc/rpcsvc + for r in ${rpcsvc}; do + h=`echo $r|sed -e's,\.x$,.h,'` + rpcgen -h $r -o $h || oewarn "unable to generate header for $r" + done + ) +} + +require eglibc-package.inc + +BBCLASSEXTEND = "nativesdk" -- cgit v1.2.3