gcc{6,7,8,9,10,11}: fix cross-compiler build on x86_64-darwin
Building a cross-compiler fails due to register storage class specifier errors when building with clang 16 due to its defaulting to C++17. Downgrading the error allows the older cross-compilers to build.
This commit is contained in:
parent
4a538d6b3d
commit
f2a7764cab
@ -392,7 +392,11 @@ lib.pipe ((callFile ./common/builder.nix {}) ({
|
||||
EXTRA_LDFLAGS_FOR_TARGET
|
||||
;
|
||||
} // optionalAttrs is7 {
|
||||
NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.cc.isClang && langFortran) "-Wno-unused-command-line-argument";
|
||||
NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.cc.isClang && langFortran) "-Wno-unused-command-line-argument"
|
||||
# Downgrade register storage class specifier errors to warnings when building a cross compiler from a clang stdenv.
|
||||
+ lib.optionalString (stdenv.cc.isClang && targetPlatform != hostPlatform) " -Wno-register";
|
||||
} // optionalAttrs (!is7 && !atLeast12 && stdenv.cc.isClang && targetPlatform != hostPlatform) {
|
||||
NIX_CFLAGS_COMPILE = "-Wno-register";
|
||||
} // optionalAttrs (!atLeast7) {
|
||||
inherit langJava;
|
||||
} // optionalAttrs atLeast6 {
|
||||
|
Loading…
Reference in New Issue
Block a user