summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHarmen Stoppels <harmenstoppels@gmail.com>2020-12-08 03:58:19 +0100
committerGitHub <noreply@github.com>2020-12-07 18:58:19 -0800
commit50f8332d95af7e6c9e08744b48d0994db4fb6c4c (patch)
treecade28ead81ba151437fe4d2688e7a9485b0642f /lib
parent98c2627132f208289b556e67f45938c3b3749414 (diff)
downloadspack-50f8332d95af7e6c9e08744b48d0994db4fb6c4c.tar.gz
spack-50f8332d95af7e6c9e08744b48d0994db4fb6c4c.tar.bz2
spack-50f8332d95af7e6c9e08744b48d0994db4fb6c4c.tar.xz
spack-50f8332d95af7e6c9e08744b48d0994db4fb6c4c.zip
Compiler wrapper linting (#20249)
* Fix duplicate entries in case * make sure the arg is not interpreted as two items in a list * use -n over ! -z
Diffstat (limited to 'lib')
-rwxr-xr-xlib/spack/env/cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/spack/env/cc b/lib/spack/env/cc
index 3300d6781a..c5b77fd95e 100755
--- a/lib/spack/env/cc
+++ b/lib/spack/env/cc
@@ -125,7 +125,7 @@ case "$command" in
comp="FC"
lang_flags=F
;;
- f77|xlf|xlf_r|pgf77|frt|flang)
+ f77|xlf|xlf_r|pgf77)
command="$SPACK_F77"
language="Fortran 77"
comp="F77"
@@ -440,7 +440,7 @@ then
ld)
flags=("${flags[@]}" -headerpad_max_install_names) ;;
ccld)
- flags=("${flags[@]}" -Wl,-headerpad_max_install_names) ;;
+ flags=("${flags[@]}" "-Wl,-headerpad_max_install_names") ;;
esac
fi
@@ -518,12 +518,12 @@ for dir in "${system_libdirs[@]}"; do args+=("-L$dir"); done
# RPATHs arguments
case "$mode" in
ccld)
- if [ ! -z "$dtags_to_add" ] ; then args+=("$linker_arg$dtags_to_add") ; fi
+ if [ -n "$dtags_to_add" ] ; then args+=("$linker_arg$dtags_to_add") ; fi
for dir in "${rpaths[@]}"; do args+=("$rpath$dir"); done
for dir in "${system_rpaths[@]}"; do args+=("$rpath$dir"); done
;;
ld)
- if [ ! -z "$dtags_to_add" ] ; then args+=("$dtags_to_add") ; fi
+ if [ -n "$dtags_to_add" ] ; then args+=("$dtags_to_add") ; fi
for dir in "${rpaths[@]}"; do args+=("-rpath" "$dir"); done
for dir in "${system_rpaths[@]}"; do args+=("-rpath" "$dir"); done
;;