diff options
author | Felix Buehler <account@buehler.rocks> | 2023-02-06 21:49:02 +0100 |
---|---|---|
committer | Felix Buehler <account@buehler.rocks> | 2023-02-13 21:52:34 +0100 |
commit | cdb39a86e0dd7cda3a057f4f4795485a5c9b9be5 (patch) | |
tree | 1fef6e55f39dab2289b68b68972ee4c9b89520f7 /pkgs/development/compilers/gcc/10/default.nix | |
parent | 7f610b4d3f6e6f695b1f5521862066c0ece79a5a (diff) |
treewide: use optionalString
Diffstat (limited to 'pkgs/development/compilers/gcc/10/default.nix')
-rw-r--r-- | pkgs/development/compilers/gcc/10/default.nix | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pkgs/development/compilers/gcc/10/default.nix b/pkgs/development/compilers/gcc/10/default.nix index abe6d92cd0a69..4df0872688be2 100644 --- a/pkgs/development/compilers/gcc/10/default.nix +++ b/pkgs/development/compilers/gcc/10/default.nix @@ -186,10 +186,10 @@ stdenv.mkDerivation ({ --replace "-install_name \\\$rpath/\\\$soname" "-install_name ''${!outputLib}/lib/\\\$soname" '' + ( - if targetPlatform != hostPlatform || stdenv.cc.libc != null then + lib.optionalString (targetPlatform != hostPlatform || stdenv.cc.libc != null) # On NixOS, use the right path to the dynamic linker instead of # `/lib/ld*.so'. - let + (let libc = if libcCross != null then libcCross else stdenv.cc.libc; in ( @@ -207,8 +207,8 @@ stdenv.mkDerivation ({ '' sed -i gcc/config/linux.h -e '1i#undef LOCAL_INCLUDE_DIR' '' - ) - else "") + )) + ) + lib.optionalString targetPlatform.isAvr '' makeFlagsArray+=( '-s' # workaround for hitting hydra log limit |