]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
uninative/utils: Drop workarounds for gcc 4.8/4.9
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 1 Jul 2025 19:38:24 +0000 (20:38 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 2 Jul 2025 09:42:37 +0000 (10:42 +0100)
We require at least gcc 8.0 in sanity.bbclass so drop the 4.8/4.9
special case handling in uninative.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-global/uninative.bbclass
meta/classes-recipe/populate_sdk_base.bbclass
meta/classes-recipe/populate_sdk_ext.bbclass
meta/files/toolchain-shar-extract.sh
meta/lib/oe/utils.py

index 75e0c19704d9a18261155f3b8a41542870386227..c246a1ecd6cb77c9eed4237dab21d500d61dee3e 100644 (file)
@@ -142,7 +142,7 @@ def enable_uninative(d):
     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")
index 8ef4b2be777f5edad4a04bafb3cad5a17b0daee6..e6685cde97bb97cb2698eee9c8c887910e2569de 100644 (file)
@@ -373,7 +373,6 @@ EOF
                -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
 
index 2d7d661d259c05a6f8322d882e1e6a8a1f35acbb..20dfdf02d426c95790e68e17b4cda9e9fa932c1a 100644 (file)
@@ -150,7 +150,6 @@ def create_filtered_tasklist(d, sdkbasepath, tasklistfile, conf_initpath):
         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
@@ -380,9 +379,6 @@ def write_local_conf(d, baseoutpath, derivative, core_meta_subdir, uninative_che
             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')
@@ -491,8 +487,8 @@ def prepare_locked_cache(d, baseoutpath, derivative, conf_initpath):
     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')
index 06934e5a9abc58aa6e208aef434925ed1a12be90..e2c617958a9a10a425a2c2b9ea088b8249df7426 100644 (file)
@@ -31,9 +31,6 @@ tweakpath /sbin
 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`" ]
 }
@@ -145,11 +142,6 @@ fi
 # 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
index a11db5f3cd97dd85218694bebf5ab998b3fe1676..0378071b5ca41f6be4c1527cd0d35c74c600e33d 100644 (file)
@@ -444,32 +444,6 @@ def get_host_compiler_version(d, taskcontextonly=False):
     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)