generic-poky/meta/classes/siteconfig.bbclass
Mark Hatle bb213d8e60 meta-environment: Fix config-site with a multilib config
[YOCTO #6951]

The TOOLCHAIN_CONFIGSITE_SYSROOTCACHE value was defaulting to the nativesdk
path and not the associated target path.  Set the value in toolchain-scripts
to the target path.

Be sure to set the MLPREFIX within the meta-environment script as multilibs
are processed.

Update the config_site file name to use -BPN- not PN.  Otherwise the
environment processing can't find the correct filename.

(From OE-Core rev: 1f05aaa4944ddac6c2b3ba440effdf1eaf732656)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-12 15:38:33 +00:00

34 lines
1.2 KiB
Text

python siteconfig_do_siteconfig () {
shared_state = sstate_state_fromvars(d)
if shared_state['task'] != 'populate_sysroot':
return
if not os.path.isdir(os.path.join(d.getVar('FILE_DIRNAME', True), 'site_config')):
bb.debug(1, "No site_config directory, skipping do_siteconfig")
return
bb.build.exec_func('do_siteconfig_gencache', d)
sstate_clean(shared_state, d)
sstate_install(shared_state, d)
}
EXTRASITECONFIG ?= ""
siteconfig_do_siteconfig_gencache () {
mkdir -p ${WORKDIR}/site_config_${MACHINE}
gen-site-config ${FILE_DIRNAME}/site_config \
>${WORKDIR}/site_config_${MACHINE}/configure.ac
cd ${WORKDIR}/site_config_${MACHINE}
autoconf
rm -f ${BPN}_cache
CONFIG_SITE="" ${EXTRASITECONFIG} ./configure ${CONFIGUREOPTS} --cache-file ${BPN}_cache
sed -n -e "/ac_cv_c_bigendian/p" -e "/ac_cv_sizeof_/p" \
-e "/ac_cv_type_/p" -e "/ac_cv_header_/p" -e "/ac_cv_func_/p" \
< ${BPN}_cache > ${BPN}_config
mkdir -p ${SYSROOT_DESTDIR}${datadir}/${TARGET_SYS}_config_site.d
cp ${BPN}_config ${SYSROOT_DESTDIR}${datadir}/${TARGET_SYS}_config_site.d
}
do_populate_sysroot[sstate-interceptfuncs] += "do_siteconfig "
EXPORT_FUNCTIONS do_siteconfig do_siteconfig_gencache