diff --git a/src/bin/runcpu.ts b/src/bin/runcpu.ts index 5130be7..1462250 100644 --- a/src/bin/runcpu.ts +++ b/src/bin/runcpu.ts @@ -141,18 +141,16 @@ const specProc = await spawnSPECWithID( `-L${path.resolve(prefix, 'lib')}`, ...optimizeFlags, "-fuse-ld=lld", + '-static', ...["--sysroot", sysroot], ...["base", "openmp"].includes(argv.optimizeProfile) ? [ ...argv.simd ? ["-Wl,-plugin-opt,-mattr=+simd"] : [], ...argv.allowMisaligned ? [`-Wl,-plugin-opt,${sw64UnalignedFlag}`] : [], ...sunwayGeneration === "8a" ? ["-Wl,-plugin-opt,-mattr=+core4"] : [], ] : [], - ...argv.optimizeProfile === "openmp" ? [ - `-Wl,-rpath=${argv.compilerPrefix}/lib`, - ] : ['-static'], ], compilerPaths: toolchain(argv.compilerPrefix, argv.compilerSuite as ToolchainSuite), - libs: (argv.compilerSuite === "llvm" || argv.compilerSuite !== "openmp") ? cflangLibs(prefix) : [], + libs: argv.compilerSuite === "llvm" ? cflangLibs(prefix) : [], specialFlags: getSpecialFlags(), openmp: { threads: (argv.optimizeProfile === "openmp" ? 64 : 1),