pdt: add PIC support as variant (#15851)
* Add fPIC support as variant * Fix variant to use compiler agnostic fPIC option
This commit is contained in:
parent
9d906658b3
commit
379319ee2d
@ -30,6 +30,8 @@ class Pdt(AutotoolsPackage):
|
|||||||
version('3.19', sha256='d57234077e2e999f2acf9860ea84369a4694b50cc17fa6728e5255dc5f4a2160')
|
version('3.19', sha256='d57234077e2e999f2acf9860ea84369a4694b50cc17fa6728e5255dc5f4a2160')
|
||||||
version('3.18.1', sha256='d06c2d1793fadebf169752511e5046d7e02cf3fead6135a35c34b1fee6d6d3b2')
|
version('3.18.1', sha256='d06c2d1793fadebf169752511e5046d7e02cf3fead6135a35c34b1fee6d6d3b2')
|
||||||
|
|
||||||
|
variant('pic', default=False, description="Builds with pic")
|
||||||
|
|
||||||
def patch(self):
|
def patch(self):
|
||||||
if self.spec.satisfies('%clang'):
|
if self.spec.satisfies('%clang'):
|
||||||
filter_file(r'PDT_GXX=g\+\+ ',
|
filter_file(r'PDT_GXX=g\+\+ ',
|
||||||
@ -50,6 +52,9 @@ def configure(self, spec, prefix):
|
|||||||
else:
|
else:
|
||||||
raise InstallError('Unknown/unsupported compiler family')
|
raise InstallError('Unknown/unsupported compiler family')
|
||||||
|
|
||||||
|
if '+pic' in spec:
|
||||||
|
options.append('-useropt=' + self.compiler.pic_flag)
|
||||||
|
|
||||||
configure(*options)
|
configure(*options)
|
||||||
|
|
||||||
@run_after('install')
|
@run_after('install')
|
||||||
|
Loading…
Reference in New Issue
Block a user