* Trying to get gcc-static to build on x86_64. Still doesn't work though.

svn path=/nixpkgs/trunk/; revision=6809
This commit is contained in:
Eelco Dolstra 2006-10-23 18:56:43 +00:00
parent 491f9dec21
commit b495d3f65e
4 changed files with 11 additions and 7 deletions

View File

@ -14,8 +14,7 @@ if test "$noSysDirs" = "1"; then
# Figure out what extra flags to pass to the gcc compilers 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)
if test -n $glibc; then
# Ugh. Copied from gcc-wrapper/builder.sh. We can't just
# source in $NIX_GCC/nix-support/add-flags, since that would
@ -37,6 +36,10 @@ if test "$noSysDirs" = "1"; then
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
@ -65,7 +68,7 @@ preConfigure() {
export LDFLFAGS="-static"
configureScript=../$sourceRoot/configure
configureFlags="--enable-languages=c"
configureFlags="--enable-languages=c --disable-libstdcxx-pch"
}

View File

@ -1,6 +1,7 @@
{ stdenv, fetchurl
, langC ? true, langCC ? true, langF77 ? false
, profiledCompiler ? false
, glibc
}:
assert langC;
@ -12,7 +13,7 @@ stdenv.mkDerivation {
url = http://nix.cs.uu.nl/dist/tarballs/gcc-4.1.1.tar.bz2;
md5 = "ad9f97a4d04982ccf4fd67cb464879f3";
};
patches = [./no-sys-dirs.patch];
inherit langC langCC langF77 profiledCompiler;
patches = [./pass-cxxcpp.patch ./no-sys-dirs.patch];
inherit langC langCC langF77 profiledCompiler glibc;
noSysDirs = 1;
}

View File

@ -14,7 +14,7 @@ diff -rc gcc-orig/Makefile.in gcc-4.1.1/Makefile.in
RAW_CXX_TARGET_EXPORTS = \
$(BASE_TARGET_EXPORTS) \
CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \
! CXX="$(RAW_CXX_FOR_TARGET)"; export CXX; \
! CXX="$(RAW_CXX_FOR_TARGET) $(CFLAGS_FOR_BUILD)"; export CXX; \
! CXXCPP="$(RAW_CXX_FOR_TARGET) $(CFLAGS_FOR_BUILD) -E"; export CXXCPP;
NORMAL_TARGET_EXPORTS = \

View File

@ -23,7 +23,7 @@ let
binutils = pkgsDiet.binutils217;
gcc = import ../../development/compilers/gcc-static-4.1 {
inherit (pkgs) fetchurl stdenv;
inherit (pkgs) fetchurl stdenv glibc;
profiledCompiler = false;
langCC = false;
};