runcpu: disable --sysroot flag on 8A

This commit is contained in:
2025-07-16 23:15:31 +08:00
parent 61c8ab03ab
commit 710894b846

View File

@@ -84,7 +84,7 @@ const argv = await yargs(hideBin(process.argv))
.parse();
const sunwayGeneration = argv.platform === "host" ? sunway.getHostGeneration() : argv.platform as sunway.SunwayGeneration;
const sysroot = sunwayGeneration == "6b" ? "/usr/sw/standard-830-6b-test/" : "/usr/sw/swgcc1030_native_tools-8a";
const sysrootFlag = sunwayGeneration === "6b" ? ["--sysroot", "/usr/sw/standard-830-6b-test/"] : [];
// Function to convert hash to prefix
@@ -134,7 +134,7 @@ const specProc = await spawnSPECWithID(
...optimizeFlags,
...argv.allowMisaligned ? ["-mllvm", sw64UnalignedFlag] : [],
...sw64TargetOptions({ simd: argv.simd }),
...["--sysroot", sysroot],
...sysrootFlag,
...argv.compilerSuite == "llvm" ? [sunway.mcpu(sunwayGeneration)] : [], // Only add -mcpu for llvm
],
ldflags: [
@@ -142,7 +142,7 @@ const specProc = await spawnSPECWithID(
...optimizeFlags,
"-fuse-ld=lld",
'-static',
...["--sysroot", sysroot],
...sysrootFlag,
...["base", "openmp"].includes(argv.optimizeProfile) ? [
...argv.simd ? ["-Wl,-plugin-opt,-mattr=+simd"] : [],
...argv.allowMisaligned ? [`-Wl,-plugin-opt,${sw64UnalignedFlag}`] : [],