1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-21 13:10:33 +00:00

gcc/gcc-cross-wrapper: making gcc47 work with uclibc

It wants pthreads, and libpthreads wants libdl, and this can
only be found with -rpath-link when cross building.
This commit is contained in:
Lluís Batlle i Rossell 2012-12-22 17:53:35 +01:00
parent 2194b98565
commit 651734b619
2 changed files with 2 additions and 2 deletions

View file

@ -28,7 +28,7 @@ if test -z "$nativeLibc"; then
echo "$cflagsCompile -B$libc/lib/ -idirafter $libc/include -idirafter $gcc/lib/gcc/*/*/include-fixed" > $out/nix-support/libc-cflags
echo "-L$libc/lib" > $out/nix-support/libc-ldflags
echo "-L$libc/lib -rpath $libc/lib -rpath-link $libc/lib" > $out/nix-support/libc-ldflags
# The dynamic linker is passed in `ldflagsBefore' to allow
# explicit overrides of the dynamic linker by callers to gcc/ld

View file

@ -71,7 +71,7 @@ if test "$noSysDirs" = "1"; then
unset CPATH
if test -z "$crossStageStatic"; then
EXTRA_TARGET_CFLAGS="-B${libcCross}/lib -idirafter ${libcCross}/include"
EXTRA_TARGET_LDFLAGS="-Wl,-L${libcCross}/lib"
EXTRA_TARGET_LDFLAGS="-Wl,-L${libcCross}/lib -Wl,-rpath,${libcCross}/lib -Wl,-rpath-link,${libcCross}/lib"
fi
else
if test -z "$NIX_GCC_CROSS"; then