From d3b29d16a001bc7c561f40738860a60605104489 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 16 May 2007 15:15:46 +0000 Subject: [PATCH] * wrapGCC: pass the right purity options for the platform. svn path=/nixpkgs/trunk/; revision=8710 --- pkgs/build-support/gcc-wrapper/default.nix | 2 ++ pkgs/top-level/all-packages.nix | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/build-support/gcc-wrapper/default.nix b/pkgs/build-support/gcc-wrapper/default.nix index 24309c7ab87..b9374705830 100644 --- a/pkgs/build-support/gcc-wrapper/default.nix +++ b/pkgs/build-support/gcc-wrapper/default.nix @@ -20,12 +20,14 @@ stdenv.mkDerivation { ldWrapper = ./ld-wrapper.sh; utils = ./utils.sh; addFlags = ./add-flags; + inherit nativeTools nativeLibc nativePrefix gcc libc 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; langF77 = if nativeTools then false else gcc.langF77; shell = if shell == "" then stdenv.shell else shell; + meta = if gcc != null && (gcc ? meta) then gcc.meta else { description = "System C compiler wrapper"; }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6a30757bf04..6f1491c0c99 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -844,16 +844,16 @@ rec { }; wrapGCC = baseGCC: import ../build-support/gcc-wrapper { - nativeTools = false; - nativeLibc = false; + nativeTools = stdenv ? gcc && stdenv.gcc.nativeTools; + nativeLibc = stdenv ? gcc && stdenv.gcc.nativeLibc; gcc = baseGCC; libc = glibc; inherit stdenv binutils; }; wrapGCCNew = baseGCC: import ../build-support/gcc-wrapper-new { - nativeTools = false; - nativeLibc = false; + nativeTools = stdenv ? gcc && stdenv.gcc.nativeTools; + nativeLibc = stdenv ? gcc && stdenv.gcc.nativeLibc; gcc = baseGCC; libc = glibc; inherit stdenv binutils;