From 361cf08c59cc49079c9528489a6cac04704b7f12 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 24 Oct 2006 13:50:21 +0000 Subject: [PATCH] * Add $pkg/lib64 (if it exists) to the library search path in addition to $pkg/lib. svn path=/nixpkgs/trunk/; revision=6820 --- pkgs/build-support/gcc-wrapper/builder.sh | 3 +++ pkgs/build-support/gcc-wrapper/setup-hook.sh | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/pkgs/build-support/gcc-wrapper/builder.sh b/pkgs/build-support/gcc-wrapper/builder.sh index e8dd5fa277f..b9a811dd747 100644 --- a/pkgs/build-support/gcc-wrapper/builder.sh +++ b/pkgs/build-support/gcc-wrapper/builder.sh @@ -22,6 +22,9 @@ if test -n "$nativeTools"; then gccPath="$nativePrefix/bin" ldPath="$nativePrefix/bin" else + if test -e "$gcc/lib64"; then + ldflags="$ldflags -L$gcc/lib64" + fi ldflags="$ldflags -L$gcc/lib" gccPath="$gcc/bin" ldPath="$binutils/bin" diff --git a/pkgs/build-support/gcc-wrapper/setup-hook.sh b/pkgs/build-support/gcc-wrapper/setup-hook.sh index 7a7ea822691..1739d8dcae5 100644 --- a/pkgs/build-support/gcc-wrapper/setup-hook.sh +++ b/pkgs/build-support/gcc-wrapper/setup-hook.sh @@ -3,6 +3,10 @@ addCVars () { export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$1/include" fi + if test -d $1/lib64; then + export NIX_LDFLAGS="$NIX_LDFLAGS -L$1/lib64" + fi + if test -d $1/lib; then export NIX_LDFLAGS="$NIX_LDFLAGS -L$1/lib" fi