diff options
author | Peter Scheibel <scheibel1@llnl.gov> | 2019-10-01 14:29:01 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-01 14:29:01 -0700 |
commit | 3575f9b38228c5ddb99759c8c3b73996d644ed78 (patch) | |
tree | 73abaa8c7c74062ec80dd975a5ff96cc109c063d | |
parent | 245c1bb20895931263acb068a6e5a109c143fa03 (diff) | |
download | spack-3575f9b38228c5ddb99759c8c3b73996d644ed78.tar.gz spack-3575f9b38228c5ddb99759c8c3b73996d644ed78.tar.bz2 spack-3575f9b38228c5ddb99759c8c3b73996d644ed78.tar.xz spack-3575f9b38228c5ddb99759c8c3b73996d644ed78.zip |
GCC package: don't set CC etc. based on bin dir if it doesn't exist (#13000)
7bcb306 updated setup_environment in the GCC package to examine the
bin/ directory to find alternatively-named instances of CC, but this
failed to account for when GCC was being installed and failed when
it attempted to list the not-yet-existing installation prefix. This
commit updates the logic to skip this search if the bin/ directory
doesn't exist.
-rw-r--r-- | var/spack/repos/builtin/packages/gcc/package.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index 86e2b843e4..6bdfaeccc2 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -426,6 +426,10 @@ class Gcc(AutotoolsPackage): # Get the contents of the installed binary directory bin_path = self.spec.prefix.bin + + if not os.path.isdir(bin_path): + return + bin_contents = os.listdir(bin_path) # Find the first non-symlink compiler binary present for each language |