summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorDenis Davydov <davydden@gmail.com>2019-07-22 23:53:50 +0200
committerGreg Becker <becker33@llnl.gov>2019-07-22 16:53:50 -0500
commit8cef81363c90d865e4d02d3894b9071340d8f906 (patch)
tree2f8de82c42dda6798eabdb8901442fefb32b13e7 /var
parent2d144316a80eab469be3a851d5094f0a3da35e4a (diff)
downloadspack-8cef81363c90d865e4d02d3894b9071340d8f906.tar.gz
spack-8cef81363c90d865e4d02d3894b9071340d8f906.tar.bz2
spack-8cef81363c90d865e4d02d3894b9071340d8f906.tar.xz
spack-8cef81363c90d865e4d02d3894b9071340d8f906.zip
gcc: support without command line tools (#11040)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/gcc/package.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py
index 62299a51b5..c5147cbb7e 100644
--- a/var/spack/repos/builtin/packages/gcc/package.py
+++ b/var/spack/repos/builtin/packages/gcc/package.py
@@ -4,7 +4,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
-from spack.operating_systems.mac_os import macos_version
+from spack.operating_systems.mac_os import macos_version, macos_sdk_path
from llnl.util import tty
import glob
@@ -315,6 +315,12 @@ class Gcc(AutotoolsPackage):
'--disable-bootstrap',
'--disable-multilib'])
+ if sys.platform == 'darwin':
+ options.extend([
+ '--with-native-system-header-dir=/usr/include',
+ '--with-sysroot={0}'.format(macos_sdk_path())
+ ])
+
return options
# run configure/make/make(install) for the nvptx-none target