summaryrefslogtreecommitdiff
path: root/src/binder/CMakeLists.txt
diff options
context:
space:
mode:
authorJan Vorlicek <janvorli@microsoft.com>2019-08-23 17:03:01 +0200
committerHyungju Lee <leee.lee@samsung.com>2020-10-30 18:16:43 +0900
commite3908751b71e2ae704e76f018af0db91319750f2 (patch)
tree93cefb6b0c02c0e568c5f07e1badabfe3c7fac9a /src/binder/CMakeLists.txt
parent09a47f75fc7c4e6a09f8799a7de05e9c1f9e187a (diff)
downloadcoreclr-e3908751b71e2ae704e76f018af0db91319750f2.tar.gz
coreclr-e3908751b71e2ae704e76f018af0db91319750f2.tar.bz2
coreclr-e3908751b71e2ae704e76f018af0db91319750f2.zip
Fix PIE options (#26323)
* Fix PIE options We were missing passing the -pie linker option. That means that while we were compiling our code as position independent, the executables (not shared libraries) were not marked as position independent and ASLR was not applied to them. They were always loaded to fixed addresses. This change adds the missing -pie option and also replaces all the individual settings of -fPIE / -fPIC on the targets we build by a centralized setting of CMAKE_POSITION_INDEPENDENT_CODE variable that causes cmake to add the appropriate compiler options everywhere. * Fix native parts of coreclr tests build The native parts of the tests are not built using the root CMakeLists.txt so I am moving enabling the position independent code to configurecompiler.cmake Change-Id: Ieafff8984ec23e5fdb00fb0c2fb017e53afbce88
Diffstat (limited to 'src/binder/CMakeLists.txt')
-rw-r--r--src/binder/CMakeLists.txt4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/binder/CMakeLists.txt b/src/binder/CMakeLists.txt
index d92bec6c99..07f6c15bff 100644
--- a/src/binder/CMakeLists.txt
+++ b/src/binder/CMakeLists.txt
@@ -91,9 +91,5 @@ endif(WIN32)
convert_to_absolute_path(BINDER_SOURCES ${BINDER_SOURCES})
convert_to_absolute_path(BINDER_CROSSGEN_SOURCES ${BINDER_CROSSGEN_SOURCES})
-if(CLR_CMAKE_PLATFORM_UNIX)
- add_compile_options(-fPIC)
-endif(CLR_CMAKE_PLATFORM_UNIX)
-
add_subdirectory(v3binder)
add_subdirectory(v3binder_crossgen)