summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glibc/glibc.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/glibc/glibc.inc')
-rw-r--r--meta/recipes-core/glibc/glibc.inc15
1 files changed, 15 insertions, 0 deletions
diff --git a/meta/recipes-core/glibc/glibc.inc b/meta/recipes-core/glibc/glibc.inc
index cdfa06de90..127ae231d7 100644
--- a/meta/recipes-core/glibc/glibc.inc
+++ b/meta/recipes-core/glibc/glibc.inc
@@ -21,6 +21,21 @@ STAGINGCC = "gcc-cross-intermediate"
21STAGINGCC_virtclass-nativesdk = "gcc-crosssdk-intermediate" 21STAGINGCC_virtclass-nativesdk = "gcc-crosssdk-intermediate"
22PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:" 22PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:"
23 23
24TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TCBOOTSTRAP}"
25
26# siteconfig.bbclass runs configure which needs a working compiler
27# For the compiler to work we need a working libc yet libc isn't
28# in the sysroots directory at this point. This means the libc.so
29# linker script won't work as the --sysroot setting isn't correct.
30# Here we create a hacked up libc linker script and pass in the right
31# flags to let configure work. Ugly.
32EXTRASITECONFIG = "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}'"
33siteconfig_do_siteconfig_gencache_prepend = " \
34 mkdir -p ${WORKDIR}/site_config_libc; \
35 cp ${SYSROOT_DESTDIR}${libdir}/libc.so ${WORKDIR}/site_config_libc; \
36 sed -i -e 's# ${base_libdir}# ${SYSROOT_DESTDIR}${base_libdir}#g' -e 's# ${libdir}# ${SYSROOT_DESTDIR}${libdir}#g' ${WORKDIR}/site_config_libc/libc.so; \
37"
38
24inherit autotools 39inherit autotools
25 40
26GLIBC_EXTRA_OECONF ?= "" 41GLIBC_EXTRA_OECONF ?= ""