diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-02-04 16:58:12 +0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-02-05 19:18:33 +0100 |
commit | 7703f04b751084aecca9eeda4517ce7c053a4000 (patch) | |
tree | 8901c18219b1351d1ddfbb7381844007b5690736 /pkgs/build-support | |
parent | e060d9a2ffb677f7482ddba4845544392a1f4b28 (diff) | |
download | nixlib-7703f04b751084aecca9eeda4517ce7c053a4000.tar nixlib-7703f04b751084aecca9eeda4517ce7c053a4000.tar.gz nixlib-7703f04b751084aecca9eeda4517ce7c053a4000.tar.bz2 nixlib-7703f04b751084aecca9eeda4517ce7c053a4000.tar.lz nixlib-7703f04b751084aecca9eeda4517ce7c053a4000.tar.xz nixlib-7703f04b751084aecca9eeda4517ce7c053a4000.tar.zst nixlib-7703f04b751084aecca9eeda4517ce7c053a4000.zip |
Add a stdenv adapter ‘useGoldLinker’ to force use of Gold
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/clang-wrapper/default.nix | 10 | ||||
-rw-r--r-- | pkgs/build-support/gcc-wrapper/default.nix | 8 |
2 files changed, 9 insertions, 9 deletions
diff --git a/pkgs/build-support/clang-wrapper/default.nix b/pkgs/build-support/clang-wrapper/default.nix index 05b8194697e1..49ee34e99263 100644 --- a/pkgs/build-support/clang-wrapper/default.nix +++ b/pkgs/build-support/clang-wrapper/default.nix @@ -18,21 +18,21 @@ let clangVersion = (builtins.parseDrvName clang.name).version; clangName = (builtins.parseDrvName clang.name).name; - + in stdenv.mkDerivation { name = (if name != "" then name else clangName + "-wrapper") + (if clang != null && clangVersion != "" then "-" + clangVersion else ""); - + builder = ./builder.sh; setupHook = ./setup-hook.sh; clangWrapper = ./clang-wrapper.sh; ldWrapper = ./ld-wrapper.sh; utils = ./utils.sh; addFlags = ./add-flags; - + inherit nativeTools nativeLibc nativePrefix clang clangVersion libcxx; libcxxabi = libcxx.abi or null; @@ -42,7 +42,7 @@ stdenv.mkDerivation { binutils = if nativeTools then null else binutils; # The wrapper scripts use 'cat', so we may need coreutils coreutils = if nativeTools then null else coreutils; - + langC = true; langCC = true; shell = if shell == "" then stdenv.shell else @@ -65,7 +65,7 @@ stdenv.mkDerivation { if stdenv.lib.hasSuffix "pc-gnu" stdenv.cross.config then "ld.so.1" else abort "don't know the name of the dynamic linker for this platform"); }; - + meta = let clang_ = if clang != null then clang else {}; in (if clang_ ? meta then removeAttrs clang.meta ["priority"] else {}) // diff --git a/pkgs/build-support/gcc-wrapper/default.nix b/pkgs/build-support/gcc-wrapper/default.nix index 58dde3485ca0..1f521f405850 100644 --- a/pkgs/build-support/gcc-wrapper/default.nix +++ b/pkgs/build-support/gcc-wrapper/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation { name = (if name != "" then name else gccName + "-wrapper") + (if gcc != null && gccVersion != "" then "-" + gccVersion else ""); - + builder = ./builder.sh; setupHook = ./setup-hook.sh; gccWrapper = ./gcc-wrapper.sh; @@ -39,13 +39,13 @@ stdenv.mkDerivation { ldSolarisWrapper = ./ld-solaris-wrapper.sh; utils = ./utils.sh; addFlags = ./add-flags; - + inherit nativeTools nativeLibc nativePrefix gcc; libc = if nativeLibc then null else libc; binutils = if nativeTools then null else binutils; # The wrapper scripts use 'cat', so we may need coreutils coreutils = if nativeTools then null else coreutils; - + langC = if nativeTools then true else gcc.langC; langCC = if nativeTools then true else gcc.langCC; langFortran = if nativeTools then false else gcc ? langFortran; @@ -72,7 +72,7 @@ stdenv.mkDerivation { if stdenv.lib.hasSuffix "pc-gnu" stdenv.cross.config then "ld.so.1" else abort "don't know the name of the dynamic linker for this platform"); }; - + meta = let gcc_ = if gcc != null then gcc else {}; in (if gcc_ ? meta then removeAttrs gcc.meta ["priority"] else {}) // |