diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2023-04-10 18:01:45 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-10 18:01:45 +0000 |
commit | da9d5848454b49d3f4b9e9e8f7421110516f36b4 (patch) | |
tree | 66f9a7f9c44be41e15f4dcec1d7e3a5749fb8f9b /pkgs/build-support | |
parent | 939ef9894d4cc313bceb33fc1ca80c3fc648fa75 (diff) | |
parent | ace14e0119b4ec251749544e6c37443c44c95bf7 (diff) | |
download | nixpkgs-da9d5848454b49d3f4b9e9e8f7421110516f36b4.tar nixpkgs-da9d5848454b49d3f4b9e9e8f7421110516f36b4.tar.gz nixpkgs-da9d5848454b49d3f4b9e9e8f7421110516f36b4.tar.bz2 nixpkgs-da9d5848454b49d3f4b9e9e8f7421110516f36b4.tar.lz nixpkgs-da9d5848454b49d3f4b9e9e8f7421110516f36b4.tar.xz nixpkgs-da9d5848454b49d3f4b9e9e8f7421110516f36b4.tar.zst nixpkgs-da9d5848454b49d3f4b9e9e8f7421110516f36b4.zip |
Merge staging-next into staging
Diffstat (limited to 'pkgs/build-support')
-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 597e8105fa1..24680754c8d 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 |