@@ -116,7 +116,6 @@ argument is passed. Additionally, A custom compiler may be passed to the 'compil
116116flag, but appropriate 'cflags' should also be passed to the script.\n\n"
117117}
118118
119-
120119while [ " $# " -ge " 1" ]; do # Get command line arguments while there are more left to process
121120
122121 key=" $1 " # Command line args are key-value pairs or value-less keys
@@ -257,6 +256,12 @@ while [ "$#" -ge "1" ]; do # Get command line arguments while there are more lef
257256 shift # look at next argument
258257done # with argument parsing loop
259258
259+ # linker flags for gfortran:
260+ COMPILERLFLAGS=" "
261+ if [ $FCOMPILER = gnu ]; then
262+ COMPILERLFLAGS=' -lflags "-ftrampoline-impl=heap"'
263+ fi
264+
260265# if no compiler selected, then we're defaulting to gnu, and need to check that the cflags are set
261266if [ " $FCOMPILER " = ' gnu' ] && [ -z " $FCOMPILERFLAGS " ]; then
262267 FCOMPILERFLAGS=" $GNUCOMPILERFLAGS "
279284
280285if [[ $TRY_UNICODE == [yY]* ]]; then
281286 echo " Trying to compile library with Unicode/UCS4 support"
282- FoBiS.py build -ch -compiler " ${FCOMPILER} " " ${CUSTOM[@]} " -cflags " ${FCOMPILERFLAGS} " -dbld " ${BINDIR} " -s " ${INTROSPECDIR} " -dmod ./ -dobj ./ -t " ${UCS4TESTCODE} " -o " ${UCS4TESTCODE% .f90} " -colors
287+ FoBiS.py build -ch -compiler " ${FCOMPILER} " " ${CUSTOM[@]} " " ${COMPILERLFLAGS} " -cflags " ${FCOMPILERFLAGS} " -dbld " ${BINDIR} " -s " ${INTROSPECDIR} " -dmod ./ -dobj ./ -t " ${UCS4TESTCODE} " -o " ${UCS4TESTCODE% .f90} " -colors
283288 if " ${BINDIR} /${UCS4TESTCODE% .f90} " ; then
284289 DEFINES=" -DUSE_UCS4 -Wunused-function"
285290 fi
289294echo " "
290295echo " Building library..."
291296
292- FoBiS.py build -ch -compiler ${FCOMPILER} " ${CUSTOM[@]} " -cflags " ${FCOMPILERFLAGS} ${DEFINES} ${REAL_KIND} ${INT_KIND} " ${COVERAGE} ${PROFILING} -dbld ${LIBDIR} -s ${SRCDIR} -dmod ./ -dobj ./ -t ${MODCODE} -o ${LIBOUT} -mklib static -colors
297+ FoBiS.py build -ch -compiler ${FCOMPILER} " ${CUSTOM[@]} " $COMPILERLFLAGS -cflags " ${FCOMPILERFLAGS} ${DEFINES} ${REAL_KIND} ${INT_KIND} " ${COVERAGE} ${PROFILING} -dbld ${LIBDIR} -s ${SRCDIR} -dmod ./ -dobj ./ -t ${MODCODE} -o ${LIBOUT} -mklib static -colors
293298
294299# build the unit tests (uses the above library):
295300if [[ $JF_SKIP_TESTS != [yY]* ]]; then
@@ -302,7 +307,7 @@ if [[ $JF_SKIP_TESTS != [yY]* ]]; then
302307 for TEST in " ${TESTDIR%/ } " /jf_test_* .[fF]90; do
303308 THIS_TEST=${TEST##*/ }
304309 echo " Build ${THIS_TEST% .[fF]90} "
305- FoBiS.py build -ch -compiler ${FCOMPILER} " ${CUSTOM[@]} " -cflags " ${FCOMPILERFLAGS} ${DEFINES} " ${COVERAGE} ${PROFILING} -dbld " ${BINDIR} " -s " ${TESTDIR} " -i " ${LIBDIR} " -libs " ${LIBDIR} /${LIBOUT} " -dmod ./ -dobj ./ -t " ${THIS_TEST} " -o " ${THIS_TEST% .[fF]90} " -colors
310+ FoBiS.py build -ch -compiler ${FCOMPILER} " ${CUSTOM[@]} " " ${COMPILERLFLAGS} " -cflags " ${FCOMPILERFLAGS} ${DEFINES} " ${COVERAGE} ${PROFILING} -dbld " ${BINDIR} " -s " ${TESTDIR} " -i " ${LIBDIR} " -libs " ${LIBDIR} /${LIBOUT} " -dmod ./ -dobj ./ -t " ${THIS_TEST} " -o " ${THIS_TEST% .[fF]90} " -colors
306311 done
307312else
308313 echo " Skip building the unit tests since \$ JF_SKIP_TESTS has been set to 'true'."
0 commit comments