summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-08-01 15:56:31 (GMT)
committerBrad King <brad.king@kitware.com>2018-08-01 15:59:50 (GMT)
commitc2856e0b2b58c0c9cb4c089570009d517720812c (patch)
tree8462283d9f016a8ec736a23e701fda795d37dd0c /Modules
parentf0e82ce9a2f50e7ce0b9b95dcf32e47ce9a08369 (diff)
downloadCMake-c2856e0b2b58c0c9cb4c089570009d517720812c.zip
CMake-c2856e0b2b58c0c9cb4c089570009d517720812c.tar.gz
CMake-c2856e0b2b58c0c9cb4c089570009d517720812c.tar.bz2
XL: Use -qpic for position independent executables
The XL compiler does not have a dedicated "pie" option so use at least `-qpic`. This missing setting was exposed by the `ExportImport` and `PositionIndependentTargets` tests with XL on an ELF platform.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Compiler/XL.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/Compiler/XL.cmake b/Modules/Compiler/XL.cmake
index a1d7ca1..21fe5e8 100644
--- a/Modules/Compiler/XL.cmake
+++ b/Modules/Compiler/XL.cmake
@@ -20,6 +20,7 @@ macro(__compiler_xl lang)
# Feature flags.
set(CMAKE_${lang}_VERBOSE_FLAG "-V")
set(CMAKE_${lang}_COMPILE_OPTIONS_PIC "-qpic")
+ set(CMAKE_${lang}_COMPILE_OPTIONS_PIE "-qpic")
set(CMAKE_${lang}_RESPONSE_FILE_FLAG "-qoptfile=")
set(CMAKE_${lang}_RESPONSE_FILE_LINK_FLAG "-qoptfile=")