From 57315e624db741d15215adc0c53884b1dd6511bb Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 20 Jan 2006 17:27:53 +0000 Subject: [PATCH] * Fix the gcc-4.0.2 build. It was impure: it used /lib/cpp during the building of libstdc++. * Add gcc-4.0.2 to the channel. svn path=/nixpkgs/trunk/; revision=4583 --- pkgs/development/compilers/gcc-4.0/builder.sh | 12 ++++++++++++ pkgs/development/compilers/gcc-4.0/default.nix | 2 +- pkgs/system/populate-cache.nix | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/gcc-4.0/builder.sh b/pkgs/development/compilers/gcc-4.0/builder.sh index 7808a2e4a9e..bbdb5939499 100644 --- a/pkgs/development/compilers/gcc-4.0/builder.sh +++ b/pkgs/development/compilers/gcc-4.0/builder.sh @@ -5,6 +5,12 @@ export NIX_FIXINC_DUMMY=$NIX_BUILD_TOP/dummy mkdir $NIX_FIXINC_DUMMY +# libstdc++ needs this; otherwise it will use /lib/cpp, which is a Bad +# Thing. +export CPP="gcc -E" +export CXXCPP="gcc -E" + + if test "$noSysDirs" = "1"; then if test "$noSysDirs" = "1"; then @@ -12,6 +18,7 @@ if test "$noSysDirs" = "1"; then # being generated to make sure that they use our glibc. if test -e $NIX_GCC/nix-support/orig-glibc; then glibc=$(cat $NIX_GCC/nix-support/orig-glibc) + # Ugh. Copied from gcc-wrapper/builder.sh. We can't just # source in $NIX_GCC/nix-support/add-flags, since that # would cause *this* GCC to be linked against the @@ -32,6 +39,11 @@ if test "$noSysDirs" = "1"; then hook=$(pwd)/ld-wrapper-hook echo "NIX_GLIBC_FLAGS_SET=1" > $hook export NIX_LD_WRAPPER_START_HOOK=$hook + + # 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=$glibc/include fi export NIX_EXTRA_CFLAGS=$extraCFlags diff --git a/pkgs/development/compilers/gcc-4.0/default.nix b/pkgs/development/compilers/gcc-4.0/default.nix index 5caccbeb4cf..a744c1c504c 100644 --- a/pkgs/development/compilers/gcc-4.0/default.nix +++ b/pkgs/development/compilers/gcc-4.0/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation { name = "gcc-4.0.2"; builder = ./builder.sh; src = fetchurl { - url = ftp://ftp.nluug.nl/mirror/languages/gcc/releases/gcc-4.0.2/gcc-4.0.2.tar.bz2; + url = ftp://ftp.gnu.org/pub/gnu/gcc/gcc-4.0.2/gcc-4.0.2.tar.bz2; md5 = "a659b8388cac9db2b13e056e574ceeb0"; }; # !!! apply only if noSysDirs is set diff --git a/pkgs/system/populate-cache.nix b/pkgs/system/populate-cache.nix index 84cf6038009..2f67e7bcefd 100644 --- a/pkgs/system/populate-cache.nix +++ b/pkgs/system/populate-cache.nix @@ -38,6 +38,7 @@ let { bisonnew flexnew gccWrapped + gcc40 aterm kernel # ov511