GCC: Add strip variant to reduce installation size (#4670)
* gcc: Add strip variant * gcc: Fix strip variant description being too long
This commit is contained in:
parent
efecefd4dd
commit
72aa99cb24
@ -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:')
|
||||
@ -246,6 +249,12 @@ def build_targets(self):
|
||||
return ['bootstrap']
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user