summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2011-09-15 18:33:12 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-09-28 14:58:51 +0100
commit3ae6040295723a79a4dc1202992aaad6c388b797 (patch)
tree3d7587468790389e9f43b082528d800d63871a3e /meta/recipes-core
parent46ad3b0e2c603ebbd510f59796bf44fcabe70aaa (diff)
downloadpoky-3ae6040295723a79a4dc1202992aaad6c388b797.tar.gz
eglibc: Add recipes for 2.14
Backport Fedora patch to enable sunrpc as it was in 2.13 Fix cross-localedef-native to be able to build from eglibc 2.14 branch Tested builds/boot of angstrom/console-image on qemu for arm,mips,ppc,i386,x86_64 (From OE-Core rev: bee3699510a31158f9e2095fe8b6e4cb75ed3651) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/eglibc/cross-localedef-native_2.14.bb44
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.14/IO-acquire-lock-fix.patch17
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.14/armv4-eabi-compile-fix.patch25
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.14/eglibc-rpc-export-again.patch69
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.14/eglibc-svn-arm-lowlevellock-include-tls.patch21
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.14/etc/ld.so.conf0
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.14/generate-supported.mk11
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.14/ld-search-order.patch56
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.14/mips-rld-map-check.patch26
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.14/multilib_readlib.patch17
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.14/ppc-sqrt.patch538
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.14/shorten-build-commands.patch82
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.14/stack-protector-test.patch35
-rw-r--r--meta/recipes-core/eglibc/eglibc-initial_2.14.bb6
-rw-r--r--meta/recipes-core/eglibc/eglibc-locale_2.14.bb1
-rw-r--r--meta/recipes-core/eglibc/eglibc_2.14.bb219
16 files changed, 1167 insertions, 0 deletions
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 0000000000..6f311fc33c
--- /dev/null
+++ b/meta/recipes-core/eglibc/cross-localedef-native_2.14.bb
@@ -0,0 +1,44 @@
1DESCRIPTION = "Cross locale generation tool for eglibc"
2HOMEPAGE = "http://www.eglibc.org/home"
3SECTION = "libs"
4LICENSE = "LGPL"
5
6LIC_DIR = "${WORKDIR}/${EGLIBC_BRANCH}/libc"
7LIC_FILES_CHKSUM = "file://${LIC_DIR}/LICENSES;md5=98a1128c4b58120182cbea3b1752d8b9\
8 file://${LIC_DIR}/COPYING;md5=393a5ca445f6965873eca0259a17f833 \
9 file://${LIC_DIR}/posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
10 file://${LIC_DIR}/COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff "
11
12
13inherit native
14inherit autotools
15
16PR = "r0"
17SRCREV="15225"
18EGLIBC_BRANCH="eglibc-2_14"
19SRC_URI = "svn://www.eglibc.org/svn/branches/;module=${EGLIBC_BRANCH};proto=http "
20S = "${WORKDIR}/${EGLIBC_BRANCH}/localedef"
21
22do_unpack_append() {
23 bb.build.exec_func('do_move_ports', d)
24}
25
26do_move_ports() {
27 if test -d ${WORKDIR}/${EGLIBC_BRANCH}/ports ; then
28 rm -rf ${WORKDIR}/libc/ports
29 mv ${WORKDIR}/${EGLIBC_BRANCH}/ports ${WORKDIR}/libc/
30 fi
31}
32
33EXTRA_OECONF = "--with-glibc=${WORKDIR}/${EGLIBC_BRANCH}/libc"
34CFLAGS += "-DNOT_IN_libc=1"
35
36do_configure () {
37 ./configure ${EXTRA_OECONF}
38}
39
40
41do_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.14/IO-acquire-lock-fix.patch b/meta/recipes-core/eglibc/eglibc-2.14/IO-acquire-lock-fix.patch
new file mode 100644
index 0000000000..cf5803585c
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.14/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.14/armv4-eabi-compile-fix.patch b/meta/recipes-core/eglibc/eglibc-2.14/armv4-eabi-compile-fix.patch
new file mode 100644
index 0000000000..c2407eea09
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.14/armv4-eabi-compile-fix.patch
@@ -0,0 +1,25 @@
1Source: http://sourceware.org/bugzilla/show_bug.cgi?id=12097
2Upstream-Status: Submitted
3
4The patch should be merged into glibc-ports
5
6-Khem
7Index: libc/ports/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S
8===================================================================
9--- libc.orig/ports/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S
10+++ libc/ports/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S
11@@ -16,6 +16,8 @@
12 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
13 02111-1307 USA. */
14
15+#if defined(__thumb__)
16+
17 #include <sysdep.h>
18
19 /* Out-of-line syscall stub. We expect the system call number in ip
20@@ -41,3 +43,5 @@ ENTRY (__libc_do_syscall)
21 pop {r7, pc}
22 .fnend
23 END (__libc_do_syscall)
24+
25+#endif /* __thumb__ */
diff --git a/meta/recipes-core/eglibc/eglibc-2.14/eglibc-rpc-export-again.patch b/meta/recipes-core/eglibc/eglibc-2.14/eglibc-rpc-export-again.patch
new file mode 100644
index 0000000000..24c0a33e43
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.14/eglibc-rpc-export-again.patch
@@ -0,0 +1,69 @@
1export the rpc symbols and headers again until we can get libtirpc sorted
2out as a proper and full replacement
3
4patch from fedora (if redhat can't get it to work as the maintainers of all
5these packages, then what chance do we have!)
6
7Index: libc/NEWS
8===================================================================
9--- libc.orig/NEWS 2011-09-09 10:46:36.000000000 -0700
10+++ libc/NEWS 2011-09-09 10:58:21.196279725 -0700
11@@ -20,16 +20,6 @@
12 12724, 12734, 12738, 12746, 12766, 12775, 12777, 12782, 12788, 12792,
13 12795, 12811, 12813, 12814, 12841
14
15-* The RPC implementation in libc is obsoleted. Old programs keep working
16- but new programs cannot be linked with the routines in libc anymore.
17- Programs in need of RPC functionality must be linked against TI-RPC.
18- The TI-RPC implementation is IPv6 enabled and there are other benefits.
19-
20- Visible changes of this change include (obviously) the inability to link
21- programs using RPC functions without referencing the TI-RPC library and the
22- removal of the RPC headers from the glibc headers.
23- Implemented by Ulrich Drepper.
24-
25 * New Linux interfaces: clock_adjtime, name_to_handle_at, open_by_handle_at,
26 syncfs, setns, sendmmsg
27
28Index: libc/include/libc-symbols.h
29===================================================================
30--- libc.orig/include/libc-symbols.h 2011-09-09 10:45:34.000000000 -0700
31+++ libc/include/libc-symbols.h 2011-09-09 10:58:21.196279725 -0700
32@@ -656,7 +656,7 @@
33 # define libc_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
34 # define libc_hidden_def(name) hidden_def (name)
35 # define libc_hidden_weak(name) hidden_weak (name)
36-# define libc_hidden_nolink(name, version) hidden_nolink (name, libc, version)
37+# define libc_hidden_nolink(name, version) hidden_def (name)
38 # define libc_hidden_ver(local, name) hidden_ver (local, name)
39 # define libc_hidden_data_def(name) hidden_data_def (name)
40 # define libc_hidden_data_weak(name) hidden_data_weak (name)
41Index: libc/nis/Makefile
42===================================================================
43--- libc.orig/nis/Makefile 2011-09-09 10:46:34.000000000 -0700
44+++ libc/nis/Makefile 2011-09-09 10:58:21.196279725 -0700
45@@ -25,9 +25,9 @@
46
47 aux := nis_hash
48
49+headers := $(wildcard rpcsvc/*.[hx])
50 distribute := nss-nis.h nss-nisplus.h nis_intern.h Banner \
51- nisplus-parser.h nis_xdr.h nss \
52- $(wildcard rpcsvc/*.[hx])
53+ nisplus-parser.h nis_xdr.h nss
54
55 # These are the databases available for the nis (and perhaps later nisplus)
56 # service. This must be a superset of the services in nss.
57Index: libc/sunrpc/Makefile
58===================================================================
59--- libc.orig/sunrpc/Makefile 2011-09-09 10:46:30.000000000 -0700
60+++ libc/sunrpc/Makefile 2011-09-09 10:59:10.726352375 -0700
61@@ -55,7 +55,7 @@
62 des_crypt.h)
63 headers-not-in-tirpc = $(addprefix rpc/,key_prot.h rpc_des.h) \
64 $(rpcsvc:%=rpcsvc/%) rpcsvc/bootparam.h
65-headers = rpc/netdb.h
66+headers = rpc/netdb.h $(headers-in-tirpc) $(headers-not-in-tirpc)
67 generated = $(rpcsvc:%.x=rpcsvc/%.h) $(rpcsvc:%.x=x%.c) $(rpcsvc:%.x=x%.stmp) \
68 $(rpcsvc:%.x=rpcsvc/%.stmp) rpcgen
69 generated-dirs := rpcsvc
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 0000000000..4313aa5197
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.14/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.14/etc/ld.so.conf b/meta/recipes-core/eglibc/eglibc-2.14/etc/ld.so.conf
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.14/etc/ld.so.conf
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 0000000000..d2a28c2dc6
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.14/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.14/ld-search-order.patch b/meta/recipes-core/eglibc/eglibc-2.14/ld-search-order.patch
new file mode 100644
index 0000000000..40ae6d37f4
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.14/ld-search-order.patch
@@ -0,0 +1,56 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3The default lib search path order is:
4
5 1) LD_LIBRARY_PATH
6 2) RPATH from the binary
7 3) ld.so.cache
8 4) default search paths embedded in the linker
9
10For nativesdk binaries which are being used alongside binaries on a host system, we
11need the search paths to firstly search the shipped nativesdk libs but then also
12cover the host system. For example we want the host system's libGL and this may be
13in a non-standard location like /usr/lib/mesa. The only place the location is know
14about is in the ld.so.cache of the host system.
15
16Since nativesdk has a simple structure and doesn't need to use a cache itself, we
17repurpose the cache for use as a last resort in finding host system binaries. This
18means we need to switch the order of 3 and 4 above to make this work effectively.
19
20RP 14/10/2010
21
22Index: libc/elf/dl-load.c
23===================================================================
24--- libc.orig/elf/dl-load.c
25+++ libc/elf/dl-load.c
26@@ -2107,6 +2107,15 @@ _dl_map_object (struct link_map *loader,
27 &loader->l_runpath_dirs, &realname, &fb, loader,
28 LA_SER_RUNPATH, &found_other_class);
29
30+ /* try the default path. */
31+ if (fd == -1
32+ && ((l = loader ?: GL(dl_ns)[nsid]._ns_loaded) == NULL
33+ || __builtin_expect (!(l->l_flags_1 & DF_1_NODEFLIB), 1))
34+ && rtld_search_dirs.dirs != (void *) -1)
35+ fd = open_path (name, namelen, mode & __RTLD_SECURE, &rtld_search_dirs,
36+ &realname, &fb, l, LA_SER_DEFAULT, &found_other_class);
37+
38+ /* Finally try ld.so.cache */
39 if (fd == -1
40 && (__builtin_expect (! (mode & __RTLD_SECURE), 1)
41 || ! INTUSE(__libc_enable_secure)))
42@@ -2169,14 +2178,6 @@ _dl_map_object (struct link_map *loader,
43 }
44 }
45
46- /* Finally, try the default path. */
47- if (fd == -1
48- && ((l = loader ?: GL(dl_ns)[nsid]._ns_loaded) == NULL
49- || __builtin_expect (!(l->l_flags_1 & DF_1_NODEFLIB), 1))
50- && rtld_search_dirs.dirs != (void *) -1)
51- fd = open_path (name, namelen, mode & __RTLD_SECURE, &rtld_search_dirs,
52- &realname, &fb, l, LA_SER_DEFAULT, &found_other_class);
53-
54 /* Add another newline when we are tracing the library loading. */
55 if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_LIBS, 0))
56 _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 0000000000..9b646fea95
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.14/mips-rld-map-check.patch
@@ -0,0 +1,26 @@
1
2On mips target, binutils currently sets DT_MIPS_RLD_MAP to 0 in dynamic
3section if a --version-script sets _RLD_MAP to local. This is apparently
4a binutils bug, but libc shouldn't segfault in this case.
5
6see also: http://sourceware.org/bugilla/show_bug.cgi?id=11615
7
8Upstream-Status: Pending
9
109/19/2010 - added by Qing He <qing.he@intel.com>
11
12
13---
14diff -ru glibc-2.10.1.orig/ports/sysdeps/mips/dl-machine.h glibc-2.10.1/ports/sysdeps/mips/dl-machine.h
15--- glibc-2.10.1.orig/ports/sysdeps/mips/dl-machine.h 2009-05-16 16:36:20.000000000 +0800
16+++ glibc-2.10.1/ports/sysdeps/mips/dl-machine.h 2010-09-19 09:11:53.000000000 +0800
17@@ -70,7 +70,8 @@
18 /* If there is a DT_MIPS_RLD_MAP entry in the dynamic section, fill it in
19 with the run-time address of the r_debug structure */
20 #define ELF_MACHINE_DEBUG_SETUP(l,r) \
21-do { if ((l)->l_info[DT_MIPS (RLD_MAP)]) \
22+do { if ((l)->l_info[DT_MIPS (RLD_MAP)] && \
23+ (l)->l_info[DT_MIPS (RLD_MAP)]->d_un.d_ptr) \
24 *(ElfW(Addr) *)((l)->l_info[DT_MIPS (RLD_MAP)]->d_un.d_ptr) = \
25 (ElfW(Addr)) (r); \
26 } while (0)
diff --git a/meta/recipes-core/eglibc/eglibc-2.14/multilib_readlib.patch b/meta/recipes-core/eglibc/eglibc-2.14/multilib_readlib.patch
new file mode 100644
index 0000000000..1542b1b519
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.14/multilib_readlib.patch
@@ -0,0 +1,17 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3Replace the OECORE_KNOWN_INTERPRETER_NAMES with the value of
4variable EGLIBC_KNOWN_INTERPRETER_NAMES.
5
6Lianhao Lu, 08/01/2011
7
8--- libc/elf/readlib.c.orig 2011-08-12 17:05:51.864470837 +0800
9+++ libc/elf/readlib.c 2011-08-12 17:06:39.346942074 +0800
10@@ -52,6 +52,7 @@
11 #ifdef SYSDEP_KNOWN_INTERPRETER_NAMES
12 SYSDEP_KNOWN_INTERPRETER_NAMES
13 #endif
14+ OECORE_KNOWN_INTERPRETER_NAMES
15 };
16
17 static struct known_names known_libs[] =
diff --git a/meta/recipes-core/eglibc/eglibc-2.14/ppc-sqrt.patch b/meta/recipes-core/eglibc/eglibc-2.14/ppc-sqrt.patch
new file mode 100644
index 0000000000..203040c15c
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.14/ppc-sqrt.patch
@@ -0,0 +1,538 @@
1Upstream-Status: Pending
2
32011-03-22 Joseph Myers <joseph@codesourcery.com>
4
5 Merge from SG++ 2.11:
6
7 2010-10-05 Nathan Froyd <froydnj@codesourcery.com>
8
9 Issue #9382
10
11 * sysdeps/powerpc/powerpc32/603e/: New directory.
12 * sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/: New directory.
13 * sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/: New directory.
14 * sysdeps/unix/sysv/linux/powerpc/powerpc32/7400/: New directory.
15 * sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c: Update.
16 * sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c: Update.
17 * sysdeps/powerpc/powerpc64/e5500/fpu/Implies: New file.
18
19Index: libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
20===================================================================
21--- /dev/null
22+++ libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
23@@ -0,0 +1,134 @@
24+/* Double-precision floating point square root.
25+ Copyright (C) 2010 Free Software Foundation, Inc.
26+ This file is part of the GNU C Library.
27+
28+ The GNU C Library is free software; you can redistribute it and/or
29+ modify it under the terms of the GNU Lesser General Public
30+ License as published by the Free Software Foundation; either
31+ version 2.1 of the License, or (at your option) any later version.
32+
33+ The GNU C Library is distributed in the hope that it will be useful,
34+ but WITHOUT ANY WARRANTY; without even the implied warranty of
35+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
36+ Lesser General Public License for more details.
37+
38+ You should have received a copy of the GNU Lesser General Public
39+ License along with the GNU C Library; if not, write to the Free
40+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
41+ 02111-1307 USA. */
42+
43+#include <math.h>
44+#include <math_private.h>
45+#include <fenv_libc.h>
46+#include <inttypes.h>
47+
48+#include <sysdep.h>
49+#include <ldsodefs.h>
50+
51+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
52+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
53+static const float two108 = 3.245185536584267269e+32;
54+static const float twom54 = 5.551115123125782702e-17;
55+static const float half = 0.5;
56+
57+/* The method is based on the descriptions in:
58+
59+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
60+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
61+
62+ We find the actual square root and half of its reciprocal
63+ simultaneously. */
64+
65+#ifdef __STDC__
66+double
67+__ieee754_sqrt (double b)
68+#else
69+double
70+__ieee754_sqrt (b)
71+ double b;
72+#endif
73+{
74+ if (__builtin_expect (b > 0, 1))
75+ {
76+ double y, g, h, d, r;
77+ ieee_double_shape_type u;
78+
79+ if (__builtin_expect (b != a_inf.value, 1))
80+ {
81+ fenv_t fe;
82+
83+ fe = fegetenv_register ();
84+
85+ u.value = b;
86+
87+ relax_fenv_state ();
88+
89+ __asm__ ("frsqrte %[estimate], %[x]\n"
90+ : [estimate] "=f" (y) : [x] "f" (b));
91+
92+ /* Following Muller et al, page 168, equation 5.20.
93+
94+ h goes to 1/(2*sqrt(b))
95+ g goes to sqrt(b).
96+
97+ We need three iterations to get within 1ulp. */
98+
99+ /* Indicate that these can be performed prior to the branch. GCC
100+ insists on sinking them below the branch, however; it seems like
101+ they'd be better before the branch so that we can cover any latency
102+ from storing the argument and loading its high word. Oh well. */
103+
104+ g = b * y;
105+ h = 0.5 * y;
106+
107+ /* Handle small numbers by scaling. */
108+ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
109+ return __ieee754_sqrt (b * two108) * twom54;
110+
111+#define FMADD(a_, c_, b_) \
112+ ({ double __r; \
113+ __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \
114+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
115+ __r;})
116+#define FNMSUB(a_, c_, b_) \
117+ ({ double __r; \
118+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
119+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
120+ __r;})
121+
122+ r = FNMSUB (g, h, half);
123+ g = FMADD (g, r, g);
124+ h = FMADD (h, r, h);
125+
126+ r = FNMSUB (g, h, half);
127+ g = FMADD (g, r, g);
128+ h = FMADD (h, r, h);
129+
130+ r = FNMSUB (g, h, half);
131+ g = FMADD (g, r, g);
132+ h = FMADD (h, r, h);
133+
134+ /* g is now +/- 1ulp, or exactly equal to, the square root of b. */
135+
136+ /* Final refinement. */
137+ d = FNMSUB (g, g, b);
138+
139+ fesetenv_register (fe);
140+ return FMADD (d, h, g);
141+ }
142+ }
143+ else if (b < 0)
144+ {
145+ /* For some reason, some PowerPC32 processors don't implement
146+ FE_INVALID_SQRT. */
147+#ifdef FE_INVALID_SQRT
148+ feraiseexcept (FE_INVALID_SQRT);
149+
150+ fenv_union_t u = { .fenv = fegetenv_register () };
151+ if ((u.l[1] & FE_INVALID) == 0)
152+#endif
153+ feraiseexcept (FE_INVALID);
154+ b = a_nan.value;
155+ }
156+ return f_wash (b);
157+}
158Index: libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
159===================================================================
160--- /dev/null
161+++ libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
162@@ -0,0 +1,101 @@
163+/* Single-precision floating point square root.
164+ Copyright (C) 2010 Free Software Foundation, Inc.
165+ This file is part of the GNU C Library.
166+
167+ The GNU C Library is free software; you can redistribute it and/or
168+ modify it under the terms of the GNU Lesser General Public
169+ License as published by the Free Software Foundation; either
170+ version 2.1 of the License, or (at your option) any later version.
171+
172+ The GNU C Library is distributed in the hope that it will be useful,
173+ but WITHOUT ANY WARRANTY; without even the implied warranty of
174+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
175+ Lesser General Public License for more details.
176+
177+ You should have received a copy of the GNU Lesser General Public
178+ License along with the GNU C Library; if not, write to the Free
179+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
180+ 02111-1307 USA. */
181+
182+#include <math.h>
183+#include <math_private.h>
184+#include <fenv_libc.h>
185+#include <inttypes.h>
186+
187+#include <sysdep.h>
188+#include <ldsodefs.h>
189+
190+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
191+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
192+static const float threehalf = 1.5;
193+
194+/* The method is based on the descriptions in:
195+
196+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
197+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
198+
199+ We find the reciprocal square root and use that to compute the actual
200+ square root. */
201+
202+#ifdef __STDC__
203+float
204+__ieee754_sqrtf (float b)
205+#else
206+float
207+__ieee754_sqrtf (b)
208+ float b;
209+#endif
210+{
211+ if (__builtin_expect (b > 0, 1))
212+ {
213+#define FMSUB(a_, c_, b_) \
214+ ({ double __r; \
215+ __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \
216+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
217+ __r;})
218+#define FNMSUB(a_, c_, b_) \
219+ ({ double __r; \
220+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
221+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
222+ __r;})
223+
224+ if (__builtin_expect (b != a_inf.value, 1))
225+ {
226+ double y, x;
227+ fenv_t fe;
228+
229+ fe = fegetenv_register ();
230+
231+ relax_fenv_state ();
232+
233+ /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */
234+ y = FMSUB (threehalf, b, b);
235+
236+ /* Initial estimate. */
237+ __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b));
238+
239+ /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */
240+ x = x * FNMSUB (y, x * x, threehalf);
241+ x = x * FNMSUB (y, x * x, threehalf);
242+ x = x * FNMSUB (y, x * x, threehalf);
243+
244+ /* All done. */
245+ fesetenv_register (fe);
246+ return x * b;
247+ }
248+ }
249+ else if (b < 0)
250+ {
251+ /* For some reason, some PowerPC32 processors don't implement
252+ FE_INVALID_SQRT. */
253+#ifdef FE_INVALID_SQRT
254+ feraiseexcept (FE_INVALID_SQRT);
255+
256+ fenv_union_t u = { .fenv = fegetenv_register () };
257+ if ((u.l[1] & FE_INVALID) == 0)
258+#endif
259+ feraiseexcept (FE_INVALID);
260+ b = a_nan.value;
261+ }
262+ return f_washf (b);
263+}
264Index: libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
265===================================================================
266--- /dev/null
267+++ libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
268@@ -0,0 +1,134 @@
269+/* Double-precision floating point square root.
270+ Copyright (C) 2010 Free Software Foundation, Inc.
271+ This file is part of the GNU C Library.
272+
273+ The GNU C Library is free software; you can redistribute it and/or
274+ modify it under the terms of the GNU Lesser General Public
275+ License as published by the Free Software Foundation; either
276+ version 2.1 of the License, or (at your option) any later version.
277+
278+ The GNU C Library is distributed in the hope that it will be useful,
279+ but WITHOUT ANY WARRANTY; without even the implied warranty of
280+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
281+ Lesser General Public License for more details.
282+
283+ You should have received a copy of the GNU Lesser General Public
284+ License along with the GNU C Library; if not, write to the Free
285+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
286+ 02111-1307 USA. */
287+
288+#include <math.h>
289+#include <math_private.h>
290+#include <fenv_libc.h>
291+#include <inttypes.h>
292+
293+#include <sysdep.h>
294+#include <ldsodefs.h>
295+
296+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
297+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
298+static const float two108 = 3.245185536584267269e+32;
299+static const float twom54 = 5.551115123125782702e-17;
300+static const float half = 0.5;
301+
302+/* The method is based on the descriptions in:
303+
304+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
305+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
306+
307+ We find the actual square root and half of its reciprocal
308+ simultaneously. */
309+
310+#ifdef __STDC__
311+double
312+__ieee754_sqrt (double b)
313+#else
314+double
315+__ieee754_sqrt (b)
316+ double b;
317+#endif
318+{
319+ if (__builtin_expect (b > 0, 1))
320+ {
321+ double y, g, h, d, r;
322+ ieee_double_shape_type u;
323+
324+ if (__builtin_expect (b != a_inf.value, 1))
325+ {
326+ fenv_t fe;
327+
328+ fe = fegetenv_register ();
329+
330+ u.value = b;
331+
332+ relax_fenv_state ();
333+
334+ __asm__ ("frsqrte %[estimate], %[x]\n"
335+ : [estimate] "=f" (y) : [x] "f" (b));
336+
337+ /* Following Muller et al, page 168, equation 5.20.
338+
339+ h goes to 1/(2*sqrt(b))
340+ g goes to sqrt(b).
341+
342+ We need three iterations to get within 1ulp. */
343+
344+ /* Indicate that these can be performed prior to the branch. GCC
345+ insists on sinking them below the branch, however; it seems like
346+ they'd be better before the branch so that we can cover any latency
347+ from storing the argument and loading its high word. Oh well. */
348+
349+ g = b * y;
350+ h = 0.5 * y;
351+
352+ /* Handle small numbers by scaling. */
353+ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
354+ return __ieee754_sqrt (b * two108) * twom54;
355+
356+#define FMADD(a_, c_, b_) \
357+ ({ double __r; \
358+ __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \
359+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
360+ __r;})
361+#define FNMSUB(a_, c_, b_) \
362+ ({ double __r; \
363+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
364+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
365+ __r;})
366+
367+ r = FNMSUB (g, h, half);
368+ g = FMADD (g, r, g);
369+ h = FMADD (h, r, h);
370+
371+ r = FNMSUB (g, h, half);
372+ g = FMADD (g, r, g);
373+ h = FMADD (h, r, h);
374+
375+ r = FNMSUB (g, h, half);
376+ g = FMADD (g, r, g);
377+ h = FMADD (h, r, h);
378+
379+ /* g is now +/- 1ulp, or exactly equal to, the square root of b. */
380+
381+ /* Final refinement. */
382+ d = FNMSUB (g, g, b);
383+
384+ fesetenv_register (fe);
385+ return FMADD (d, h, g);
386+ }
387+ }
388+ else if (b < 0)
389+ {
390+ /* For some reason, some PowerPC32 processors don't implement
391+ FE_INVALID_SQRT. */
392+#ifdef FE_INVALID_SQRT
393+ feraiseexcept (FE_INVALID_SQRT);
394+
395+ fenv_union_t u = { .fenv = fegetenv_register () };
396+ if ((u.l[1] & FE_INVALID) == 0)
397+#endif
398+ feraiseexcept (FE_INVALID);
399+ b = a_nan.value;
400+ }
401+ return f_wash (b);
402+}
403Index: libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
404===================================================================
405--- /dev/null
406+++ libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
407@@ -0,0 +1,101 @@
408+/* Single-precision floating point square root.
409+ Copyright (C) 2010 Free Software Foundation, Inc.
410+ This file is part of the GNU C Library.
411+
412+ The GNU C Library is free software; you can redistribute it and/or
413+ modify it under the terms of the GNU Lesser General Public
414+ License as published by the Free Software Foundation; either
415+ version 2.1 of the License, or (at your option) any later version.
416+
417+ The GNU C Library is distributed in the hope that it will be useful,
418+ but WITHOUT ANY WARRANTY; without even the implied warranty of
419+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
420+ Lesser General Public License for more details.
421+
422+ You should have received a copy of the GNU Lesser General Public
423+ License along with the GNU C Library; if not, write to the Free
424+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
425+ 02111-1307 USA. */
426+
427+#include <math.h>
428+#include <math_private.h>
429+#include <fenv_libc.h>
430+#include <inttypes.h>
431+
432+#include <sysdep.h>
433+#include <ldsodefs.h>
434+
435+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
436+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
437+static const float threehalf = 1.5;
438+
439+/* The method is based on the descriptions in:
440+
441+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
442+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
443+
444+ We find the reciprocal square root and use that to compute the actual
445+ square root. */
446+
447+#ifdef __STDC__
448+float
449+__ieee754_sqrtf (float b)
450+#else
451+float
452+__ieee754_sqrtf (b)
453+ float b;
454+#endif
455+{
456+ if (__builtin_expect (b > 0, 1))
457+ {
458+#define FMSUB(a_, c_, b_) \
459+ ({ double __r; \
460+ __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \
461+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
462+ __r;})
463+#define FNMSUB(a_, c_, b_) \
464+ ({ double __r; \
465+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
466+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
467+ __r;})
468+
469+ if (__builtin_expect (b != a_inf.value, 1))
470+ {
471+ double y, x;
472+ fenv_t fe;
473+
474+ fe = fegetenv_register ();
475+
476+ relax_fenv_state ();
477+
478+ /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */
479+ y = FMSUB (threehalf, b, b);
480+
481+ /* Initial estimate. */
482+ __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b));
483+
484+ /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */
485+ x = x * FNMSUB (y, x * x, threehalf);
486+ x = x * FNMSUB (y, x * x, threehalf);
487+ x = x * FNMSUB (y, x * x, threehalf);
488+
489+ /* All done. */
490+ fesetenv_register (fe);
491+ return x * b;
492+ }
493+ }
494+ else if (b < 0)
495+ {
496+ /* For some reason, some PowerPC32 processors don't implement
497+ FE_INVALID_SQRT. */
498+#ifdef FE_INVALID_SQRT
499+ feraiseexcept (FE_INVALID_SQRT);
500+
501+ fenv_union_t u = { .fenv = fegetenv_register () };
502+ if ((u.l[1] & FE_INVALID) == 0)
503+#endif
504+ feraiseexcept (FE_INVALID);
505+ b = a_nan.value;
506+ }
507+ return f_washf (b);
508+}
509Index: libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies
510===================================================================
511--- /dev/null
512+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies
513@@ -0,0 +1 @@
514+powerpc/powerpc32/603e/fpu
515Index: libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/7400/fpu/Implies
516===================================================================
517--- /dev/null
518+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/7400/fpu/Implies
519@@ -0,0 +1 @@
520+powerpc/powerpc32/603e/fpu
521Index: libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies
522===================================================================
523--- /dev/null
524+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies
525@@ -0,0 +1 @@
526+powerpc/powerpc32/603e/fpu
527Index: libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies
528===================================================================
529--- /dev/null
530+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies
531@@ -0,0 +1 @@
532+powerpc/powerpc64/e5500/fpu
533Index: libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies
534===================================================================
535--- /dev/null
536+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies
537@@ -0,0 +1 @@
538+powerpc/powerpc32/603e/fpu
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 0000000000..080568d9c2
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.14/shorten-build-commands.patch
@@ -0,0 +1,82 @@
1
2Source: http://sourceware.org/ml/libc-alpha/2010-03/msg00064.html
3
4This patch scratches an itch. Each individual gcc command in the
5glibc build is over 1K, which means it takes up a good chunk of my
6terminal. Most of that is include paths. Any version of GCC new
7enough to build glibc supports response files, which were added in
82005. So use a response file for the static list of include paths.
9Now the build commands are a lot shorter, and easier to use when
10developing glibc.
11
12Tested on x86_64-linux-gnu. Please apply if acceptable.
13
14--
15Daniel Jacobowitz
16CodeSourcery
17
182010-03-30 Daniel Jacobowitz <dan@codesourcery.com>
19
20 * Makeconfig (+common-includes): Define.
21 (+includes): Use @$(common-objpfx)includes.
22 * Makefile (postclean): Remove includes and includes.mk.
23 * Makerules ($(common-objpfx)includes.mk): Include and create
24 includes.mk. Create includes.
25
26Upstream-Status: Pending
27
28Index: libc/Makeconfig
29===================================================================
30--- libc.orig/Makeconfig 2009-10-13 22:55:12.000000000 -0700
31+++ libc/Makeconfig 2010-03-31 16:02:37.120489733 -0700
32@@ -678,9 +678,10 @@ endif # $(+cflags) == ""
33 # library source directory, in the include directory, and in the
34 # current directory.
35 +sysdep-includes = $(addprefix -I,$(+sysdep_dirs))
36++common-includes = $(+sysdep-includes) $(includes) $(sysincludes)
37 +includes = -I$(..)include $(if $(subdir),$(objpfx:%/=-I%)) \
38- $(+sysdep-includes) $(includes) \
39- $(patsubst %/,-I%,$(..)) $(libio-include) -I. $(sysincludes)
40+ @$(common-objpfx)includes \
41+ $(patsubst %/,-I%,$(..)) $(libio-include) -I.
42
43 # Since libio has several internal header files, we use a -I instead
44 # of many little headers in the include directory.
45Index: libc/Makefile
46===================================================================
47--- libc.orig/Makefile 2009-12-09 12:06:28.000000000 -0800
48+++ libc/Makefile 2010-03-31 16:02:37.132481508 -0700
49@@ -247,7 +247,7 @@ parent-mostlyclean: common-mostlyclean #
50 parent-clean: parent-mostlyclean common-clean
51
52 postclean = $(addprefix $(common-objpfx),$(postclean-generated)) \
53- $(addprefix $(objpfx),sysd-dirs sysd-rules) \
54+ $(addprefix $(objpfx),sysd-dirs sysd-rules includes includes.mk) \
55 $(addprefix $(objpfx),sysd-sorted soversions.mk soversions.i)
56
57 clean: parent-clean
58Index: libc/Makerules
59===================================================================
60--- libc.orig/Makerules 2009-12-09 12:06:28.000000000 -0800
61+++ libc/Makerules 2010-03-31 16:02:37.140481645 -0700
62@@ -254,6 +254,20 @@ ifndef sysd-rules-done
63 no_deps=t
64 endif
65
66+-include $(common-objpfx)includes.mk
67+ifneq ($(+common-includes),$(saved-includes))
68+# Recreate includes.mk (and includes).
69+includes-force = FORCE
70+FORCE:
71+endif
72+$(common-objpfx)includes.mk: $(includes-force)
73+ -@rm -f $@T $(common-objpfx)includesT
74+ for inc in $(+common-includes); do echo "$$inc"; done \
75+ > $(common-objpfx)includesT
76+ mv -f $(common-objpfx)includesT $(common-objpfx)includes
77+ echo 'saved-includes := $(+common-includes)' > $@T
78+ mv -f $@T $@
79+
80 define o-iterator-doit
81 $(objpfx)%$o: %.S $(before-compile); $$(compile-command.S)
82 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 0000000000..dbf70a974f
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.14/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
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 0000000000..787c762609
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-initial_2.14.bb
@@ -0,0 +1,6 @@
1require eglibc_${PV}.bb
2require eglibc-initial.inc
3
4do_configure_prepend () {
5 unset CFLAGS
6}
diff --git a/meta/recipes-core/eglibc/eglibc-locale_2.14.bb b/meta/recipes-core/eglibc/eglibc-locale_2.14.bb
new file mode 100644
index 0000000000..ce6c1d2320
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-locale_2.14.bb
@@ -0,0 +1 @@
require eglibc-locale.inc
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 0000000000..b2821db283
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc_2.14.bb
@@ -0,0 +1,219 @@
1require eglibc.inc
2
3SRCREV = "15225"
4
5DEPENDS += "gperf-native"
6PR = "r0"
7PR_append = "+svnr${SRCPV}"
8
9EGLIBC_BRANCH="eglibc-2_14"
10SRC_URI = "svn://www.eglibc.org/svn/branches/;module=${EGLIBC_BRANCH};proto=http \
11 file://eglibc-svn-arm-lowlevellock-include-tls.patch \
12 file://IO-acquire-lock-fix.patch \
13 file://shorten-build-commands.patch \
14 file://mips-rld-map-check.patch \
15 file://stack-protector-test.patch \
16 file://armv4-eabi-compile-fix.patch \
17 file://etc/ld.so.conf \
18 file://generate-supported.mk \
19 file://ppc-sqrt.patch \
20 file://multilib_readlib.patch \
21 file://eglibc-rpc-export-again.patch \
22 "
23LIC_FILES_CHKSUM = "file://LICENSES;md5=98a1128c4b58120182cbea3b1752d8b9 \
24 file://COPYING;md5=393a5ca445f6965873eca0259a17f833 \
25 file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
26 file://COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff "
27
28SRC_URI_append_virtclass-nativesdk = " file://ld-search-order.patch"
29S = "${WORKDIR}/${EGLIBC_BRANCH}/libc"
30B = "${WORKDIR}/build-${TARGET_SYS}"
31
32PACKAGES_DYNAMIC = "libc6*"
33RPROVIDES_${PN}-dev = "libc6-dev virtual-libc-dev"
34PROVIDES_${PN}-dbg = "glibc-dbg"
35
36# the -isystem in bitbake.conf screws up glibc do_stage
37BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}"
38TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${layout_includedir}"
39
40GLIBC_ADDONS ?= "ports,nptl,libidn"
41
42GLIBC_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"
43
44FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/eglibc-${PV}', '${FILE_DIRNAME}/eglibc', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
45
46#
47# For now, we will skip building of a gcc package if it is a uclibc one
48# and our build is not a uclibc one, and we skip a glibc one if our build
49# is a uclibc build.
50#
51# See the note in gcc/gcc_3.4.0.oe
52#
53
54python __anonymous () {
55 import bb, re
56 uc_os = (re.match('.*uclibc$', bb.data.getVar('TARGET_OS', d, 1)) != None)
57 if uc_os:
58 raise bb.parse.SkipPackage("incompatible with target %s" %
59 bb.data.getVar('TARGET_OS', d, 1))
60}
61
62export libc_cv_slibdir = "${base_libdir}"
63
64EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
65 --without-cvs --disable-profile --disable-debug --without-gd \
66 --enable-clocale=gnu \
67 --enable-add-ons=${GLIBC_ADDONS},ports \
68 --with-headers=${STAGING_INCDIR} \
69 --without-selinux \
70 ${GLIBC_EXTRA_OECONF}"
71
72EXTRA_OECONF += "${@get_libc_fpu_setting(bb, d)}"
73
74do_unpack_append() {
75 bb.build.exec_func('do_move_ports', d)
76}
77
78do_move_ports() {
79 if test -d ${WORKDIR}/${EGLIBC_BRANCH}/ports ; then
80 rm -rf ${S}/ports
81 mv ${WORKDIR}/${EGLIBC_BRANCH}/ports ${S}/
82 fi
83}
84
85do_patch_append() {
86 bb.build.exec_func('do_fix_ia_headers', d)
87 bb.build.exec_func('do_fix_readlib_c', d)
88}
89
90# We need to ensure that all of the i386 and x86_64 headers are identical
91# to support the multilib case. We do this by copying headers from x86_64
92# to i386 directories. Normally when hand building eglibc or a combined
93# system you would build 32-bit, and then overwrite any files with the x86_64
94# versions.
95#
96# Each time eglibc is updated, this will need to be re-evaluated. In order
97# to do this, disable this function. Build eglibc for a 32-bit and a 64-bit
98# IA32 target. Compare the contents of the include files -- comments specific
99# to the x86_64 version compared to the 32-bit one.
100#
101# For eglibc 2.13, each conflict noted below:
102# bits/a.out.h - Add support for __WORDSIZE = 64
103# bits/byteswap.h - Copyright date mismatch, add support for __WORDSIZE = 64
104# bits/endian.h - Comment mismatch
105# bits/environment.h - add support for __WORDSIZE = 64
106# bits/fcntl.h - Comment/Copyright date mismatch, add support for __WORDSIZE = 64
107# bits/fenv.h - Copyright date mismatch, add support for __WORDSIZE = 64
108# bits/huge_vall.h - Comment/Copyright date mismatch, remove support for older gcc
109# bits/link.h - Function name difference, add x86_64 definitions
110# bits/mathdef.h - Copyright date mismatch, add support for __WORDSIZE = 64
111# bits/mathinline.h - Copyright date mismatch, contributed by mismatch, remove support for older gcc/assembly optimization, add support for __WORDSIZE = 64
112# bits/mman.h - Header/Copyright date mismatch, add MAP_32BIT definition
113# bits/msq.h - Copyright date mismatch, add __WORDSIZE = 32 definitions
114# bits/pthread_type.h -- Contributed by added, add support for __WORDSIZE = 64
115# bits/select.h - Copyright date mismatch, add support for __WORDSIZE = 64
116# bits/semaphore.h - Copyright date mismatch, add support for __WORDSIZE = 64
117# bits/sem.h - Copyright date mismatch
118# bits/setjmp.h - Copyrgiht date mismatch, add support for __WORDSIZE = 64
119# bits/shm.h - Copyright date mismatch, add support for __WORDSIZE = 32
120# bits/sigcontext.h - Copyright date mismatch, license wording mismatch, add support for __WORDSIZE = 32
121# bits/stat.h - Copyright date mismatch, add support for __WORDSIZE = 32 and __WORDSIZE = 64
122# bits/string.h - Header/Copyright date mismatch, remove assembly optimizations
123# bits/syscall.h - different order, some different syscalls listed
124# bits/wchar.h - Change the way the definitions are done
125# bits/wordsize.h - Different header, remove license notice, add __x86_64__ support
126# bits/xtitypes.h - Header difference, different typedef format
127# bits/fpu_control.h - header difference, revised comments, updated assembly macros
128# sys/debugreg.h - Copyright date mismatch, new definition and added __WORDSIZE=64 support
129# sys/epoll.h - Copyright date mismatch, slightly different definitions
130# sys/io.h - Copyright date mismatch, slightly different assembly formats
131# sys/perm.h - Copyright date mismatch
132# sys/procfs.h - Copyright date mismatch, support for __WORDSIZE = 32
133# sys/reg.h - Copyright date mismatch, support for __WORDSIZE = 64
134# sys/ucontext.h - Copyright date mismatch, support for __WORDSIZE = 64
135# sys/user.h - Copyright date mismatch, support for __WORDSIZE = 64
136#
137# we rm something to return to the default version
138#
139do_fix_ia_headers() {
140 cp ${S}/sysdeps/unix/sysv/linux/x86_64/bits/a.out.h ${S}/sysdeps/unix/sysv/linux/i386/bits/a.out.h
141 cp ${S}/sysdeps/x86_64/bits/byteswap.h ${S}/sysdeps/i386/bits/byteswap.h
142 cp ${S}/sysdeps/x86_64/bits/endian.h ${S}/sysdeps/i386/bits/endian.h
143 cp ${S}/sysdeps/unix/sysv/linux/x86_64/bits/environments.h ${S}/sysdeps/unix/sysv/linux/i386/bits/environments.h
144 cp ${S}/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h ${S}/sysdeps/unix/sysv/linux/i386/bits/fcntl.h
145 cp ${S}/sysdeps/x86_64/fpu/bits/fenv.h ${S}/sysdeps/i386/fpu/bits/fenv.h
146 rm ${S}/sysdeps/i386/bits/huge_vall.h
147 cp ${S}/sysdeps/x86_64/bits/link.h ${S}/sysdeps/i386/bits/link.h
148 cp ${S}/sysdeps/x86_64/bits/mathdef.h ${S}/sysdeps/i386/bits/mathdef.h
149 cp ${S}/sysdeps/x86_64/fpu/bits/mathinline.h ${S}/sysdeps/i386/fpu/bits/mathinline.h
150 cp ${S}/sysdeps/unix/sysv/linux/x86_64/bits/mman.h ${S}/sysdeps/unix/sysv/linux/i386/bits/mman.h
151 cp ${S}/sysdeps/unix/sysv/linux/x86_64/bits/msq.h ${S}/sysdeps/unix/sysv/linux/i386/bits/msq.h
152 cp ${S}/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h ${S}/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
153 cp ${S}/sysdeps/x86_64/bits/select.h ${S}/sysdeps/i386/bits/select.h
154 cp ${S}/nptl/sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h ${S}/nptl/sysdeps/unix/sysv/linux/i386/bits/semaphore.h
155 rm ${S}/sysdeps/unix/sysv/linux/x86_64/bits/sem.h
156 cp ${S}/sysdeps/x86_64/bits/setjmp.h ${S}/sysdeps/i386/bits/setjmp.h
157 cp ${S}/sysdeps/unix/sysv/linux/x86_64/bits/shm.h ${S}/sysdeps/unix/sysv/linux/i386/bits/shm.h
158 cp ${S}/sysdeps/unix/sysv/linux/x86_64/bits/sigcontext.h ${S}/sysdeps/unix/sysv/linux/i386/bits/sigcontext.h
159 cp ${S}/sysdeps/unix/sysv/linux/x86_64/bits/stat.h ${S}/sysdeps/unix/sysv/linux/i386/bits/stat.h
160 rm ${S}/sysdeps/i386/i486/bits/string.h ; cp ${S}/sysdeps/x86_64/bits/string.h ${S}/sysdeps/i386/bits/string.h
161 # Skip syscall.h, see do_install
162 rm ${S}/sysdeps/unix/sysv/linux/i386/bits/wchar.h
163 cp ${S}/sysdeps/x86_64/bits/wordsize.h ${S}/sysdeps/i386/bits/wordsize.h
164 cp ${S}/sysdeps/x86_64/bits/xtitypes.h ${S}/sysdeps/i386/bits/xtitypes.h
165 # i386 version is correct, x86_64 is incorrect for fpu_control.h
166 cp ${S}/sysdeps/i386/fpu_control.h ${S}/sysdeps/x86_64/fpu_control.h
167 cp ${S}/sysdeps/unix/sysv/linux/x86_64/sys/debugreg.h ${S}/sysdeps/unix/sysv/linux/i386/sys/debugreg.h
168 cp ${S}/sysdeps/unix/sysv/linux/x86_64/sys/epoll.h ${S}/sysdeps/unix/sysv/linux/i386/sys/epoll.h
169 cp ${S}/sysdeps/unix/sysv/linux/x86_64/sys/io.h ${S}/sysdeps/unix/sysv/linux/i386/sys/io.h
170 cp ${S}/sysdeps/unix/sysv/linux/x86_64/sys/perm.h ${S}/sysdeps/unix/sysv/linux/i386/sys/perm.h
171 cp ${S}/sysdeps/unix/sysv/linux/x86_64/sys/procfs.h ${S}/sysdeps/unix/sysv/linux/i386/sys/procfs.h
172 cp ${S}/sysdeps/unix/sysv/linux/x86_64/sys/reg.h ${S}/sysdeps/unix/sysv/linux/i386/sys/reg.h
173 cp ${S}/sysdeps/unix/sysv/linux/x86_64/sys/ucontext.h ${S}/sysdeps/unix/sysv/linux/i386/sys/ucontext.h
174 cp ${S}/sysdeps/unix/sysv/linux/x86_64/sys/user.h ${S}/sysdeps/unix/sysv/linux/i386/sys/user.h
175}
176
177do_fix_readlib_c () {
178 sed -i -e 's#OECORE_KNOWN_INTERPRETER_NAMES#${EGLIBC_KNOWN_INTERPRETER_NAMES}#' ${S}/elf/readlib.c
179}
180
181do_configure () {
182# override this function to avoid the autoconf/automake/aclocal/autoheader
183# calls for now
184# don't pass CPPFLAGS into configure, since it upsets the kernel-headers
185# version check and doesn't really help with anything
186 if [ -z "`which rpcgen`" ]; then
187 echo "rpcgen not found. Install glibc-devel."
188 exit 1
189 fi
190 (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
191 find ${S} -name "configure" | xargs touch
192 CPPFLAGS="" oe_runconf
193}
194
195rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \
196 yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \
197 rusers.x spray.x nfs_prot.x rquota.x key_prot.x"
198
199do_compile () {
200 # -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if another glibc is in staging
201 unset LDFLAGS
202 base_do_compile
203 (
204 cd ${S}/sunrpc/rpcsvc
205 for r in ${rpcsvc}; do
206 h=`echo $r|sed -e's,\.x$,.h,'`
207 rpcgen -h $r -o $h || bbwarn "unable to generate header for $r"
208 done
209 )
210 echo "Adjust ldd script"
211 [ -z "${RTLDLIST}" ] && return
212 sed -i ${B}/elf/ldd -e 's#^\(RTLDLIST=\)"\(.*\)"$#\1\2#'
213 sed -i ${B}/elf/ldd -e 's#^\(RTLDLIST=\)\(.*\)$#\1"${RTLDLIST} \2"#'
214
215}
216
217require eglibc-package.inc
218
219BBCLASSEXTEND = "nativesdk"