mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-14 15:36:47 +03:00
GCC 4.5: Patch the spec string for GNU/Hurd to add the right `-I' flags.
svn path=/nixpkgs/trunk/; revision=21934
This commit is contained in:
parent
77430510ed
commit
000c2c51fd
@ -143,6 +143,27 @@ stdenv.mkDerivation ({
|
||||
++ optional langVhdl ./ghdl-ortho-cflags.patch
|
||||
;
|
||||
|
||||
postPatch =
|
||||
if (stdenv.system == "i586-pc-gnu"
|
||||
|| (cross != null && cross.config == "i586-pc-gnu"
|
||||
&& libcCross != null))
|
||||
then
|
||||
# On GNU/Hurd glibc refers to Hurd & Mach headers so add the right `-I'
|
||||
# flags to the default spec string.
|
||||
let
|
||||
libc = if cross != null then libcCross else stdenv.glibc;
|
||||
config_h = "gcc/config/i386/gnu.h";
|
||||
extraCPPSpec =
|
||||
concatStrings (intersperse " "
|
||||
(map (x: "-I${x}/include")
|
||||
libc.propagatedBuildInputs));
|
||||
in
|
||||
'' echo "augmenting \`CPP_SPEC' in \`${config_h}' with \`${extraCPPSpec}'..."
|
||||
sed -i "${config_h}" \
|
||||
-es'|CPP_SPEC *"\(.*\)$|CPP_SPEC "${extraCPPSpec} \1|g'
|
||||
''
|
||||
else null;
|
||||
|
||||
inherit noSysDirs profiledCompiler staticCompiler langJava crossStageStatic
|
||||
libcCross crossMingw;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user