loader = d.getVar("UNINATIVE_LOADER")
if os.path.exists(loader):
bb.debug(2, "Enabling uninative")
- d.setVar("NATIVELSBSTRING", "universal%s" % oe.utils.host_gcc_version(d))
+ d.setVar("NATIVELSBSTRING", "universal")
d.appendVar("SSTATEPOSTUNPACKFUNCS", " uninative_changeinterp")
d.appendVarFlag("SSTATEPOSTUNPACKFUNCS", "vardepvalueexclude", "| uninative_changeinterp")
d.appendVar("BUILD_LDFLAGS", " -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=${UNINATIVE_LOADER} -pthread")
-e 's#@SDK_VERSION@#${SDK_VERSION}#g' \
-e '/@SDK_PRE_INSTALL_COMMAND@/d' \
-e '/@SDK_POST_INSTALL_COMMAND@/d' \
- -e 's#@SDK_GCC_VER@#${@oe.utils.host_gcc_version(d, taskcontextonly=True)}#g' \
-e 's#@SDK_ARCHIVE_TYPE@#${SDK_ARCHIVE_TYPE}#g' \
${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.sh
with open(sdkbasepath + '/conf/local.conf', 'a') as f:
# Force the use of sstate from the build system
f.write('\nSSTATE_DIR:forcevariable = "%s"\n' % d.getVar('SSTATE_DIR'))
- f.write('SSTATE_MIRRORS:forcevariable = "file://universal/(.*) file://universal-4.9/\\1 file://universal-4.9/(.*) file://universal-4.8/\\1"\n')
# Ensure TMPDIR is the default so that clean_esdk_builddir() can delete it
f.write('TMPDIR:forcevariable = "${TOPDIR}/tmp"\n')
# Drop uninative if the build isn't using it (or else NATIVELSBSTRING will
f.write('# Provide a flag to indicate we are in the EXT_SDK Context\n')
f.write('WITHIN_EXT_SDK = "1"\n\n')
- # Map gcc-dependent uninative sstate cache for installer usage
- f.write('SSTATE_MIRRORS += " file://universal/(.*) file://universal-4.9/\\1 file://universal-4.9/(.*) file://universal-4.8/\\1"\n\n')
-
if d.getVar("PRSERV_HOST"):
# Override this, we now include PR data, so it should only point ot the local database
f.write('PRSERV_HOST = "localhost:0"\n\n')
sstate_out = baseoutpath + '/sstate-cache'
bb.utils.remove(sstate_out, True)
- # uninative.bbclass sets NATIVELSBSTRING to 'universal%s' % oe.utils.host_gcc_version(d)
- fixedlsbstring = "universal%s" % oe.utils.host_gcc_version(d) if bb.data.inherits_class('uninative', d) else ""
+ # uninative.bbclass sets NATIVELSBSTRING to 'universal'
+ fixedlsbstring = "universal" if bb.data.inherits_class('uninative', d) else ""
sdk_include_toolchain = (d.getVar('SDK_INCLUDE_TOOLCHAIN') == '1')
sdk_ext_type = d.getVar('SDK_EXT_TYPE')
INST_ARCH=$(uname -m | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/")
SDK_ARCH=$(echo @SDK_ARCH@ | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/")
-INST_GCC_VER=$(gcc --version 2>/dev/null | sed -ne 's/.* \([0-9]\+\.[0-9]\+\)\.[0-9]\+.*/\1/p')
-SDK_GCC_VER='@SDK_GCC_VER@'
-
verlte () {
[ "$1" = "`printf "$1\n$2" | sort -V | head -n1`" ]
}
# SDK_EXTENSIBLE is exposed from the SDK_PRE_INSTALL_COMMAND above
if [ "$SDK_EXTENSIBLE" = "1" ]; then
DEFAULT_INSTALL_DIR="@SDKEXTPATH@"
- if [ "$INST_GCC_VER" = '4.8' -a "$SDK_GCC_VER" = '4.9' ] || [ "$INST_GCC_VER" = '4.8' -a "$SDK_GCC_VER" = '' ] || \
- [ "$INST_GCC_VER" = '4.9' -a "$SDK_GCC_VER" = '' ]; then
- echo "Error: Incompatible SDK installer! Your host gcc version is $INST_GCC_VER and this SDK was built by gcc higher version."
- exit 1
- fi
fi
if [ "$target_sdk_dir" = "" ]; then
version = match.group(1)
return compiler, version
-
-def host_gcc_version(d, taskcontextonly=False):
- import re, subprocess
-
- if taskcontextonly and d.getVar('BB_WORKERCONTEXT') != '1':
- return
-
- compiler = d.getVar("BUILD_CC")
- # Get rid of ccache since it is not present when parsing.
- if compiler.startswith('ccache '):
- compiler = compiler[7:]
- try:
- env = os.environ.copy()
- env["PATH"] = d.getVar("PATH")
- output = subprocess.check_output("%s --version" % compiler, \
- shell=True, env=env, stderr=subprocess.STDOUT).decode("utf-8")
- except subprocess.CalledProcessError as e:
- bb.fatal("Error running %s --version: %s" % (compiler, e.output.decode("utf-8")))
-
- match = re.match(r".* (\d+\.\d+)\.\d+.*", output.split('\n')[0])
- if not match:
- bb.fatal("Can't get compiler version from %s --version output" % compiler)
-
- version = match.group(1)
- return "-%s" % version if version in ("4.8", "4.9") else ""
-
@bb.parse.vardepsexclude("DEFAULTTUNE_MULTILIB_ORIGINAL", "OVERRIDES")
def get_multilib_datastore(variant, d):
localdata = bb.data.createCopy(d)