From c2856e0b2b58c0c9cb4c089570009d517720812c Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 1 Aug 2018 11:56:31 -0400 Subject: 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. --- Modules/Compiler/XL.cmake | 1 + 1 file changed, 1 insertion(+) 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=") -- cgit v0.12