diff options
author | Khem Raj <raj.khem@gmail.com> | 2014-08-28 06:00:54 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-09-01 18:02:21 +0100 |
commit | 54a3375a1084f02ebd95886739e951228e945c57 (patch) | |
tree | fe139449256b0ed85504b896a9782bccd8a9d3a1 /meta/recipes-core/glibc/glibc.inc | |
parent | 954e45bc7464573ed4776dbcd72eb76d4fca0b3d (diff) | |
download | poky-54a3375a1084f02ebd95886739e951228e945c57.tar.gz |
glibc: Migrate eglibc 2.19 -> glibc 2.20
- This is a big swoop change where we switch to using glibc
- option-groups are forward ported
- cross-localedef is extracted out from eglibc and hosted
at github.com/kraj/localedef, its used for cross-localedef
recipe
- Other non ported patches from eglibc are forward ported
ppc8xx cache line workaround
SH fpcr values
dynamic resolver
installing PIC archives is there but is not applied
libc header bootstrap
- Delete eglibc recipes we moved back to using glibc now
- Fix ppc/e500 build
- Fix crypt module build when options are used
- Fix fnmatch build when options OPTION_EGLIBC_LOCALE_CODE is unset
HAVE_MBSTATE_T and HAVE_MBSRTOWCS should be defined conditionally
based upon OPTION_EGLIBC_LOCALE_CODE being set/unset
- Move the ports/ patches to relevant files now that ports is gone
(From OE-Core rev: 1027c535ea753e63d9ffe469a423e04467cf8940)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/glibc/glibc.inc')
-rw-r--r-- | meta/recipes-core/glibc/glibc.inc | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/meta/recipes-core/glibc/glibc.inc b/meta/recipes-core/glibc/glibc.inc new file mode 100644 index 0000000000..8aa78dfb34 --- /dev/null +++ b/meta/recipes-core/glibc/glibc.inc | |||
@@ -0,0 +1,92 @@ | |||
1 | require glibc-common.inc | ||
2 | require glibc-ld.inc | ||
3 | require glibc-testing.inc | ||
4 | |||
5 | STAGINGCC = "gcc-cross-initial-${TARGET_ARCH}" | ||
6 | STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${TARGET_ARCH}" | ||
7 | PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:" | ||
8 | |||
9 | TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TCBOOTSTRAP}" | ||
10 | |||
11 | # glibc can't be built without optimization, if someone tries to compile an | ||
12 | # entire image as -O0, we override it with -O2 here and give a note about it. | ||
13 | def get_optimization(d): | ||
14 | selected_optimization = d.getVar("SELECTED_OPTIMIZATION", True) | ||
15 | if bb.utils.contains("SELECTED_OPTIMIZATION", "-O0", "x", "", d) == "x": | ||
16 | bb.note("glibc can't be built with -O0, -O2 will be used instead.") | ||
17 | return selected_optimization.replace("-O0", "-O2") | ||
18 | return selected_optimization | ||
19 | |||
20 | SELECTED_OPTIMIZATION := "${@get_optimization(d)}" | ||
21 | |||
22 | # siteconfig.bbclass runs configure which needs a working compiler | ||
23 | # For the compiler to work we need a working libc yet libc isn't | ||
24 | # in the sysroots directory at this point. This means the libc.so | ||
25 | # linker script won't work as the --sysroot setting isn't correct. | ||
26 | # Here we create a hacked up libc linker script and pass in the right | ||
27 | # flags to let configure work. Ugly. | ||
28 | EXTRASITECONFIG = "CFLAGS='${CFLAGS} -Wl,-L${WORKDIR}/site_config_libc -L${WORKDIR}/site_config_libc -L${SYSROOT_DESTDIR}${libdir} -L${SYSROOT_DESTDIR}${base_libdir} -Wl,-L${SYSROOT_DESTDIR}${libdir} -Wl,-L${SYSROOT_DESTDIR}${base_libdir}'" | ||
29 | siteconfig_do_siteconfig_gencache_prepend = " \ | ||
30 | mkdir -p ${WORKDIR}/site_config_libc; \ | ||
31 | cp ${SYSROOT_DESTDIR}${libdir}/libc.so ${WORKDIR}/site_config_libc; \ | ||
32 | sed -i -e 's# ${base_libdir}# ${SYSROOT_DESTDIR}${base_libdir}#g' -e 's# ${libdir}# ${SYSROOT_DESTDIR}${libdir}#g' ${WORKDIR}/site_config_libc/libc.so; \ | ||
33 | " | ||
34 | |||
35 | # nptl needs unwind support in gcc, which can't be built without glibc. | ||
36 | DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial libgcc-initial linux-libc-headers virtual/${TARGET_PREFIX}libc-initial" | ||
37 | # nptl needs libgcc but dlopens it, so our shlibs code doesn't detect this | ||
38 | #RDEPENDS_${PN} += "${@['','libgcc']['nptl' in '${GLIBC_ADDONS}']}" | ||
39 | PROVIDES = "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc" | ||
40 | PROVIDES += "virtual/libintl virtual/libiconv" | ||
41 | inherit autotools texinfo distro_features_check | ||
42 | require glibc-options.inc | ||
43 | |||
44 | # The main purpose of setting this variable is to prevent users from accidently | ||
45 | # overriding DISTRO_FEATRUES, causing obscure build failures because of lack | ||
46 | # of libc functions. | ||
47 | REQUIRED_DISTRO_FEATURES = "${DISTRO_FEATURES_LIBC}" | ||
48 | |||
49 | LEAD_SONAME = "libc.so" | ||
50 | |||
51 | CACHED_CONFIGUREVARS += " \ | ||
52 | ac_cv_path_KSH=${base_bindir}/bash \ | ||
53 | ac_cv_path_BASH_SHELL=${base_bindir}/bash \ | ||
54 | libc_cv_slibdir=${base_libdir} \ | ||
55 | libc_cv_rootsbindir=${base_sbindir} \ | ||
56 | libc_cv_localedir=${localedir} \ | ||
57 | libc_cv_ssp=no \ | ||
58 | " | ||
59 | |||
60 | GLIBC_EXTRA_OECONF ?= "" | ||
61 | GLIBC_EXTRA_OECONF_class-nativesdk = "" | ||
62 | INHIBIT_DEFAULT_DEPS = "1" | ||
63 | |||
64 | ARM_INSTRUCTION_SET = "arm" | ||
65 | |||
66 | # glibc uses PARALLELMFLAGS variable to pass parallel build info so transfer | ||
67 | # PARALLEL_MAKE into PARALLELMFLAGS and empty out PARALLEL_MAKE | ||
68 | EGLIBCPARALLELISM := "PARALLELMFLAGS="${PARALLEL_MAKE}"" | ||
69 | EXTRA_OEMAKE[vardepsexclude] += "EGLIBCPARALLELISM" | ||
70 | EXTRA_OEMAKE += "${EGLIBCPARALLELISM}" | ||
71 | PARALLEL_MAKE = "" | ||
72 | |||
73 | # glibc make-syscalls.sh has a number of issues with /bin/dash and | ||
74 | # it's output which make calls via the SHELL also has issues, so | ||
75 | # ensure make uses /bin/bash | ||
76 | EXTRA_OEMAKE += "SHELL=/bin/bash" | ||
77 | |||
78 | OE_FEATURES = "${@features_to_glibc_settings(d)}" | ||
79 | do_configure_prepend() { | ||
80 | sed -e "s#@BASH@#/bin/sh#" -i ${S}/elf/ldd.bash.in | ||
81 | echo '${OE_FEATURES}' > ${B}/option-groups.config | ||
82 | } | ||
83 | |||
84 | do_configure_append() { | ||
85 | oe_runmake config | ||
86 | |||
87 | # Remove quotation marks from OPTION_EGLIBC_NSSWITCH_FIXED_*. This will | ||
88 | # avoid install error. | ||
89 | sed -i 's/^OPTION_EGLIBC_NSSWITCH_FIXED_\(.*\)="\(.*\)"$/OPTION_EGLIBC_NSSWITCH_FIXED_\1=\2/' option-groups.config | ||
90 | } | ||
91 | |||
92 | GLIBC_ADDONS ?= "nptl,libidn" | ||