summaryrefslogtreecommitdiff
path: root/lib/spack/env/cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/spack/env/cc')
-rwxr-xr-xlib/spack/env/cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/spack/env/cc b/lib/spack/env/cc
index 4d8c4644cb..bd479f05ec 100755
--- a/lib/spack/env/cc
+++ b/lib/spack/env/cc
@@ -319,11 +319,13 @@ while [ $# -ne 0 ]; do
fi
;;
-l*)
- # -loopopt=0 is passed to the linker erroneously in
- # autoconf <= 2.69. Filter it out.
+ # -loopopt=0 is generated erroneously in autoconf <= 2.69,
+ # and passed by ifx to the linker, which confuses it with a
+ # library. Filter it out.
# TODO: generalize filtering of args with an env var, so that
# TODO: we do not have to special case this here.
- if [ "$mode" = "ld" ] && [ "$1" != "${1#-loopopt}" ]; then
+ if { [ "$mode" = "ccld" ] || [ $mode = "ld" ]; } \
+ && [ "$1" != "${1#-loopopt}" ]; then
shift
continue
fi