cc-wrapper: Set CC/CXX more specifically if possible
This commit is contained in:
parent
f272730399
commit
7dc57a389e
@ -160,12 +160,18 @@ stdenv.mkDerivation {
|
||||
wrap ld.bfd ${./ld-wrapper.sh} $binutils/bin/ld.bfd
|
||||
fi
|
||||
|
||||
export real_cc=cc
|
||||
export real_cxx=c++
|
||||
if [ -e $ccPath/gcc ]; then
|
||||
wrap gcc ${./cc-wrapper.sh} $ccPath/gcc
|
||||
ln -s gcc $out/bin/cc
|
||||
export real_cc=gcc
|
||||
export real_cxx=g++
|
||||
elif [ -e $ccPath/clang ]; then
|
||||
wrap clang ${./cc-wrapper.sh} $ccPath/clang
|
||||
ln -s clang $out/bin/cc
|
||||
export real_cc=clang
|
||||
export real_cxx=clang++
|
||||
fi
|
||||
|
||||
if [ -e $ccPath/g++ ]; then
|
||||
|
@ -34,5 +34,5 @@ if [ -n "@coreutils@" ]; then
|
||||
addToSearchPath PATH @coreutils@/bin
|
||||
fi
|
||||
|
||||
export CC=cc
|
||||
export CXX=c++
|
||||
export CC=@real_cc@
|
||||
export CXX=@real_cxx@
|
||||
|
Loading…
Reference in New Issue
Block a user