diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2009-03-25 17:34:38 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2009-03-25 17:34:38 +0000 |
commit | d9213df2c107753963f99e34a100c8e16ed76d06 (patch) | |
tree | 33689cb57cb6712f0d01268c7ef4645313b0f4ec /pkgs/build-support/gcc-wrapper | |
parent | d0555f176bec981abd082c565f7770ba963c6b8e (diff) | |
download | nixlib-d9213df2c107753963f99e34a100c8e16ed76d06.tar nixlib-d9213df2c107753963f99e34a100c8e16ed76d06.tar.gz nixlib-d9213df2c107753963f99e34a100c8e16ed76d06.tar.bz2 nixlib-d9213df2c107753963f99e34a100c8e16ed76d06.tar.lz nixlib-d9213df2c107753963f99e34a100c8e16ed76d06.tar.xz nixlib-d9213df2c107753963f99e34a100c8e16ed76d06.tar.zst nixlib-d9213df2c107753963f99e34a100c8e16ed76d06.zip |
* gcc-wrapper: put "gcc-wrapper" in the name, e.g. "gcc-wrapper-4.3.3"
instead of "gcc-4.3.3". This fixed the long-standing annoyance that you can't distinguish the two in (say) nix-store -qR. * On x86_64-linux, put $out/lib64 in the RPATH in addition to $out/lib, because some packages (in particular GCC) put libraries in $out/lib64 and ended up linking against the wrong library. * Strip $out/lib64. * Removed g77_42 because it's exactly the same as gfortran. svn path=/nixpkgs/branches/stdenv-updates/; revision=14708
Diffstat (limited to 'pkgs/build-support/gcc-wrapper')
-rw-r--r-- | pkgs/build-support/gcc-wrapper/default.nix | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pkgs/build-support/gcc-wrapper/default.nix b/pkgs/build-support/gcc-wrapper/default.nix index 8d38db791f29..a87e39b56374 100644 --- a/pkgs/build-support/gcc-wrapper/default.nix +++ b/pkgs/build-support/gcc-wrapper/default.nix @@ -5,7 +5,7 @@ # stdenv.mkDerivation provides a wrapper that sets up the right environment # variables so that the compiler and the linker just "work". -{ name ? "", stdenv, nativeTools, nativeLibc, nativePrefix ? "" +{ name ? "gcc-wrapper", stdenv, nativeTools, nativeLibc, nativePrefix ? "" , gcc ? null, libc ? null, binutils ? null, shell ? "" }: @@ -13,7 +13,11 @@ assert nativeTools -> nativePrefix != ""; assert !nativeTools -> gcc != null && binutils != null; assert !nativeLibc -> libc != null; +let gccVersion = (builtins.parseDrvName gcc.name).version; in + stdenv.mkDerivation { + name = name + (if gcc != null && gccVersion != "" then "-" + gccVersion else ""); + builder = ./builder.sh; setupHook = ./setup-hook.sh; gccWrapper = ./gcc-wrapper.sh; @@ -25,7 +29,6 @@ stdenv.mkDerivation { libc = if nativeLibc then null else libc; binutils = if nativeTools then null else binutils; - name = if name == "" then gcc.name else name; langC = if nativeTools then true else gcc.langC; langCC = if nativeTools then true else gcc.langCC; langFortran = if nativeTools then false else gcc ? langFortran; |