From d6cbd38bfb9b714589bfa4949b053c95a2902b2b Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 26 Aug 2003 10:34:51 +0000 Subject: [PATCH] * Patched Perl's configure script to stop it from scanning well-known system directories for libraries. (Fortunately, the build would still fail because Perl's idea of "standard" library directories no longer matched that of the linker.) * `stdenv-linux/setup.sh' now puts the path of glibc in an environment variable so that it can be used by other packages (for example, we need to pass it to Perl's configure, because otherwise it will think that, e.g., libm.so doesn't exist). svn path=/nixpkgs/trunk/; revision=359 --- pkgs/perl/perl-build.sh | 14 ++++++++++++-- pkgs/stdenv-linux/setup.sh | 3 +++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/pkgs/perl/perl-build.sh b/pkgs/perl/perl-build.sh index c0f13934450..7a925e6dbfd 100755 --- a/pkgs/perl/perl-build.sh +++ b/pkgs/perl/perl-build.sh @@ -7,10 +7,20 @@ cd perl-* || exit 1 # Perl's Configure messes with PATH. We can't have that, so we patch it. # Yeah, this is an ugly hack. -grep -v '^paths=' Configure > Configure.tmp || exit 1 +cat Configure | \ + grep -v '^paths=' | \ + grep -v '^locincpth=' | \ + grep -v '^xlibpth=' | \ + grep -v '^glibpth=' | \ + grep -v '^loclibpth=' | \ + grep -v '^locincpth=' | \ + cat > Configure.tmp || exit 1 mv Configure.tmp Configure || exit 1 chmod +x Configure || exit 1 -./Configure -de -Dcc=gcc -Dprefix=$out -Uinstallusrbinperl || exit 1 +./Configure -de -Dcc=gcc -Dprefix=$out -Uinstallusrbinperl \ + -Dlocincpth="$NIX_LIBC_INCLUDES" \ + -Dloclibpth="$NIX_LIBC_LIBS" \ + || exit 1 make || exit 1 make install || exit 1 diff --git a/pkgs/stdenv-linux/setup.sh b/pkgs/stdenv-linux/setup.sh index ce25963e912..1e7c8b4d2a5 100644 --- a/pkgs/stdenv-linux/setup.sh +++ b/pkgs/stdenv-linux/setup.sh @@ -7,3 +7,6 @@ export NIX_CFLAGS="-isystem @GLIBC@/include $NIX_CFLAGS" export NIX_LDFLAGS="-L@GLIBC@/lib -Wl,-dynamic-linker,@GLIBC@/lib/ld-linux.so.2,-rpath,@GLIBC@/lib $NIX_LDFLAGS -L@GCC@/lib -Wl,-rpath,@GCC@/lib" export NIX_CC=@CC@ export NIX_CXX=@CXX@ + +export NIX_LIBC_INCLUDES="@GLIBC@/include" +export NIX_LIBC_LIBS="@GLIBC@/lib"