gcc: Fix building against the split Glibc

This commit is contained in:
Eelco Dolstra 2013-06-11 21:00:13 +02:00
parent d8231a66eb
commit 85bdb46370
2 changed files with 6 additions and 5 deletions

View File

@ -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

View File

@ -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'