cc-wrapper: Set CC/CXX more specifically if possible

This commit is contained in:
Shea Levy 2015-01-16 10:50:53 -05:00
parent f272730399
commit 7dc57a389e
2 changed files with 8 additions and 2 deletions

View file

@ -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

View file

@ -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@