cmake: don't force gcc, use more general cc/c++

This commit is contained in:
Will Dietz 2018-02-13 12:39:34 -06:00
parent 6825c0c18b
commit e25a343716
2 changed files with 4 additions and 4 deletions

View file

@ -86,8 +86,8 @@ stdenv.mkDerivation rec {
++ ["--"] ++ ["--"]
++ optionals (!useNcurses) [ "-DBUILD_CursesDialog=OFF" ] ++ optionals (!useNcurses) [ "-DBUILD_CursesDialog=OFF" ]
++ optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ ++ optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
"-DCMAKE_CXX_COMPILER=${stdenv.cc.targetPrefix}g++" "-DCMAKE_CXX_COMPILER=${stdenv.cc.targetPrefix}c++"
"-DCMAKE_C_COMPILER=${stdenv.cc.targetPrefix}gcc" "-DCMAKE_C_COMPILER=${stdenv.cc.targetPrefix}cc"
"-DCMAKE_AR=${getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ar" "-DCMAKE_AR=${getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ar"
"-DCMAKE_RANLIB=${getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ranlib" "-DCMAKE_RANLIB=${getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ranlib"
"-DCMAKE_STRIP=${getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}strip" "-DCMAKE_STRIP=${getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}strip"

View file

@ -37,8 +37,8 @@ cmakeConfigurePhase() {
# Unfortunately cmake seems to expect absolute paths for ar, ranlib, and # Unfortunately cmake seems to expect absolute paths for ar, ranlib, and
# strip. Otherwise they are taken to be relative to the source root of # strip. Otherwise they are taken to be relative to the source root of
# the package being built. # the package being built.
cmakeFlags="-DCMAKE_CXX_COMPILER=$crossConfig-g++ $cmakeFlags" cmakeFlags="-DCMAKE_CXX_COMPILER=$crossConfig-c++ $cmakeFlags"
cmakeFlags="-DCMAKE_C_COMPILER=$crossConfig-gcc $cmakeFlags" cmakeFlags="-DCMAKE_C_COMPILER=$crossConfig-cc $cmakeFlags"
cmakeFlags="-DCMAKE_AR=$(command -v $crossConfig-ar) $cmakeFlags" cmakeFlags="-DCMAKE_AR=$(command -v $crossConfig-ar) $cmakeFlags"
cmakeFlags="-DCMAKE_RANLIB=$(command -v $crossConfig-ranlib) $cmakeFlags" cmakeFlags="-DCMAKE_RANLIB=$(command -v $crossConfig-ranlib) $cmakeFlags"
cmakeFlags="-DCMAKE_STRIP=$(command -v $crossConfig-strip) $cmakeFlags" cmakeFlags="-DCMAKE_STRIP=$(command -v $crossConfig-strip) $cmakeFlags"