cc-wrapper: small changes, mostly just cosmetic ones
This commit is contained in:
parent
9d1343414a
commit
e22d26bedb
@ -78,7 +78,7 @@ stdenv.mkDerivation {
|
|||||||
'')
|
'')
|
||||||
|
|
||||||
+ optionalString (!nativeLibc) ''
|
+ optionalString (!nativeLibc) ''
|
||||||
# The "-B$libc/lib/" flag is a quick hack to force gcc to link
|
# The "-B${libc_lib}/lib/" flag is a quick hack to force gcc to link
|
||||||
# against the crt1.o from our own glibc, rather than the one in
|
# against the crt1.o from our own glibc, rather than the one in
|
||||||
# /usr/lib. (This is only an issue when using an `impure'
|
# /usr/lib. (This is only an issue when using an `impure'
|
||||||
# compiler/linker, i.e., one that searches /usr/lib and so on.)
|
# compiler/linker, i.e., one that searches /usr/lib and so on.)
|
||||||
@ -89,7 +89,7 @@ stdenv.mkDerivation {
|
|||||||
# compile, because it uses "#include_next <limits.h>" to find the
|
# compile, because it uses "#include_next <limits.h>" to find the
|
||||||
# limits.h file in ../includes-fixed. To remedy the problem,
|
# limits.h file in ../includes-fixed. To remedy the problem,
|
||||||
# another -idirafter is necessary to add that directory again.
|
# another -idirafter is necessary to add that directory again.
|
||||||
echo "-B${libc_lib}/lib/ -idirafter ${libc_dev}/include -idirafter $cc/lib/gcc/*/*/include-fixed" > $out/nix-support/libc-cflags
|
echo "-B${libc_lib}/lib/ -idirafter ${libc_dev}/include -idirafter ${cc}/lib/gcc/*/*/include-fixed" > $out/nix-support/libc-cflags
|
||||||
|
|
||||||
echo "-L${libc_lib}/lib" > $out/nix-support/libc-ldflags
|
echo "-L${libc_lib}/lib" > $out/nix-support/libc-ldflags
|
||||||
|
|
||||||
@ -102,13 +102,13 @@ stdenv.mkDerivation {
|
|||||||
'' else ''
|
'' else ''
|
||||||
echo $cc > $out/nix-support/orig-cc
|
echo $cc > $out/nix-support/orig-cc
|
||||||
|
|
||||||
# GCC shows $cc/lib in `gcc -print-search-dirs', but not
|
# GCC shows ${cc_solib}/lib in `gcc -print-search-dirs', but not
|
||||||
# $cc/lib64 (even though it does actually search there...)..
|
# ${cc_solib}/lib64 (even though it does actually search there...)..
|
||||||
# This confuses libtool. So add it to the compiler tool search
|
# This confuses libtool. So add it to the compiler tool search
|
||||||
# path explicitly.
|
# path explicitly.
|
||||||
if [ -e "${cc.out}/lib64" -a ! -L "${cc.out}/lib64" ]; then
|
if [ -e "${cc_solib}/lib64" -a ! -L "${cc_solib}/lib64" ]; then
|
||||||
ccLDFlags+=" -L${cc_solib}/lib64"
|
ccLDFlags+=" -L${cc_solib}/lib64"
|
||||||
ccCFlags+=" -B${cc.out}/lib64"
|
ccCFlags+=" -B${cc_solib}/lib64"
|
||||||
fi
|
fi
|
||||||
ccLDFlags+=" -L${cc_solib}/lib"
|
ccLDFlags+=" -L${cc_solib}/lib"
|
||||||
|
|
||||||
@ -118,7 +118,7 @@ stdenv.mkDerivation {
|
|||||||
|
|
||||||
# Find the gcc libraries path (may work only without multilib).
|
# Find the gcc libraries path (may work only without multilib).
|
||||||
${optionalString cc.langAda or false ''
|
${optionalString cc.langAda or false ''
|
||||||
basePath=`echo $cc/lib/*/*/*`
|
basePath=`echo ${cc_solib}/lib/*/*/*`
|
||||||
ccCFlags+=" -B$basePath -I$basePath/adainclude"
|
ccCFlags+=" -B$basePath -I$basePath/adainclude"
|
||||||
gnatCFlags="-aI$basePath/adainclude -aO$basePath/adalib"
|
gnatCFlags="-aI$basePath/adainclude -aO$basePath/adalib"
|
||||||
echo "$gnatCFlags" > $out/nix-support/gnat-cflags
|
echo "$gnatCFlags" > $out/nix-support/gnat-cflags
|
||||||
@ -134,7 +134,7 @@ stdenv.mkDerivation {
|
|||||||
echo "$ccLDFlags" > $out/nix-support/cc-ldflags
|
echo "$ccLDFlags" > $out/nix-support/cc-ldflags
|
||||||
echo "$ccCFlags" > $out/nix-support/cc-cflags
|
echo "$ccCFlags" > $out/nix-support/cc-cflags
|
||||||
|
|
||||||
ccPath="$cc/bin"
|
ccPath="${cc}/bin"
|
||||||
ldPath="${binutils_bin}/bin"
|
ldPath="${binutils_bin}/bin"
|
||||||
|
|
||||||
# Propagate the wrapped cc so that if you install the wrapper,
|
# Propagate the wrapped cc so that if you install the wrapper,
|
||||||
|
Loading…
Reference in New Issue
Block a user