gcc-cross-wrapper: fix for non-chroot build
When `libc` is not set, many lines expand to `/lib`, `/include`, which makes gccCross use host libraries outside Nix (with a different architecture).
This commit is contained in:
parent
47024938a2
commit
662721a461
|
@ -7,7 +7,7 @@ mkdir $out/nix-support
|
|||
# Force gcc to use ld-wrapper.sh when calling ld.
|
||||
cflagsCompile="-B$out/bin/"
|
||||
|
||||
if test -z "$nativeLibc"; then
|
||||
if test -z "$nativeLibc" -a -n "$libc"; then
|
||||
cflagsCompile="$cflagsCompile -B$gccLibs/lib -B$libc/lib/ -isystem $libc/include"
|
||||
ldflags="$ldflags -L$libc/lib"
|
||||
# Get the proper dynamic linker for glibc and uclibc.
|
||||
|
|
Loading…
Reference in a new issue