summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/eglibc/eglibc-2.13
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2011-04-30 13:41:51 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-05-05 12:26:44 +0100
commitf014269ea86391516fe28ecce52d223b7d78b5eb (patch)
tree187a97f3aeb2784fa9cfa510a5243c2b399080c4 /meta/recipes-core/eglibc/eglibc-2.13
parenta00b11ba879df1e667baacbcb4cab3276828c40b (diff)
downloadpoky-f014269ea86391516fe28ecce52d223b7d78b5eb.tar.gz
eglibc-2.13: Add recipes for eglibc 2.13
Add patch to correct fstack-protector configure check Document all patches for eglibc 2.13 (From OE-Core rev: 31e12439ec7db3e50bfdc2c86d074891e3231ba5) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/eglibc/eglibc-2.13')
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.13/IO-acquire-lock-fix.patch17
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.13/armv4t-interworking.patch82
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.13/eglibc-svn-arm-lowlevellock-include-tls.patch21
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.13/etc/ld.so.conf0
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.13/generate-supported.mk11
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.13/ld-search-order.patch54
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.13/mips-rld-map-check.patch24
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.13/shorten-build-commands.patch81
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.13/stack-protector-test.patch35
9 files changed, 325 insertions, 0 deletions
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
new file mode 100644
index 0000000000..7bfb67c685
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.13/IO-acquire-lock-fix.patch
@@ -0,0 +1,17 @@
1import http://sourceware.org/ml/libc-ports/2007-12/msg00000.html
2
3Upstream-status: Pending
4
5Index: libc/bits/stdio-lock.h
6===================================================================
7--- libc.orig/bits/stdio-lock.h 2009-10-28 14:34:19.000000000 -0700
8+++ libc/bits/stdio-lock.h 2009-10-28 14:34:54.000000000 -0700
9@@ -50,6 +50,8 @@ __libc_lock_define_recursive (typedef, _
10 _IO_cleanup_region_start ((void (*) (void *)) _IO_funlockfile, (_fp)); \
11 _IO_flockfile (_fp)
12
13+# define _IO_acquire_lock_clear_flags2(_fp) _IO_acquire_lock (_fp)
14+
15 # define _IO_release_lock(_fp) \
16 _IO_funlockfile (_fp); \
17 _IO_cleanup_region_end (0)
diff --git a/meta/recipes-core/eglibc/eglibc-2.13/armv4t-interworking.patch b/meta/recipes-core/eglibc/eglibc-2.13/armv4t-interworking.patch
new file mode 100644
index 0000000000..945a8ff687
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.13/armv4t-interworking.patch
@@ -0,0 +1,82 @@
1Needed to support ARMv4t machines
2
3Upstream-status: Pending
4
5Index: libc/ports/sysdeps/arm/memcpy.S
6===================================================================
7--- libc.orig/ports/sysdeps/arm/memcpy.S 2009-09-03 16:12:00.000000000 -0700
8+++ libc/ports/sysdeps/arm/memcpy.S 2009-10-28 12:51:22.000000000 -0700
9@@ -130,7 +130,12 @@ ENTRY(memcpy)
10 strcsb r4, [r0], #1
11 strcsb ip, [r0]
12
13+#if defined (__ARM_ARCH_4T__) && defined(__THUMB_INTERWORK__)
14+ ldmfd sp!, {r0, r4, lr}
15+ bx lr
16+#else
17 ldmfd sp!, {r0, r4, pc}
18+#endif
19
20 9: rsb ip, ip, #4
21 cmp ip, #2
22Index: libc/ports/sysdeps/arm/memmove.S
23===================================================================
24--- libc.orig/ports/sysdeps/arm/memmove.S 2009-09-03 16:12:00.000000000 -0700
25+++ libc/ports/sysdeps/arm/memmove.S 2009-10-28 12:51:22.000000000 -0700
26@@ -144,7 +144,12 @@ ENTRY(memmove)
27 strneb r3, [r0, #-1]!
28 strcsb r4, [r0, #-1]!
29 strcsb ip, [r0, #-1]
30+#if defined (__ARM_ARCH_4T__) && defined (__THUMB_INTERWORK__)
31+ ldmfd sp!, {r0, r4, lr}
32+ bx lr
33+#else
34 ldmfd sp!, {r0, r4, pc}
35+#endif
36
37 9: cmp ip, #2
38 ldrgtb r3, [r1, #-1]!
39Index: libc/ports/sysdeps/unix/sysv/linux/arm/clone.S
40===================================================================
41--- libc.orig/ports/sysdeps/unix/sysv/linux/arm/clone.S 2009-09-03 16:12:04.000000000 -0700
42+++ libc/ports/sysdeps/unix/sysv/linux/arm/clone.S 2009-10-28 12:51:22.000000000 -0700
43@@ -96,8 +96,14 @@ ENTRY(__clone)
44 #endif
45 @ pick the function arg and call address off the stack and execute
46 ldr r0, [sp, #4]
47+#if defined(__ARM_ARCH_4T__) && defined(__THUMB_INTERWORK__)
48+ ldr ip, [sp], #8
49+ mov lr, pc
50+ bx ip
51+#else
52 mov lr, pc
53 ldr pc, [sp], #8
54+#endif
55
56 @ and we are done, passing the return value through r0
57 b PLTJMP(HIDDEN_JUMPTARGET(_exit))
58Index: libc/ports/sysdeps/unix/sysv/linux/arm/sysdep.h
59===================================================================
60--- libc.orig/ports/sysdeps/unix/sysv/linux/arm/sysdep.h 2009-09-16 13:58:18.000000000 +0100
61+++ libc/ports/sysdeps/unix/sysv/linux/arm/sysdep.h 2009-11-03 19:17:16.000000000 +0000
62@@ -129,6 +129,11 @@
63 DO_RET(lr); \
64 1: .word C_SYMBOL_NAME(rtld_errno) - 0b - 8;
65 # else
66+#if defined(__ARM_ARCH_4T__) && defined(__THUMB_INTERWORK__)
67+#define POP_PC ldr lr, [sp], #4; bx lr
68+#else
69+#define POP_PC ldr pc, [sp], #4
70+#endif
71 # define SYSCALL_ERROR_HANDLER \
72 __local_syscall_error: \
73 str lr, [sp, #-4]!; \
74@@ -138,7 +143,7 @@
75 rsb r1, r1, #0; \
76 str r1, [r0]; \
77 mvn r0, #0; \
78- ldr pc, [sp], #4;
79+ POP_PC;
80 # endif
81 #else
82 # define SYSCALL_ERROR_HANDLER /* Nothing here; code in sysdep.S is used. */
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
new file mode 100644
index 0000000000..a667d56b61
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.13/eglibc-svn-arm-lowlevellock-include-tls.patch
@@ -0,0 +1,21 @@
1In file included from ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c:21:
2../nptl/sysdeps/unix/sysv/linux/lowlevellock.c: In function '__lll_lock_wait_private':
3../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:34: warning: implicit declaration of function 'THREAD_GETMEM'
4../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:34: error: 'THREAD_SELF' undeclared (first use in this function)
5../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:34: error: (Each undeclared identifier is reported only once
6../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:34: error: for each function it appears in.)
7../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:34: error: 'header' undeclared (first use in this function)
8make[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
9
10Upstream-status: Pending
11
12--- libc/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h.orig
13+++ libc/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
14@@ -25,6 +25,7 @@
15 #include <atomic.h>
16 #include <sysdep.h>
17 #include <kernel-features.h>
18+#include <tls.h>
19
20 #define FUTEX_WAIT 0
21 #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
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.13/etc/ld.so.conf
diff --git a/meta/recipes-core/eglibc/eglibc-2.13/generate-supported.mk b/meta/recipes-core/eglibc/eglibc-2.13/generate-supported.mk
new file mode 100644
index 0000000000..d2a28c2dc6
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.13/generate-supported.mk
@@ -0,0 +1,11 @@
1#!/usr/bin/make
2
3include $(IN)
4
5all:
6 rm -f $(OUT)
7 touch $(OUT)
8 for locale in $(SUPPORTED-LOCALES); do \
9 [ $$locale = true ] && continue; \
10 echo $$locale | sed 's,/, ,' >> $(OUT); \
11 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
new file mode 100644
index 0000000000..f968678efb
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.13/ld-search-order.patch
@@ -0,0 +1,54 @@
1The default lib search path order is:
2
3 1) LD_LIBRARY_PATH
4 2) RPATH from the binary
5 3) ld.so.cache
6 4) default search paths embedded in the linker
7
8For nativesdk binaries which are being used alongside binaries on a host system, we
9need the search paths to firstly search the shipped nativesdk libs but then also
10cover the host system. For example we want the host system's libGL and this may be
11in a non-standard location like /usr/lib/mesa. The only place the location is know
12about is in the ld.so.cache of the host system.
13
14Since nativesdk has a simple structure and doesn't need to use a cache itself, we
15repurpose the cache for use as a last resort in finding host system binaries. This
16means we need to switch the order of 3 and 4 above to make this work effectively.
17
18RP 14/10/2010
19
20Index: libc/elf/dl-load.c
21===================================================================
22--- libc.orig/elf/dl-load.c
23+++ libc/elf/dl-load.c
24@@ -2107,6 +2107,15 @@ _dl_map_object (struct link_map *loader,
25 &loader->l_runpath_dirs, &realname, &fb, loader,
26 LA_SER_RUNPATH, &found_other_class);
27
28+ /* try the default path. */
29+ if (fd == -1
30+ && ((l = loader ?: GL(dl_ns)[nsid]._ns_loaded) == NULL
31+ || __builtin_expect (!(l->l_flags_1 & DF_1_NODEFLIB), 1))
32+ && rtld_search_dirs.dirs != (void *) -1)
33+ fd = open_path (name, namelen, mode & __RTLD_SECURE, &rtld_search_dirs,
34+ &realname, &fb, l, LA_SER_DEFAULT, &found_other_class);
35+
36+ /* Finally try ld.so.cache */
37 if (fd == -1
38 && (__builtin_expect (! (mode & __RTLD_SECURE), 1)
39 || ! INTUSE(__libc_enable_secure)))
40@@ -2169,14 +2178,6 @@ _dl_map_object (struct link_map *loader,
41 }
42 }
43
44- /* Finally, try the default path. */
45- if (fd == -1
46- && ((l = loader ?: GL(dl_ns)[nsid]._ns_loaded) == NULL
47- || __builtin_expect (!(l->l_flags_1 & DF_1_NODEFLIB), 1))
48- && rtld_search_dirs.dirs != (void *) -1)
49- fd = open_path (name, namelen, mode & __RTLD_SECURE, &rtld_search_dirs,
50- &realname, &fb, l, LA_SER_DEFAULT, &found_other_class);
51-
52 /* Add another newline when we are tracing the library loading. */
53 if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_LIBS, 0))
54 _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
new file mode 100644
index 0000000000..9424003a47
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.13/mips-rld-map-check.patch
@@ -0,0 +1,24 @@
1On mips target, binutils currently sets DT_MIPS_RLD_MAP to 0 in dynamic
2section if a --version-script sets _RLD_MAP to local. This is apparently
3a binutils bug, but libc shouldn't segfault in this case.
4
5see also: http://sourceware.org/bugilla/show_bug.cgi?id=11615
6
79/19/2010 - added by Qing He <qing.he@intel.com>
8
9Upstream-status: Pending
10
11---
12diff -ru glibc-2.10.1.orig/ports/sysdeps/mips/dl-machine.h glibc-2.10.1/ports/sysdeps/mips/dl-machine.h
13--- glibc-2.10.1.orig/ports/sysdeps/mips/dl-machine.h 2009-05-16 16:36:20.000000000 +0800
14+++ glibc-2.10.1/ports/sysdeps/mips/dl-machine.h 2010-09-19 09:11:53.000000000 +0800
15@@ -70,7 +70,8 @@
16 /* If there is a DT_MIPS_RLD_MAP entry in the dynamic section, fill it in
17 with the run-time address of the r_debug structure */
18 #define ELF_MACHINE_DEBUG_SETUP(l,r) \
19-do { if ((l)->l_info[DT_MIPS (RLD_MAP)]) \
20+do { if ((l)->l_info[DT_MIPS (RLD_MAP)] && \
21+ (l)->l_info[DT_MIPS (RLD_MAP)]->d_un.d_ptr) \
22 *(ElfW(Addr) *)((l)->l_info[DT_MIPS (RLD_MAP)]->d_un.d_ptr) = \
23 (ElfW(Addr)) (r); \
24 } 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
new file mode 100644
index 0000000000..7bd6d56feb
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.13/shorten-build-commands.patch
@@ -0,0 +1,81 @@
1Source: http://sourceware.org/ml/libc-alpha/2010-03/msg00064.html
2
3This patch scratches an itch. Each individual gcc command in the
4glibc build is over 1K, which means it takes up a good chunk of my
5terminal. Most of that is include paths. Any version of GCC new
6enough to build glibc supports response files, which were added in
72005. So use a response file for the static list of include paths.
8Now the build commands are a lot shorter, and easier to use when
9developing glibc.
10
11Tested on x86_64-linux-gnu. Please apply if acceptable.
12
13--
14Daniel Jacobowitz
15CodeSourcery
16
172010-03-30 Daniel Jacobowitz <dan@codesourcery.com>
18
19 * Makeconfig (+common-includes): Define.
20 (+includes): Use @$(common-objpfx)includes.
21 * Makefile (postclean): Remove includes and includes.mk.
22 * Makerules ($(common-objpfx)includes.mk): Include and create
23 includes.mk. Create includes.
24
25Upstream-status: Pending
26
27Index: libc/Makeconfig
28===================================================================
29--- libc.orig/Makeconfig 2009-10-13 22:55:12.000000000 -0700
30+++ libc/Makeconfig 2010-03-31 16:02:37.120489733 -0700
31@@ -678,9 +678,10 @@ endif # $(+cflags) == ""
32 # library source directory, in the include directory, and in the
33 # current directory.
34 +sysdep-includes = $(addprefix -I,$(+sysdep_dirs))
35++common-includes = $(+sysdep-includes) $(includes) $(sysincludes)
36 +includes = -I$(..)include $(if $(subdir),$(objpfx:%/=-I%)) \
37- $(+sysdep-includes) $(includes) \
38- $(patsubst %/,-I%,$(..)) $(libio-include) -I. $(sysincludes)
39+ @$(common-objpfx)includes \
40+ $(patsubst %/,-I%,$(..)) $(libio-include) -I.
41
42 # Since libio has several internal header files, we use a -I instead
43 # of many little headers in the include directory.
44Index: libc/Makefile
45===================================================================
46--- libc.orig/Makefile 2009-12-09 12:06:28.000000000 -0800
47+++ libc/Makefile 2010-03-31 16:02:37.132481508 -0700
48@@ -247,7 +247,7 @@ parent-mostlyclean: common-mostlyclean #
49 parent-clean: parent-mostlyclean common-clean
50
51 postclean = $(addprefix $(common-objpfx),$(postclean-generated)) \
52- $(addprefix $(objpfx),sysd-dirs sysd-rules) \
53+ $(addprefix $(objpfx),sysd-dirs sysd-rules includes includes.mk) \
54 $(addprefix $(objpfx),sysd-sorted soversions.mk soversions.i)
55
56 clean: parent-clean
57Index: libc/Makerules
58===================================================================
59--- libc.orig/Makerules 2009-12-09 12:06:28.000000000 -0800
60+++ libc/Makerules 2010-03-31 16:02:37.140481645 -0700
61@@ -254,6 +254,20 @@ ifndef sysd-rules-done
62 no_deps=t
63 endif
64
65+-include $(common-objpfx)includes.mk
66+ifneq ($(+common-includes),$(saved-includes))
67+# Recreate includes.mk (and includes).
68+includes-force = FORCE
69+FORCE:
70+endif
71+$(common-objpfx)includes.mk: $(includes-force)
72+ -@rm -f $@T $(common-objpfx)includesT
73+ for inc in $(+common-includes); do echo "$$inc"; done \
74+ > $(common-objpfx)includesT
75+ mv -f $(common-objpfx)includesT $(common-objpfx)includes
76+ echo 'saved-includes := $(+common-includes)' > $@T
77+ mv -f $@T $@
78+
79 define o-iterator-doit
80 $(objpfx)%$o: %.S $(before-compile); $$(compile-command.S)
81 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
new file mode 100644
index 0000000000..63a86c900e
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.13/stack-protector-test.patch
@@ -0,0 +1,35 @@
1Test for -fstack-protector is compile only test. One might have the option but
2might have build the compiler with --disable-ssp which means ssp should not be
3enabled. Therefore we change the test to a link time test. It will fail if
4libssp is not available.
5
6Upstream-status: Pending
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9
10Index: libc/configure
11===================================================================
12--- libc.orig/configure
13+++ libc/configure
14@@ -6937,7 +6937,7 @@ if test "${libc_cv_ssp+set}" = set; then
15 $as_echo_n "(cached) " >&6
16 else
17 if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -Werror -fstack-protector
18- -o /dev/null -c -x c /dev/null 1>&5'
19+ -o /dev/null -x c /dev/null 1>&5'
20 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21 (eval $ac_try) 2>&5
22 ac_status=$?
23Index: libc/configure.in
24===================================================================
25--- libc.orig/configure.in
26+++ libc/configure.in
27@@ -1787,7 +1787,7 @@ AC_SUBST(fno_unit_at_a_time)
28
29 AC_CACHE_CHECK(for -fstack-protector, libc_cv_ssp, [dnl
30 if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -Werror -fstack-protector
31- -o /dev/null -c -x c /dev/null 1>&AS_MESSAGE_LOG_FD])
32+ -o /dev/null -x c /dev/null 1>&AS_MESSAGE_LOG_FD])
33 then
34 libc_cv_ssp=yes
35 else