From 710894b8469d856fc70c5dd5653aa1f946099348 Mon Sep 17 00:00:00 2001 From: Yingchi Long Date: Wed, 16 Jul 2025 23:15:31 +0800 Subject: [PATCH] runcpu: disable `--sysroot` flag on 8A --- src/bin/runcpu.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bin/runcpu.ts b/src/bin/runcpu.ts index 1462250..cde4020 100644 --- a/src/bin/runcpu.ts +++ b/src/bin/runcpu.ts @@ -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}`] : [],