spec: allow setting ldflags
This commit is contained in:
@@ -123,7 +123,7 @@ default:
|
||||
# path. You can adjust it, or add lines for other environment variables.
|
||||
# See: https://www.spec.org/cpu2017/Docs/config.html#preenv
|
||||
# and: https://gcc.gnu.org/onlinedocs/gcc/Environment-Variables.html
|
||||
LDFLAGS = -L %{gcc_dir}/lib -static
|
||||
LDFLAGS = @@LDFLAGS@@
|
||||
|
||||
LIBS = %{gcc_dir}/lib/libpgmath.a %{gcc_dir}/lib/libflang.a %{gcc_dir}/lib/libflangrti.a -lompstub
|
||||
|
||||
|
||||
@@ -62,13 +62,15 @@ const writeFile = promisify(fs.writeFile);
|
||||
|
||||
export interface ConfigOptions {
|
||||
gccdir: string;
|
||||
optimize: string;
|
||||
optimize: string[];
|
||||
ldflags: string[];
|
||||
}
|
||||
|
||||
export function renderConfig(options: ConfigOptions) {
|
||||
return `# Rendered from TypeScript ${new Date().toLocaleString()}, do not edit!\n\n\n` + specTemplate
|
||||
.replace("@@GCCDIR@@", options.gccdir)
|
||||
.replace("@@OPTIMIZE@@", options.optimize);
|
||||
.replace("@@OPTIMIZE@@", options.optimize.join(' '))
|
||||
.replace("@@LDFLAGS@@", options.ldflags.join(' '));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user