diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2006-10-27 13:44:17 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2006-10-27 13:44:17 +0000 |
commit | 01fbf62a2c54b759d7ec438bf78ec854adcbb2bd (patch) | |
tree | 3f105dffa424da33f46b7a58a8f22a57ef751e28 /pkgs/build-support | |
parent | c43f885d2d12b1d71b16d22ff9dae69a33bd48ac (diff) | |
download | nixlib-01fbf62a2c54b759d7ec438bf78ec854adcbb2bd.tar nixlib-01fbf62a2c54b759d7ec438bf78ec854adcbb2bd.tar.gz nixlib-01fbf62a2c54b759d7ec438bf78ec854adcbb2bd.tar.bz2 nixlib-01fbf62a2c54b759d7ec438bf78ec854adcbb2bd.tar.lz nixlib-01fbf62a2c54b759d7ec438bf78ec854adcbb2bd.tar.xz nixlib-01fbf62a2c54b759d7ec438bf78ec854adcbb2bd.tar.zst nixlib-01fbf62a2c54b759d7ec438bf78ec854adcbb2bd.zip |
* nativeGlibc -> nativeLibc (gcc-cross-wrapper is probably broken
right now; should merge gcc-wrapper changes). svn path=/nixpkgs/trunk/; revision=6876
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/gcc-cross-wrapper/builder.sh | 14 | ||||
-rw-r--r-- | pkgs/build-support/gcc-cross-wrapper/default.nix | 8 |
2 files changed, 11 insertions, 11 deletions
diff --git a/pkgs/build-support/gcc-cross-wrapper/builder.sh b/pkgs/build-support/gcc-cross-wrapper/builder.sh index 1a8afbc070ed..ff4a9848ec18 100644 --- a/pkgs/build-support/gcc-cross-wrapper/builder.sh +++ b/pkgs/build-support/gcc-cross-wrapper/builder.sh @@ -5,7 +5,7 @@ source $substitute # Force gcc to use ld-wrapper.sh when calling ld. cflagsCompile="-B$out/bin/" -if test -z "$nativeGlibc"; then +if test -z "$nativeLibc"; then # The "-B$glibc/lib/" flag is a quick hack to force gcc to link # against the crt1.o from our own glibc, rather than the one in # /usr/lib. The real solution is of course to prevent those paths @@ -13,10 +13,10 @@ if test -z "$nativeGlibc"; then # The dynamic linker is passed in `ldflagsBefore' to allow # explicit overrides of the dynamic linker by callers to gcc/ld # (the *last* value counts, so ours should come first). - cflagsCompile="$cflagsCompile -B$glibc/usr/lib/ -isystem $glibc/usr/include" - ldflags="$ldflags -L$glibc/usr/lib" - #ldflagsBefore="-dynamic-linker $glibc/lib/ld-linux.so.2" - ldflagsBefore="-dynamic-linker $glibc/lib/ld-uClibc.so.0" + cflagsCompile="$cflagsCompile -B$libc/usr/lib/ -isystem $libc/usr/include" + ldflags="$ldflags -L$libc/usr/lib" + #ldflagsBefore="-dynamic-linker $libc/lib/ld-linux.so.2" + ldflagsBefore="-dynamic-linker $libc/lib/ld-uClibc.so.0" fi if test -n "$nativeTools"; then @@ -43,7 +43,7 @@ doSubstitute() { --subst-var "gcc" \ --subst-var "gccProg" \ --subst-var "binutils" \ - --subst-var "glibc" \ + --subst-var "libc" \ --subst-var "cflagsCompile" \ --subst-var "cflagsLink" \ --subst-var "ldflags" \ @@ -91,7 +91,7 @@ chmod +x "$out/bin/$cross-ld" # Emit a setup hook. Also store the path to the original GCC and # Glibc. test -n "$gcc" && echo $gcc > $out/nix-support/orig-gcc -test -n "$glibc" && echo $glibc > $out/nix-support/orig-glibc +test -n "$libc" && echo $libc > $out/nix-support/orig-libc doSubstitute "$addFlags" "$out/nix-support/add-flags" diff --git a/pkgs/build-support/gcc-cross-wrapper/default.nix b/pkgs/build-support/gcc-cross-wrapper/default.nix index 09f7f006928e..9be44f9b4662 100644 --- a/pkgs/build-support/gcc-cross-wrapper/default.nix +++ b/pkgs/build-support/gcc-cross-wrapper/default.nix @@ -5,13 +5,13 @@ # stdenv.mkDerivation provides a wrapper that sets up the right environment # variables so that the compiler and the linker just "work". -{ name ? "", stdenv, nativeTools, nativeGlibc, nativePrefix ? "" -, gcc ? null, glibc ? null, binutils ? null, shell ? "", cross ? "" +{ name ? "", stdenv, nativeTools, nativeLibc, nativePrefix ? "" +, gcc ? null, libc ? null, binutils ? null, shell ? "", cross ? "" }: assert nativeTools -> nativePrefix != ""; assert !nativeTools -> gcc != null && binutils != null; -assert !nativeGlibc -> glibc != null; +assert !nativeLibc -> libc != null; stdenv.mkDerivation { builder = ./builder.sh; @@ -21,7 +21,7 @@ stdenv.mkDerivation { ldWrapper = ./ld-wrapper.sh; utils = ./utils.sh; addFlags = ./add-flags; - inherit nativeTools nativeGlibc nativePrefix gcc glibc binutils cross; + inherit nativeTools nativeLibc nativePrefix gcc libc binutils cross; name = if name == "" then gcc.name else name; langC = if nativeTools then true else gcc.langC; langCC = if nativeTools then true else gcc.langCC; |