summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/gcc/package.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py
index b8d504a1d8..e9b9c93dd6 100644
--- a/var/spack/repos/builtin/packages/gcc/package.py
+++ b/var/spack/repos/builtin/packages/gcc/package.py
@@ -74,6 +74,9 @@ class Gcc(AutotoolsPackage):
variant('piclibs',
default=False,
description='Build PIC versions of libgfortran.a and libstdc++.a')
+ variant('strip',
+ default=False,
+ description='Strip executables to reduce installation size')
# https://gcc.gnu.org/install/prerequisites.html
depends_on('gmp@4.3.2:')
@@ -247,6 +250,12 @@ class Gcc(AutotoolsPackage):
return []
@property
+ def install_targets(self):
+ if '+strip' in self.spec:
+ return ['install-strip']
+ return ['install']
+
+ @property
def spec_dir(self):
# e.g. lib/gcc/x86_64-unknown-linux-gnu/4.9.2
spec_dir = glob.glob('{0}/gcc/*/*'.format(self.prefix.lib))