diff options
Diffstat (limited to 'meta/recipes-core/glibc/glibc.inc')
-rw-r--r-- | meta/recipes-core/glibc/glibc.inc | 66 |
1 files changed, 19 insertions, 47 deletions
diff --git a/meta/recipes-core/glibc/glibc.inc b/meta/recipes-core/glibc/glibc.inc index 21bbdc2ad0..b08a70aa46 100644 --- a/meta/recipes-core/glibc/glibc.inc +++ b/meta/recipes-core/glibc/glibc.inc @@ -1,63 +1,33 @@ require glibc-common.inc require glibc-ld.inc -require glibc-testing.inc -STAGINGCC = "gcc-cross-initial-${TARGET_ARCH}" -STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${SDK_SYS}" -PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:" +DEPENDS = "virtual/${HOST_PREFIX}gcc virtual/${HOST_PREFIX}binutils libgcc-initial linux-libc-headers" -python () { - opt_effective = "-O" - for opt in d.getVar('SELECTED_OPTIMIZATION').split(): - if opt in ("-O0", "-O", "-O1", "-O2", "-O3", "-Os"): - opt_effective = opt - if opt_effective == "-O0": - bb.fatal("%s can't be built with %s, try -O1 instead" % (d.getVar('PN'), opt_effective)) - if opt_effective in ("-O", "-O1", "-Os"): - bb.note("%s doesn't build cleanly with %s, adding -Wno-error to SELECTED_OPTIMIZATION" % (d.getVar('PN'), opt_effective)) - d.appendVar("SELECTED_OPTIMIZATION", " -Wno-error") -} - -# siteconfig.bbclass runs configure which needs a working compiler -# For the compiler to work we need a working libc yet libc isn't -# in the sysroots directory at this point. This means the libc.so -# linker script won't work as the --sysroot setting isn't correct. -# Here we create a hacked up libc linker script and pass in the right -# flags to let configure work. Ugly. -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}'" -siteconfig_do_siteconfig_gencache_prepend = " \ - mkdir -p ${WORKDIR}/site_config_libc; \ - cp ${SYSROOT_DESTDIR}${libdir}/libc.so ${WORKDIR}/site_config_libc; \ - sed -i -e 's# ${base_libdir}# ${SYSROOT_DESTDIR}${base_libdir}#g' -e 's# ${libdir}# ${SYSROOT_DESTDIR}${libdir}#g' ${WORKDIR}/site_config_libc/libc.so; \ -" - -# nptl needs unwind support in gcc, which can't be built without glibc. -DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial libgcc-initial linux-libc-headers virtual/${TARGET_PREFIX}libc-initial" -# nptl needs libgcc but dlopens it, so our shlibs code doesn't detect this -#RDEPENDS_${PN} += "${@['','libgcc']['nptl' in '${GLIBC_ADDONS}']}" -PROVIDES = "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc" +PROVIDES = "virtual/libc" PROVIDES += "virtual/libintl virtual/libiconv" -inherit autotools texinfo distro_features_check systemd +inherit autotools texinfo systemd LEAD_SONAME = "libc.so" +# msgfmt could come from gettext-native but we don't depend on that and +# disable for reproducibility CACHED_CONFIGUREVARS += " \ ac_cv_path_BASH_SHELL=${base_bindir}/bash \ + ac_cv_prog_MSGFMT= \ libc_cv_slibdir=${base_libdir} \ libc_cv_rootsbindir=${base_sbindir} \ libc_cv_localedir=${localedir} \ libc_cv_ssp_strong=no \ + libc_cv_ssp_all=no \ libc_cv_ssp=no \ + libc_cv_include_x86_isa_level=no \ " -GLIBC_EXTRA_OECONF ?= "" -GLIBC_EXTRA_OECONF_class-nativesdk = "" -INHIBIT_DEFAULT_DEPS = "1" +# ifunc doesn't appear to work on mips, casuses libbfd assertion failures +CACHED_CONFIGUREVARS:append:mipsarch = " libc_cv_ld_gnu_indirect_function=no" -# This needs to match with glibc-collateral.inc, otherwise glibc-scripts and glibc-locale -# will fail to find main glibc, for details see -# http://lists.openembedded.org/pipermail/openembedded-core/2015-January/100679.html -ARM_INSTRUCTION_SET = "arm" +GLIBC_EXTRA_OECONF ?= "" +GLIBC_EXTRA_OECONF:class-nativesdk = "" # glibc uses PARALLELMFLAGS variable to pass parallel build info so transfer # PARALLEL_MAKE into PARALLELMFLAGS and empty out PARALLEL_MAKE @@ -71,14 +41,16 @@ PARALLEL_MAKE = "" # ensure make uses /bin/bash EXTRA_OEMAKE += "SHELL=/bin/bash" -do_configure_prepend() { - sed -e "s#@BASH@#/bin/sh#" -i ${S}/elf/ldd.bash.in -} +# We do not need bash to run tzselect script, the default is to use +# bash but it can be configured by setting KSHELL Makefile variable +EXTRA_OEMAKE += "KSHELL=/bin/sh" -GLIBC_ADDONS ?= "nptl,libidn" +do_configure:prepend() { + sed -e "s#/bin/bash#/bin/sh#" -i ${S}/elf/ldd.bash.in +} # Enable backtrace from abort() -do_configure_append_arm () { +do_configure:append:arm () { echo "CFLAGS-abort.c = -fasynchronous-unwind-tables" >> ${B}/configparms echo "CFLAGS-raise.c = -fasynchronous-unwind-tables" >> ${B}/configparms } |