diff options
author | Vladimír Čunát <v@cunat.cz> | 2023-04-10 16:34:07 +0200 |
---|---|---|
committer | Vladimír Čunát <v@cunat.cz> | 2023-04-10 16:36:55 +0200 |
commit | e2691227cdc424c643511d40fd6234acdf77372e (patch) | |
tree | 9136a5e9d030ede962a12515cf86ae358f7f46fd /pkgs/build-support/cc-wrapper | |
parent | 995e7507ce94c00788a34a649672e80a664f1d77 (diff) |
julia{18,19,}: fix build by a temporary hack
This is a low-rebuild version of PR #225273 /cc the proper and hopefully complete fix in PR #225220
Diffstat (limited to 'pkgs/build-support/cc-wrapper')
-rw-r--r-- | pkgs/build-support/cc-wrapper/default.nix | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index 597e8105fa1dd..24680754c8d5d 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -17,6 +17,7 @@ , isGNU ? false, isClang ? cc.isClang or false, gnugrep ? null , buildPackages ? {} , libcxx ? null +, grossHackForStagingNext ? false # Whether or not to add `-B` and `-L` to `nix-support/cc-{c,ld}flags` , useCcForLibs ? @@ -407,7 +408,11 @@ stdenv.mkDerivation { touch "$out/nix-support/libcxx-cxxflags" touch "$out/nix-support/libcxx-ldflags" '' - + optionalString (libcxx == null && (useGccForLibs && gccForLibs.langCC or false)) '' + # Adding -isystem flags should be done only for clang; gcc + # already knows how to find its own libstdc++, and adding + # additional -isystem flags will confuse gfortran (see + # https://github.com/NixOS/nixpkgs/pull/209870#issuecomment-1500550903) + + optionalString (libcxx == null && (if grossHackForStagingNext then isClang else true) && (useGccForLibs && gccForLibs.langCC or false)) '' for dir in ${gccForLibs}${lib.optionalString (hostPlatform != targetPlatform) "/${targetPlatform.config}"}/include/c++/*; do echo "-isystem $dir" >> $out/nix-support/libcxx-cxxflags done |