Skip to content

Commit

Permalink
gcc 4.7: when cross-building for GNU, patch gnu.h', not i386/gnu.h'
Browse files Browse the repository at this point in the history
  • Loading branch information
civodul committed Nov 29, 2012
1 parent 0397d7c commit cd30b83
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkgs/development/compilers/gcc/4.7/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ stdenv.mkDerivation ({
let
libc = if libcCross != null then libcCross else stdenv.glibc;
gnu_h = "gcc/config/gnu.h";
i386_gnu_h = "gcc/config/i386/gnu-user.h";
extraCPPDeps =
libc.propagatedBuildInputs
++ stdenv.lib.optional (libpthreadCross != null) libpthreadCross
Expand All @@ -194,8 +193,8 @@ stdenv.mkDerivation ({
then "-L${libpthreadCross}/lib ${libpthreadCross.TARGET_LDFLAGS}"
else "-L${libpthread}/lib";
in
'' echo "augmenting \`CPP_SPEC' in \`${i386_gnu_h}' with \`${extraCPPSpec}'..."
sed -i "${i386_gnu_h}" \
'' echo "augmenting \`CPP_SPEC' in \`${gnu_h}' with \`${extraCPPSpec}'..."
sed -i "${gnu_h}" \
-es'|CPP_SPEC *"\(.*\)$|CPP_SPEC "${extraCPPSpec} \1|g'
echo "augmenting \`LIB_SPEC' in \`${gnu_h}' with \`${extraLibSpec}'..."
Expand Down

0 comments on commit cd30b83

Please sign in to comment.