/********************************** GFORTRAN COOK OPTIONS **********************************/ function print "OS type:" [os]; function print "OS system:" [os system]; function print "OS release:" [os release]; function print "machine type:" [os machine]; function print "machine name:" [os name]; /********************************** COMPILER **********************************/ fc = gfortran; fc_version = [collect_lines [fc] --version | head -1]; /*skip_mods = "omp_lib";*/ /* skip omp module file in dependency checks, etc. */ skip_mods = ""; /* add preprocessing for all builds, turn off negative zero */ fc_flags = "-cpp -fno-sign-zero"; fc_compile_flag = "-c "; fc_out_flag = "-o "; fc_fixed = "-ffixed-form"; fc_free = "-ffree-form"; fc_free += "-ffree-line-length-none"; /* Set column after which characters are ignored in typical free-form lines in the source file. */ /* The default value is 132. n may be "none", meaning that the entire line is meaningful. */ /* -ffree-line-length-0 means the same thing as -ffree-line-length-none. */ /* default mode flags */ fc_default =; /* debug flags */ fc_debug = "-O0 -g -Wall -Wextra -fimplicit-none -fcheck=all,no-recursion -fbacktrace -ffpe-trap=invalid,zero,overflow"; fc_debug += "-fno-unsafe-math-optimizations -frounding-math -fsignaling-nans -Wno-missing-include-dirs -finit-real=snan"; /*fc_debug = "-Og -g -Wall -Wextra -fimplicit-none -fcheck=all -fbacktrace -ffpe-trap=zero,overflow -fdefault-real-8";*/ /* OpenMP parallelization flags */ fc_omp ="-fopenmp -O3 -flto"; /* optimization flags */ fc_optimize = "-g -O3 -ffpe-trap=invalid,zero,overflow -fno-omit-frame-pointer"; /*fc_optimize = "-O3";*/ /*release flags */ fc_release = [fc_optimize]; /* includes */ fc_inc_flag = "-I "; fc_inc_join = [false]; /*if true, the includes are joined into a single argument with the separator */ fc_inc_sep = ; fc_mod_inc_flag = "-I"; /* Cygwin version of gfortran can't have space separating this arg with option */ fc_mod_out_flag = "-J"; /* Specifies path to put "mod" files separately from path to find "mod" files */ /* Case of the module names: lower, upper or mixed*/ fc_mod_case = lower; function print "fc_flags are: " [fc_flags]; /********************************** LINKER **********************************/ ld = [fc]; /*gcc;*/ ld_version = [fc_version]; /*[collect_lines [ld] --version | head -1];*/ ld_flags =; ld_out_flag = "-o "; /* debug flags */ ld_debug = "-static"; /* omp flags */ /*ld_omp = "-fopenmp";*/ if [is_windows] then { ld_omp = "-fopenmp -Wl,--no-whole-archive"; } else { ld_omp = "-fopenmp -static -Wl,--whole-archive -lpthread -Wl,--no-whole-archive"; } /* optimization flags */ ld_optimize = "-static"; /* includes */ ld_inc_flag = [fc_inc_flag]; ld_inc_join = [fc_inc_join]; /*if true, the includes are joined into a single argument with the separator */ ld_inc_sep = [fc_inc_sep]; ld_lib_prefix = "-Xlinker --start-group "; ld_lib_suffix = " -Xlinker --end-group"; function print "ld_flags are: " [ld_flags]; /********************************** ARCHIVER **********************************/ ar = gcc-ar; ar_version = [collect [ar] --version | head -1]; ar_flags = "-cq "; /********************************** DEBUGGER **********************************/ fdb = gdb; fdb_flags =; fdb_exe_flag = "--args "; fdb_args_flag =;