gcc: Fix building against the split Glibc
This commit is contained in:
parent
d8231a66eb
commit
85bdb46370
@ -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
|
||||
|
||||
|
||||
@ -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'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user