diff options
author | Khem Raj <raj.khem@gmail.com> | 2011-04-30 13:41:51 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-05-05 12:26:44 +0100 |
commit | f014269ea86391516fe28ecce52d223b7d78b5eb (patch) | |
tree | 187a97f3aeb2784fa9cfa510a5243c2b399080c4 | |
parent | a00b11ba879df1e667baacbcb4cab3276828c40b (diff) | |
download | poky-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>
13 files changed, 491 insertions, 1 deletions
diff --git a/meta/recipes-core/eglibc/cross-localedef-native_2.13.bb b/meta/recipes-core/eglibc/cross-localedef-native_2.13.bb new file mode 100644 index 0000000000..68ef86439d --- /dev/null +++ b/meta/recipes-core/eglibc/cross-localedef-native_2.13.bb | |||
@@ -0,0 +1,44 @@ | |||
1 | DESCRIPTION = "Cross locale generation tool for eglibc" | ||
2 | HOMEPAGE = "http://www.eglibc.org/home" | ||
3 | SECTION = "libs" | ||
4 | PRIORITY = "required" | ||
5 | LICENSE = "LGPL" | ||
6 | |||
7 | LIC_DIR = "${WORKDIR}/${EGLIBC_BRANCH}/libc" | ||
8 | LIC_FILES_CHKSUM = "file://${LIC_DIR}/LICENSES;md5=07a394b26e0902b9ffdec03765209770 \ | ||
9 | file://${LIC_DIR}/COPYING;md5=393a5ca445f6965873eca0259a17f833 \ | ||
10 | file://${LIC_DIR}/posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \ | ||
11 | file://${LIC_DIR}/COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff " | ||
12 | |||
13 | |||
14 | inherit native | ||
15 | inherit autotools | ||
16 | |||
17 | PR = "r1" | ||
18 | SRCREV="11982" | ||
19 | EGLIBC_BRANCH="eglibc-2_12" | ||
20 | SRC_URI = "svn://www.eglibc.org/svn/branches/;module=${EGLIBC_BRANCH};proto=http " | ||
21 | S = "${WORKDIR}/${EGLIBC_BRANCH}/localedef" | ||
22 | |||
23 | do_unpack_append() { | ||
24 | bb.build.exec_func('do_move_ports', d) | ||
25 | } | ||
26 | |||
27 | do_move_ports() { | ||
28 | if test -d ${WORKDIR}/${EGLIBC_BRANCH}/ports ; then | ||
29 | rm -rf ${WORKDIR}/libc/ports | ||
30 | mv ${WORKDIR}/${EGLIBC_BRANCH}/ports ${WORKDIR}/libc/ | ||
31 | fi | ||
32 | } | ||
33 | |||
34 | EXTRA_OECONF = "--with-glibc=${WORKDIR}/${EGLIBC_BRANCH}/libc" | ||
35 | |||
36 | do_configure () { | ||
37 | ./configure ${EXTRA_OECONF} | ||
38 | } | ||
39 | |||
40 | |||
41 | do_install() { | ||
42 | install -d ${D}${bindir} | ||
43 | install -m 0755 ${S}/localedef ${D}${bindir}/cross-localedef | ||
44 | } | ||
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 @@ | |||
1 | import http://sourceware.org/ml/libc-ports/2007-12/msg00000.html | ||
2 | |||
3 | Upstream-status: Pending | ||
4 | |||
5 | Index: 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 @@ | |||
1 | Needed to support ARMv4t machines | ||
2 | |||
3 | Upstream-status: Pending | ||
4 | |||
5 | Index: 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 | ||
22 | Index: 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]! | ||
39 | Index: 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)) | ||
58 | Index: 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 @@ | |||
1 | In 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) | ||
8 | 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 | ||
9 | |||
10 | Upstream-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 | |||
3 | include $(IN) | ||
4 | |||
5 | all: | ||
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 @@ | |||
1 | The 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 | |||
8 | For nativesdk binaries which are being used alongside binaries on a host system, we | ||
9 | need the search paths to firstly search the shipped nativesdk libs but then also | ||
10 | cover the host system. For example we want the host system's libGL and this may be | ||
11 | in a non-standard location like /usr/lib/mesa. The only place the location is know | ||
12 | about is in the ld.so.cache of the host system. | ||
13 | |||
14 | Since nativesdk has a simple structure and doesn't need to use a cache itself, we | ||
15 | repurpose the cache for use as a last resort in finding host system binaries. This | ||
16 | means we need to switch the order of 3 and 4 above to make this work effectively. | ||
17 | |||
18 | RP 14/10/2010 | ||
19 | |||
20 | Index: 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 @@ | |||
1 | On mips target, binutils currently sets DT_MIPS_RLD_MAP to 0 in dynamic | ||
2 | section if a --version-script sets _RLD_MAP to local. This is apparently | ||
3 | a binutils bug, but libc shouldn't segfault in this case. | ||
4 | |||
5 | see also: http://sourceware.org/bugilla/show_bug.cgi?id=11615 | ||
6 | |||
7 | 9/19/2010 - added by Qing He <qing.he@intel.com> | ||
8 | |||
9 | Upstream-status: Pending | ||
10 | |||
11 | --- | ||
12 | diff -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 @@ | |||
1 | Source: http://sourceware.org/ml/libc-alpha/2010-03/msg00064.html | ||
2 | |||
3 | This patch scratches an itch. Each individual gcc command in the | ||
4 | glibc build is over 1K, which means it takes up a good chunk of my | ||
5 | terminal. Most of that is include paths. Any version of GCC new | ||
6 | enough to build glibc supports response files, which were added in | ||
7 | 2005. So use a response file for the static list of include paths. | ||
8 | Now the build commands are a lot shorter, and easier to use when | ||
9 | developing glibc. | ||
10 | |||
11 | Tested on x86_64-linux-gnu. Please apply if acceptable. | ||
12 | |||
13 | -- | ||
14 | Daniel Jacobowitz | ||
15 | CodeSourcery | ||
16 | |||
17 | 2010-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 | |||
25 | Upstream-status: Pending | ||
26 | |||
27 | Index: 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. | ||
44 | Index: 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 | ||
57 | Index: 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 @@ | |||
1 | Test for -fstack-protector is compile only test. One might have the option but | ||
2 | might have build the compiler with --disable-ssp which means ssp should not be | ||
3 | enabled. Therefore we change the test to a link time test. It will fail if | ||
4 | libssp is not available. | ||
5 | |||
6 | Upstream-status: Pending | ||
7 | |||
8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
9 | |||
10 | Index: 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=$? | ||
23 | Index: 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 | ||
diff --git a/meta/recipes-core/eglibc/eglibc-common.inc b/meta/recipes-core/eglibc/eglibc-common.inc index a9b14766d6..a36011a458 100644 --- a/meta/recipes-core/eglibc/eglibc-common.inc +++ b/meta/recipes-core/eglibc/eglibc-common.inc | |||
@@ -5,7 +5,7 @@ SECTION = "libs" | |||
5 | PRIORITY = "required" | 5 | PRIORITY = "required" |
6 | LICENSE = "LGPL" | 6 | LICENSE = "LGPL" |
7 | INC_PR = "r11" | 7 | INC_PR = "r11" |
8 | LIC_FILES_CHKSUM = "file://LICENSES;md5=07a394b26e0902b9ffdec03765209770 \ | 8 | LIC_FILES_CHKSUM ?= "file://LICENSES;md5=07a394b26e0902b9ffdec03765209770 \ |
9 | file://COPYING;md5=393a5ca445f6965873eca0259a17f833 \ | 9 | file://COPYING;md5=393a5ca445f6965873eca0259a17f833 \ |
10 | file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \ | 10 | file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \ |
11 | file://COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff " | 11 | file://COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff " |
diff --git a/meta/recipes-core/eglibc/eglibc-initial_2.13.bb b/meta/recipes-core/eglibc/eglibc-initial_2.13.bb new file mode 100644 index 0000000000..787c762609 --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc-initial_2.13.bb | |||
@@ -0,0 +1,6 @@ | |||
1 | require eglibc_${PV}.bb | ||
2 | require eglibc-initial.inc | ||
3 | |||
4 | do_configure_prepend () { | ||
5 | unset CFLAGS | ||
6 | } | ||
diff --git a/meta/recipes-core/eglibc/eglibc_2.13.bb b/meta/recipes-core/eglibc/eglibc_2.13.bb new file mode 100644 index 0000000000..398da69e4b --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc_2.13.bb | |||
@@ -0,0 +1,115 @@ | |||
1 | require eglibc.inc | ||
2 | |||
3 | SRCREV = "13356" | ||
4 | |||
5 | DEPENDS += "gperf-native" | ||
6 | FILESPATHPKG =. "eglibc-svn:" | ||
7 | PR = "r0" | ||
8 | PR_append = "+svnr${SRCPV}" | ||
9 | |||
10 | EGLIBC_BRANCH="eglibc-2_13" | ||
11 | SRC_URI = "svn://www.eglibc.org/svn/branches/;module=${EGLIBC_BRANCH};proto=http \ | ||
12 | file://eglibc-svn-arm-lowlevellock-include-tls.patch \ | ||
13 | file://IO-acquire-lock-fix.patch \ | ||
14 | file://shorten-build-commands.patch \ | ||
15 | file://mips-rld-map-check.patch \ | ||
16 | file://stack-protector-test.patch \ | ||
17 | file://etc/ld.so.conf \ | ||
18 | file://generate-supported.mk \ | ||
19 | " | ||
20 | LIC_FILES_CHKSUM = "file://LICENSES;md5=98a1128c4b58120182cbea3b1752d8b9 \ | ||
21 | file://COPYING;md5=393a5ca445f6965873eca0259a17f833 \ | ||
22 | file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \ | ||
23 | file://COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff " | ||
24 | |||
25 | SRC_URI_append_virtclass-nativesdk = " file://ld-search-order.patch" | ||
26 | S = "${WORKDIR}/${EGLIBC_BRANCH}/libc" | ||
27 | B = "${WORKDIR}/build-${TARGET_SYS}" | ||
28 | |||
29 | PACKAGES_DYNAMIC = "libc6*" | ||
30 | RPROVIDES_${PN}-dev = "libc6-dev virtual-libc-dev" | ||
31 | PROVIDES_${PN}-dbg = "glibc-dbg" | ||
32 | |||
33 | # the -isystem in bitbake.conf screws up glibc do_stage | ||
34 | BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}" | ||
35 | TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${layout_includedir}" | ||
36 | |||
37 | GLIBC_ADDONS ?= "ports,nptl,libidn" | ||
38 | |||
39 | 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" | ||
40 | |||
41 | FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/eglibc-${PV}', '${FILE_DIRNAME}/eglibc', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}" | ||
42 | |||
43 | # | ||
44 | # For now, we will skip building of a gcc package if it is a uclibc one | ||
45 | # and our build is not a uclibc one, and we skip a glibc one if our build | ||
46 | # is a uclibc build. | ||
47 | # | ||
48 | # See the note in gcc/gcc_3.4.0.oe | ||
49 | # | ||
50 | |||
51 | python __anonymous () { | ||
52 | import bb, re | ||
53 | uc_os = (re.match('.*uclibc$', bb.data.getVar('TARGET_OS', d, 1)) != None) | ||
54 | if uc_os: | ||
55 | raise bb.parse.SkipPackage("incompatible with target %s" % | ||
56 | bb.data.getVar('TARGET_OS', d, 1)) | ||
57 | } | ||
58 | |||
59 | export libc_cv_slibdir = "${base_libdir}" | ||
60 | |||
61 | EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \ | ||
62 | --without-cvs --disable-profile --disable-debug --without-gd \ | ||
63 | --enable-clocale=gnu \ | ||
64 | --enable-add-ons=${GLIBC_ADDONS},ports \ | ||
65 | --with-headers=${STAGING_INCDIR} \ | ||
66 | --without-selinux \ | ||
67 | ${GLIBC_EXTRA_OECONF}" | ||
68 | |||
69 | EXTRA_OECONF += "${@get_libc_fpu_setting(bb, d)}" | ||
70 | |||
71 | do_unpack_append() { | ||
72 | bb.build.exec_func('do_move_ports', d) | ||
73 | } | ||
74 | |||
75 | do_move_ports() { | ||
76 | if test -d ${WORKDIR}/${EGLIBC_BRANCH}/ports ; then | ||
77 | rm -rf ${S}/ports | ||
78 | mv ${WORKDIR}/${EGLIBC_BRANCH}/ports ${S}/ | ||
79 | fi | ||
80 | } | ||
81 | |||
82 | do_configure () { | ||
83 | # override this function to avoid the autoconf/automake/aclocal/autoheader | ||
84 | # calls for now | ||
85 | # don't pass CPPFLAGS into configure, since it upsets the kernel-headers | ||
86 | # version check and doesn't really help with anything | ||
87 | if [ -z "`which rpcgen`" ]; then | ||
88 | echo "rpcgen not found. Install glibc-devel." | ||
89 | exit 1 | ||
90 | fi | ||
91 | (cd ${S} && gnu-configize) || die "failure in running gnu-configize" | ||
92 | find ${S} -name "configure" | xargs touch | ||
93 | CPPFLAGS="" oe_runconf | ||
94 | } | ||
95 | |||
96 | rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \ | ||
97 | yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \ | ||
98 | rusers.x spray.x nfs_prot.x rquota.x key_prot.x" | ||
99 | |||
100 | do_compile () { | ||
101 | # -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if another glibc is in staging | ||
102 | unset LDFLAGS | ||
103 | base_do_compile | ||
104 | ( | ||
105 | cd ${S}/sunrpc/rpcsvc | ||
106 | for r in ${rpcsvc}; do | ||
107 | h=`echo $r|sed -e's,\.x$,.h,'` | ||
108 | rpcgen -h $r -o $h || oewarn "unable to generate header for $r" | ||
109 | done | ||
110 | ) | ||
111 | } | ||
112 | |||
113 | require eglibc-package.inc | ||
114 | |||
115 | BBCLASSEXTEND = "nativesdk" | ||