Skip to content

Commit 3eed188

Browse files
authored
Merge pull request #5475 from martin-frbg/issue5424
Fix Fortran compiler autodetection in the presence of compiler arguments
2 parents aaa5c37 + b7c8c5c commit 3eed188

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

f_check

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,11 @@ nofortran=0
3030
shift 2
3131
compiler="$*"
3232
compiler_bin="$1"
33+
shift
34+
compiler_args="$*"
3335

3436
# f77 is too ambiguous
35-
[ "$compiler" = "f77" ] && compiler=''
37+
[ "$compiler_bin" = "f77" ] && compiler=''
3638

3739
path=`split "$PATH" ':'`
3840

@@ -50,7 +52,7 @@ if [ -z "$compiler" ]; then
5052
for list in $lists; do
5153
for p in $path; do
5254
if [ -x "$p/$list" ]; then
53-
compiler=$list
55+
compiler="$list $compiler_args"
5456
compiler_bin=$list
5557
break 2
5658
fi

0 commit comments

Comments
 (0)