1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00

GCC 4.6: Fix `gccCrossStageFinal' for GNU/Hurd.

svn path=/nixpkgs/trunk/; revision=32853
This commit is contained in:
Ludovic Courtès 2012-03-07 16:01:07 +00:00
parent 7f3aa94399
commit 09531a24ad

View file

@ -44,6 +44,9 @@ with builtins;
let version = "4.6.3";
# Whether building a cross-compiler for GNU/Hurd.
crossGNU = cross != null && cross.config == "i586-pc-gnu";
patches = [ ]
++ optional (cross != null) ./libstdc++-target.patch
++ optional noSysDirs ./no-sys-dirs.patch
@ -51,7 +54,7 @@ let version = "4.6.3";
# target libraries and tools.
++ optional langAda ./gnat-cflags.patch
++ optional langVhdl ./ghdl-ortho-cflags.patch
++ optional stdenv.isGNU ./hurd-sigrtmin.patch;
++ optional (stdenv.isGNU || crossGNU) ./hurd-sigrtmin.patch;
javaEcj = fetchurl {
# The `$(top_srcdir)/ecj.jar' file is automatically picked up at
@ -150,12 +153,11 @@ stdenv.mkDerivation ({
inherit patches;
postPatch =
if (stdenv.system == "i586-pc-gnu"
if (stdenv.isGNU
|| (libcCross != null # e.g., building `gcc.hostDrv'
&& libcCross ? crossConfig
&& libcCross.crossConfig == "i586-pc-gnu")
|| (cross != null && cross.config == "i586-pc-gnu"
&& libcCross != null))
|| (crossGNU && libcCross != null))
then
# On GNU/Hurd glibc refers to Hurd & Mach headers and libpthread is not
# in glibc, so add the right `-I' flags to the default spec string.