diff --git a/pkgs/development/compilers/gcc/4.6/builder.sh b/pkgs/development/compilers/gcc/4.6/builder.sh index bdf15be5a99..e3f185296a0 100644 --- a/pkgs/development/compilers/gcc/4.6/builder.sh +++ b/pkgs/development/compilers/gcc/4.6/builder.sh @@ -29,7 +29,7 @@ if test "$noSysDirs" = "1"; then # Use *real* header files, otherwise a limits.h is generated # that does not include Glibc's limits.h (notably missing # SSIZE_MAX, which breaks the build). - export NIX_FIXINC_DUMMY=$(cat $NIX_GCC/nix-support/orig-libc)/include + export NIX_FIXINC_DUMMY=$libc_dev/include # The path to the Glibc binaries such as `crti.o'. glibc_libdir="$(cat $NIX_GCC/nix-support/orig-libc)/lib" @@ -170,9 +170,8 @@ preConfigure() { # Patch the configure script so it finds glibc headers. It's # important for example in order not to get libssp built, # because its functionality is in glibc already. - glibc_headers="$(cat $NIX_GCC/nix-support/orig-libc)/include" sed -i \ - -e "s,glibc_header_dir=/usr/include,glibc_header_dir=$glibc_headers", \ + -e "s,glibc_header_dir=/usr/include,glibc_header_dir=$libc_dev/include", \ gcc/configure fi diff --git a/pkgs/development/compilers/gcc/4.6/default.nix b/pkgs/development/compilers/gcc/4.6/default.nix index 6713dd12b3c..af6e9ab0ee1 100644 --- a/pkgs/development/compilers/gcc/4.6/default.nix +++ b/pkgs/development/compilers/gcc/4.6/default.nix @@ -175,7 +175,7 @@ let version = "4.6.3"; "-stage-final"; crossNameAddon = if cross != null then "-${cross.config}" + stageNameAddon else ""; - bootstrap = cross == null && !stdenv.isArm && !stdenv.isMips; + bootstrap = cross == null && !stdenv.isArm && !stdenv.isMips; in @@ -187,13 +187,15 @@ stdenv.mkDerivation ({ builder = ./builder.sh; - src = (import ./sources.nix) { + srcs = (import ./sources.nix) { inherit fetchurl optional version; inherit langC langCC langFortran langJava langAda langGo; }; inherit patches enableMultilib; + libc_dev = stdenv.gcc.libc_dev; + postPatch = if (stdenv.isGNU || (libcCross != null # e.g., building `gcc.crossDrv'