--- gildas-src-jul16a/admin/define-system.sh.orig 2016-07-01 15:43:55.000000000 +0200
+++ gildas-src-jul16a/admin/define-system.sh 2016-07-01 15:59:36.000000000 +0200
- if which gcc > /dev/null 2>&1; then
+ if which @CC@ > /dev/null 2>&1; then
- if which g++ > /dev/null 2>&1; then
- DEFAULT_CXXCOMPILER=g++
+ if which @CXX@ > /dev/null 2>&1; then
+ DEFAULT_CXXCOMPILER=@CXX@
elif which clang++ > /dev/null 2>&1; then
DEFAULT_CXXCOMPILER=clang++
if which ifort > /dev/null 2>&1; then
- elif which gfortran > /dev/null 2>&1; then
- DEFAULT_FCOMPILER=gfortran
+ elif which @FC@ > /dev/null 2>&1; then
- CPP_VERSION=`cpp --version | head -1 | \sed "s%.*[^0-9]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*%\1%"`
+ CPP_VERSION=`@CPP@ --version | head -1 | \sed "s%.*[^0-9]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*%\1%"`
if [ "$CPP_VERSION" ">" "4.7.9" ]; then
# See http://gcc.gnu.org/gcc-4.8/porting_to.html
GAG_COMPILER_CPPFLAGS="$GAG_COMPILER_CPPFLAGS -ffreestanding"
+ elif [ "$CPP_VERSION" != "${CPP_VERSION/clang/}" ]; then
+ GAG_COMPILER_CPPFLAGS="$GAG_COMPILER_CPPFLAGS -ffreestanding"
export GAG_COMPILER_FFLAGS GAG_COMPILER_FLIBS GAG_COMPILER_CPPFLAGS
# source admin/gildas-env.sh -c ifort (use default ifort e.g. ifort 11) and
# source admin/gildas-env.sh -c ifort14 (i.e. use namely non default ifort 14)
# does not build their binaries in the same integration branch.
- GAG_EXEC_SYSTEM=$GAG_MACHINE-$GAG_TARGET_VERS-$GAG_COMPILER_FEXE$GAG_CONFIG
+ GAG_EXEC_SYSTEM=$GAG_MACHINE-$GAG_TARGET_VERS-$GAG_COMPILER_FKIND
export GAG_COMP_SYSTEM GAG_EXEC_SYSTEM
export GAG_MACHINE GAG_CONFIG
export GAG_ENV_KIND GAG_ENV_VERS