From 29ee6afbeadb5793687e7dfb8ca5cfefd66a3393 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 13 Jul 2010 23:42:25 +0000 Subject: [PATCH] GCC 4.5: Patch the right header file for pthread on GNU. svn path=/nixpkgs/trunk/; revision=22593 --- pkgs/development/compilers/gcc-4.5/default.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkgs/development/compilers/gcc-4.5/default.nix b/pkgs/development/compilers/gcc-4.5/default.nix index 410f9514fed..f495b07d202 100644 --- a/pkgs/development/compilers/gcc-4.5/default.nix +++ b/pkgs/development/compilers/gcc-4.5/default.nix @@ -154,7 +154,8 @@ stdenv.mkDerivation ({ # in glibc, 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"; + gnu_h = "gcc/config/gnu.h"; + i386_gnu_h = "gcc/config/i386/gnu.h"; extraCPPDeps = libc.propagatedBuildInputs ++ stdenv.lib.optional (libpthreadCross != null) libpthreadCross @@ -165,12 +166,12 @@ stdenv.mkDerivation ({ pthreadLib = if libpthreadCross != null then libpthreadCross else libpthread; in - '' echo "augmenting \`CPP_SPEC' in \`${config_h}' with \`${extraCPPSpec}'..." - sed -i "${config_h}" \ + '' echo "augmenting \`CPP_SPEC' in \`${i386_gnu_h}' with \`${extraCPPSpec}'..." + sed -i "${i386_gnu_h}" \ -es'|CPP_SPEC *"\(.*\)$|CPP_SPEC "${extraCPPSpec} \1|g' - echo "augmenting \`LIB_SPEC' in \`${config_h}' for libpthread at \`${pthreadLib}'..." - sed -i "${config_h}" \ + echo "augmenting \`LIB_SPEC' in \`${gnu_h}' for libpthread at \`${pthreadLib}'..." + sed -i "${gnu_h}" \ -es'|LIB_SPEC *"\(.*\)$|LIB_SPEC "-L${pthreadLib}/lib \1|g' '' else null;