From 50f8332d95af7e6c9e08744b48d0994db4fb6c4c Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Tue, 8 Dec 2020 03:58:19 +0100 Subject: 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 --- lib/spack/env/cc | 8 ++++---- 1 file 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 ;; -- cgit v1.2.3-70-g09d2