diff options
author | Elizabeth Fischer <eafischer2@alaska.edu> | 2021-04-01 10:39:06 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-01 18:39:06 +0000 |
commit | 82e97124c8ad4fecbb79c5724aab0182dd0c391c (patch) | |
tree | a9e029d6af961b3cbb6b711de5d5a4d629e754af /lib | |
parent | cf1b8dd72b3290e979fa63d7679f13620e752346 (diff) | |
download | spack-82e97124c8ad4fecbb79c5724aab0182dd0c391c.tar.gz spack-82e97124c8ad4fecbb79c5724aab0182dd0c391c.tar.bz2 spack-82e97124c8ad4fecbb79c5724aab0182dd0c391c.tar.xz spack-82e97124c8ad4fecbb79c5724aab0182dd0c391c.zip |
bugfix: compiler wrappers should handle extra spaces between arguments (#22725)
In the face of two consecutive spaces in the command line, the compiler wrapper would skip all remaining arguments, causing problems building py-scipy with Intel compiler. This PR solves the problem.
* Fixed compiler wrapper in the face of extra spaces between arguments
Co-authored-by: Elizabeth Fischer <elizabeth.fischer@alaska.edu>
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/spack/env/cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/spack/env/cc b/lib/spack/env/cc index 752bcde54a..4d8c4644cb 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -277,10 +277,18 @@ other_args=() isystem_system_includes=() isystem_includes=() -while [ -n "$1" ]; do +while [ $# -ne 0 ]; do + # an RPATH to be added after the case statement. rp="" + # Multiple consecutive spaces in the command line can + # result in blank arguments + if [ -z "$1" ]; then + shift + continue + fi + case "$1" in -isystem*) arg="${1#-isystem}" |