Skip to content
Snippets Groups Projects
Unverified Commit 379319ee authored by Carson Woods's avatar Carson Woods Committed by GitHub
Browse files

pdt: add PIC support as variant (#15851)

* Add fPIC support as variant

* Fix variant to use compiler agnostic fPIC option
parent 9d906658
No related branches found
No related tags found
No related merge requests found
......@@ -30,6 +30,8 @@ class Pdt(AutotoolsPackage):
version('3.19', sha256='d57234077e2e999f2acf9860ea84369a4694b50cc17fa6728e5255dc5f4a2160')
version('3.18.1', sha256='d06c2d1793fadebf169752511e5046d7e02cf3fead6135a35c34b1fee6d6d3b2')
variant('pic', default=False, description="Builds with pic")
def patch(self):
if self.spec.satisfies('%clang'):
filter_file(r'PDT_GXX=g\+\+ ',
......@@ -50,6 +52,9 @@ def configure(self, spec, prefix):
else:
raise InstallError('Unknown/unsupported compiler family')
if '+pic' in spec:
options.append('-useropt=' + self.compiler.pic_flag)
configure(*options)
@run_after('install')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment