forked from mirrors/nixpkgs
gcc 4.7: when cross-building for GNU, patch gnu.h', not
i386/gnu.h'
This commit is contained in:
parent
0397d7c51e
commit
cd30b83fd8
|
@ -181,7 +181,6 @@ stdenv.mkDerivation ({
|
||||||
let
|
let
|
||||||
libc = if libcCross != null then libcCross else stdenv.glibc;
|
libc = if libcCross != null then libcCross else stdenv.glibc;
|
||||||
gnu_h = "gcc/config/gnu.h";
|
gnu_h = "gcc/config/gnu.h";
|
||||||
i386_gnu_h = "gcc/config/i386/gnu-user.h";
|
|
||||||
extraCPPDeps =
|
extraCPPDeps =
|
||||||
libc.propagatedBuildInputs
|
libc.propagatedBuildInputs
|
||||||
++ stdenv.lib.optional (libpthreadCross != null) libpthreadCross
|
++ stdenv.lib.optional (libpthreadCross != null) libpthreadCross
|
||||||
|
@ -194,8 +193,8 @@ stdenv.mkDerivation ({
|
||||||
then "-L${libpthreadCross}/lib ${libpthreadCross.TARGET_LDFLAGS}"
|
then "-L${libpthreadCross}/lib ${libpthreadCross.TARGET_LDFLAGS}"
|
||||||
else "-L${libpthread}/lib";
|
else "-L${libpthread}/lib";
|
||||||
in
|
in
|
||||||
'' echo "augmenting \`CPP_SPEC' in \`${i386_gnu_h}' with \`${extraCPPSpec}'..."
|
'' echo "augmenting \`CPP_SPEC' in \`${gnu_h}' with \`${extraCPPSpec}'..."
|
||||||
sed -i "${i386_gnu_h}" \
|
sed -i "${gnu_h}" \
|
||||||
-es'|CPP_SPEC *"\(.*\)$|CPP_SPEC "${extraCPPSpec} \1|g'
|
-es'|CPP_SPEC *"\(.*\)$|CPP_SPEC "${extraCPPSpec} \1|g'
|
||||||
|
|
||||||
echo "augmenting \`LIB_SPEC' in \`${gnu_h}' with \`${extraLibSpec}'..."
|
echo "augmenting \`LIB_SPEC' in \`${gnu_h}' with \`${extraLibSpec}'..."
|
||||||
|
|
Loading…
Reference in a new issue