diff options
author | Lluís Batlle i Rossell <viric@vicerveza.homeunix.net> | 2009-11-08 00:32:12 +0000 |
---|---|---|
committer | Lluís Batlle i Rossell <viric@vicerveza.homeunix.net> | 2009-11-08 00:32:12 +0000 |
commit | 4b27d2870197b26b7c170caa333944231715d4a3 (patch) | |
tree | 6b781861cb96e9ce0660ca0b904ed3dda1cc6905 /pkgs/build-support/gcc-wrapper | |
parent | 6e86ca940f9cb7fdbbf8663bc5c19af45fbc1e17 (diff) |
Porting changes from stdenv-updates into this branch. backups/stdenv-updates2@18273
This comes from: svn diff ^/nixpkgs/trunk/@18255 ^/nixpkgs/branches/stdenv-updates/ > diff patch -p0 < diff and then adding into svn all files new from the patch. trunk@18255 comes from the last time I updated stdenv-updates from trunk. svn path=/nixpkgs/stdenv-updates2/; revision=18272
Diffstat (limited to 'pkgs/build-support/gcc-wrapper')
-rw-r--r-- | pkgs/build-support/gcc-wrapper/builder.sh | 24 | ||||
-rw-r--r-- | pkgs/build-support/gcc-wrapper/default.nix | 7 | ||||
-rw-r--r-- | pkgs/build-support/gcc-wrapper/setup-hook.sh | 4 |
3 files changed, 24 insertions, 11 deletions
diff --git a/pkgs/build-support/gcc-wrapper/builder.sh b/pkgs/build-support/gcc-wrapper/builder.sh index 0fe3f3768f2ac..cf4d6dfed9639 100644 --- a/pkgs/build-support/gcc-wrapper/builder.sh +++ b/pkgs/build-support/gcc-wrapper/builder.sh @@ -83,7 +83,7 @@ mkGccWrapper() { if ! test -f "$src"; then echo "$src does not exist (skipping)" - return + return 1 fi gccProg="$src" @@ -91,18 +91,24 @@ mkGccWrapper() { chmod +x "$dst" } -mkGccWrapper $out/bin/gcc $gccPath/gcc -ln -s gcc $out/bin/cc +if mkGccWrapper $out/bin/gcc $gccPath/gcc +then + ln -sv gcc $out/bin/cc +fi -mkGccWrapper $out/bin/g++ $gccPath/g++ -ln -s g++ $out/bin/c++ +if mkGccWrapper $out/bin/g++ $gccPath/g++ +then + ln -sv g++ $out/bin/c++ +fi -if test -e $gccPath/gfortran; then - mkGccWrapper $out/bin/gfortran $gccPath/gfortran - ln -s gfortran $out/bin/g77 - ln -s gfortran $out/bin/f77 +if mkGccWrapper $out/bin/gfortran $gccPath/gfortran +then + ln -sv gfortran $out/bin/g77 + ln -sv gfortran $out/bin/f77 fi +mkGccWrapper $out/bin/gcj $gccPath/gcj || true + # Create a symlink to as (the assembler). This is useful when a # gcc-wrapper is installed in a user environment, as it ensures that diff --git a/pkgs/build-support/gcc-wrapper/default.nix b/pkgs/build-support/gcc-wrapper/default.nix index d517a472d7473..339aba74288ef 100644 --- a/pkgs/build-support/gcc-wrapper/default.nix +++ b/pkgs/build-support/gcc-wrapper/default.nix @@ -6,11 +6,11 @@ # variables so that the compiler and the linker just "work". { name ? "", stdenv, nativeTools, nativeLibc, nativePrefix ? "" -, gcc ? null, libc ? null, binutils ? null, shell ? "" +, gcc ? null, libc ? null, binutils ? null, coreutils ? null, shell ? "" }: assert nativeTools -> nativePrefix != ""; -assert !nativeTools -> gcc != null && binutils != null; +assert !nativeTools -> gcc != null && binutils != null && coreutils != null; assert !nativeLibc -> libc != null; let @@ -35,6 +35,8 @@ stdenv.mkDerivation { 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; @@ -54,6 +56,7 @@ stdenv.mkDerivation { if !nativeLibc then (if stdenv.system == "i686-linux" then "ld-linux.so.2" else if stdenv.system == "x86_64-linux" then "ld-linux-x86-64.so.2" else + if stdenv.system == "armv5tel-linux" then "ld-linux.so.3" else if stdenv.system == "powerpc-linux" then "ld.so.1" else abort "don't know the name of the dynamic linker for this platform") else ""; diff --git a/pkgs/build-support/gcc-wrapper/setup-hook.sh b/pkgs/build-support/gcc-wrapper/setup-hook.sh index 76167df3c31cf..513ab8053a7e9 100644 --- a/pkgs/build-support/gcc-wrapper/setup-hook.sh +++ b/pkgs/build-support/gcc-wrapper/setup-hook.sh @@ -27,3 +27,7 @@ fi if test -n "@libc@"; then addToSearchPath PATH @libc@/bin fi + +if test -n "@coreutils@"; then + addToSearchPath PATH @coreutils@/bin +fi |