Ticket #43933: patch-admin-define-system.sh.diff
File patch-admin-define-system.sh.diff, 2.3 KB (added by smaret (Sebastien Maret), 10 years ago) |
---|
-
gildas-src-jun14a/admin/define-system.sh
old new 227 227 fi 228 228 if which ifort > /dev/null 2>&1; then 229 229 DEFAULT_COMPILER=ifort 230 elif which gfortran> /dev/null 2>&1; then231 DEFAULT_COMPILER= gfortran230 elif which @FC@ > /dev/null 2>&1; then 231 DEFAULT_COMPILER=@FC@ 232 232 fi 233 233 fi ;; 234 234 CYGWIN*) … … 297 297 if [ "$GAG_COMPILER_KIND" = "ifort" ]; then 298 298 # Compress Major+Minor (no dot = easier preprocessing tests) 299 299 GAG_COMPILER_VERSION=`$GAG_COMPILER_EXE -v 2>&1 | head -1 | cut -d" " -f2 | sed "s%\.%%"` 300 elif [ "$GAG_COMPILER_KIND" = "gfortran" ]; then300 elif [ "$GAG_COMPILER_KIND" != "${GAG_COMPILER_KIND/gfortran/}" ]; then 301 301 # Compress Major+Minor+Micro (no dot = easier preprocessing tests) 302 302 GAG_COMPILER_VERSION=`$GAG_COMPILER_EXE --version | head -1 | sed "s%.*[^0-9]\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*%\1\2\3%"` 303 303 # Reject gfortran unstable versions … … 346 346 # GAG_COMPILER_CPPFLAGS="-DFORTRAN2003_PP" 347 347 : 348 348 fi 349 elif [ "$GAG_COMPILER_KIND" = "gfortran" ]; then349 elif [ "$GAG_COMPILER_KIND" != "${GAG_COMPILER_KIND/gfortran/}" ]; then 350 350 GAG_COMPILER_LIBS="-lgfortran" 351 351 if [ "$GFORTRAN_VERSION3" ">" "4.5.1" ]; then 352 352 # Fortran 2003 pointer procedures: … … 359 359 fi 360 360 fi 361 361 # 362 GCC_VERSION=` gcc--version | head -1 | sed "s%.*[^0-9]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*%\1%"`362 GCC_VERSION=`@CC@ --version | head -1 | sed "s%.*[^0-9]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*%\1%"` 363 363 if [ "$GCC_VERSION" ">" "4.7.9" ]; then 364 364 # See http://gcc.gnu.org/gcc-4.8/porting_to.html 365 365 GAG_COMPILER_CPPFLAGS="$GAG_COMPILER_CPPFLAGS -ffreestanding" 366 elif [ "$GCC_VERSION" != "${GCC_VERSION/clang/}" ]; then 367 GAG_COMPILER_CPPFLAGS="$GAG_COMPILER_CPPFLAGS -ffreestanding" 366 368 fi 367 369 # 368 370 export GAG_COMPILER_FFLAGS GAG_COMPILER_LIBS GAG_COMPILER_CPPFLAGS