2010-12-13 17:23:27 +00:00
|
|
|
require eglibc-common.inc
|
2011-07-29 14:26:42 +00:00
|
|
|
require eglibc-ld.inc
|
2011-12-09 19:19:35 +00:00
|
|
|
require eglibc-testing.inc
|
2010-12-13 17:23:27 +00:00
|
|
|
|
2012-08-16 06:16:11 +00:00
|
|
|
STAGINGCC = "gcc-cross-initial"
|
|
|
|
STAGINGCC_virtclass-nativesdk = "gcc-crosssdk-initial"
|
2011-01-18 04:50:39 +00:00
|
|
|
PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:"
|
|
|
|
|
2011-01-25 00:34:09 +00:00
|
|
|
TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TCBOOTSTRAP}"
|
|
|
|
|
|
|
|
# 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; \
|
|
|
|
"
|
|
|
|
|
2010-08-03 01:56:04 +00:00
|
|
|
# nptl needs unwind support in gcc, which can't be built without glibc.
|
2012-08-16 06:16:11 +00:00
|
|
|
DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial linux-libc-headers virtual/${TARGET_PREFIX}libc-initial"
|
2010-08-03 01:56:04 +00:00
|
|
|
# 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/libintl virtual/libiconv"
|
|
|
|
inherit autotools
|
2011-06-07 08:16:43 +00:00
|
|
|
require eglibc-options.inc
|
2010-08-03 01:56:04 +00:00
|
|
|
|
|
|
|
LEAD_SONAME = "libc.so"
|
|
|
|
|
2012-06-13 23:39:49 +00:00
|
|
|
CACHED_CONFIGUREVARS += "ac_cv_path_KSH=${base_bindir}/bash \
|
2012-08-16 06:16:11 +00:00
|
|
|
ac_cv_path_BASH_SHELL=${base_bindir}/bash \
|
2012-09-24 19:00:41 +00:00
|
|
|
libc_cv_localedir=${localedir} \
|
2012-08-16 06:16:11 +00:00
|
|
|
libc_cv_ssp=no \
|
|
|
|
"
|
|
|
|
|
2010-08-03 01:56:04 +00:00
|
|
|
GLIBC_EXTRA_OECONF ?= ""
|
2011-08-09 03:52:11 +00:00
|
|
|
GLIBC_EXTRA_OECONF_virtclass-nativesdk = ""
|
2010-08-03 01:56:04 +00:00
|
|
|
INHIBIT_DEFAULT_DEPS = "1"
|
|
|
|
|
|
|
|
ARM_INSTRUCTION_SET = "arm"
|
|
|
|
|
2010-09-24 07:09:12 +00:00
|
|
|
# eglibc uses PARALLELMFLAGS variable to pass parallel build info so transfer
|
|
|
|
# PARALLEL_MAKE into PARALLELMFLAGS and empty out PARALLEL_MAKE
|
|
|
|
EGLIBCPARALLELISM := "PARALLELMFLAGS="${PARALLEL_MAKE}""
|
2011-11-17 22:28:20 +00:00
|
|
|
EXTRA_OEMAKE[vardepsexclude] += "EGLIBCPARALLELISM"
|
2012-02-26 21:53:02 +00:00
|
|
|
EXTRA_OEMAKE += "${EGLIBCPARALLELISM}"
|
2010-09-24 07:09:12 +00:00
|
|
|
PARALLEL_MAKE = ""
|
|
|
|
|
2012-10-10 15:55:45 +00:00
|
|
|
# eglibc make-syscalls.sh has a number of issues with /bin/dash and
|
|
|
|
# it's output which make calls via the SHELL also has issues, so
|
|
|
|
# ensure make uses /bin/bash
|
|
|
|
EXTRA_OEMAKE += "SHELL=/bin/bash"
|
|
|
|
|
2011-06-07 08:16:43 +00:00
|
|
|
OE_FEATURES = "${@features_to_eglibc_settings(d)}"
|
|
|
|
do_configure_prepend() {
|
2011-07-08 16:29:55 +00:00
|
|
|
sed -e "s#@BASH@#/bin/sh#" -i ${S}/elf/ldd.bash.in
|
2011-06-07 08:16:43 +00:00
|
|
|
echo '${OE_FEATURES}' > ${B}/option-groups.config
|
|
|
|
}
|
2012-04-03 00:13:51 +00:00
|
|
|
|
2012-09-06 22:19:18 +00:00
|
|
|
do_configure_append() {
|
|
|
|
oe_runmake config
|
|
|
|
}
|
|
|
|
|
2012-04-03 00:13:51 +00:00
|
|
|
GLIBC_ADDONS ?= "ports,nptl,libidn"
|
|
|
|
SDK_GLIBC_ADDONS ?= "ports,nptl,libidn"
|
|
|
|
GLIBC_ADDONS_virtclass-nativesdk = "${SDK_GLIBC_ADDONS}"
|