summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/build_environment.py8
-rw-r--r--lib/spack/spack/fetch_strategy.py15
2 files changed, 16 insertions, 7 deletions
diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py
index 81fbedc689..a133faa629 100644
--- a/lib/spack/spack/build_environment.py
+++ b/lib/spack/spack/build_environment.py
@@ -88,10 +88,10 @@ def set_compiler_environment_variables(pkg):
compiler = pkg.compiler
# Set compiler variables used by CMake and autotools
- os.environ['CC'] = 'cc'
- os.environ['CXX'] = 'c++'
- os.environ['F77'] = 'f77'
- os.environ['FC'] = 'f90'
+ os.environ['CC'] = join_path(spack.build_env_path, 'cc')
+ os.environ['CXX'] = join_path(spack.build_env_path, 'c++')
+ os.environ['F77'] = join_path(spack.build_env_path, 'f77')
+ os.environ['FC'] = join_path(spack.build_env_path, 'f90')
# Set SPACK compiler variables so that our wrapper knows what to call
if compiler.cc:
diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py
index 0ba0251caa..b810023c5a 100644
--- a/lib/spack/spack/fetch_strategy.py
+++ b/lib/spack/spack/fetch_strategy.py
@@ -425,12 +425,21 @@ class GitFetchStrategy(VCSFetchStrategy):
if self.git_version > ver('1.7.10'):
args.append('--single-branch')
+ cloned = False
# Yet more efficiency, only download a 1-commit deep tree
if self.git_version >= ver('1.7.1'):
- args.extend(['--depth','1'])
+ try:
+ self.git(*(args + ['--depth','1', self.url]))
+ cloned = True
+ except spack.error.SpackError:
+ # This will fail with the dumb HTTP transport
+ # continue and try without depth, cleanup first
+ pass
+
+ if not cloned:
+ args.append(self.url)
+ self.git(*args)
- args.append(self.url)
- self.git(*args)
self.stage.chdir_to_source()
# For tags, be conservative and check them out AFTER