diff options
author | Tim Sander <tim@krieglstein.org> | 2013-10-31 17:43:02 +0100 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@digia.com> | 2013-11-07 12:38:47 +0100 |
commit | 81e3da6732c374c76e785de04759fe18e5b5fcd2 (patch) | |
tree | af3c9e447e371d2ae4fbf8832ea9e30d92d2ca5d | |
parent | c8efdf6c33b7b32664b9a3837689a7be43957a5b (diff) |
Allow disabling of -fPIC for libraries.
Change-Id: I9abb13a057530d16013ad889cea2acc34576c467
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
-rw-r--r-- | share/qbs/modules/cpp/gcc.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/share/qbs/modules/cpp/gcc.js b/share/qbs/modules/cpp/gcc.js index 453b2b31e..bbb056e6d 100644 --- a/share/qbs/modules/cpp/gcc.js +++ b/share/qbs/modules/cpp/gcc.js @@ -145,11 +145,11 @@ function additionalCompilerFlags(product, input, output) } var args = [] + var positionIndependentCode = product.moduleProperty('cpp', 'positionIndependentCode') if (effectiveType === EffectiveTypeEnum.LIB) { - if (!product.moduleProperty("qbs", "toolchain").contains("mingw")) + if (positionIndependentCode !== false && !product.moduleProperty("qbs", "toolchain").contains("mingw")) args.push('-fPIC'); } else if (effectiveType === EffectiveTypeEnum.APP) { - var positionIndependentCode = product.moduleProperty('cpp', 'positionIndependentCode') if (positionIndependentCode && !product.moduleProperty("qbs", "toolchain").contains("mingw")) args.push('-fPIE'); } else { |