summaryrefslogtreecommitdiffstats
path: root/Modules/Platform/SunOS.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/Platform/SunOS.cmake')
-rw-r--r--Modules/Platform/SunOS.cmake6
1 files changed, 4 insertions, 2 deletions
diff --git a/Modules/Platform/SunOS.cmake b/Modules/Platform/SunOS.cmake
index 2291c34..de287aa 100644
--- a/Modules/Platform/SunOS.cmake
+++ b/Modules/Platform/SunOS.cmake
@@ -1,6 +1,8 @@
IF(CMAKE_SYSTEM MATCHES "SunOS-4.*")
- SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-PIC")
- SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -Wl,-r")
+ SET(CMAKE_C_COMPILE_OPTIONS_PIC "-PIC")
+ SET(CMAKE_C_COMPILE_OPTIONS_PIE "-PIE")
+ SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-PIC")
+ SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -Wl,-r")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-R")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
ENDIF(CMAKE_SYSTEM MATCHES "SunOS-4.*")