diff options
author | Jan Vorlicek <janvorli@microsoft.com> | 2019-08-23 17:03:01 +0200 |
---|---|---|
committer | 이형주/Common Platform Lab(SR)/Staff Engineer/삼성전자 <leee.lee@samsung.com> | 2020-04-16 07:36:05 +0900 |
commit | 4feb5cbcbeea277f7addb372b3c632e89f9ed1ae (patch) | |
tree | 1fa7f1dc31867a3872c7df4b46b970150da3f299 /src/gc | |
parent | 9df87a133b0f29f4932f38b7307c87d09ab80d5d (diff) | |
download | coreclr-4feb5cbcbeea277f7addb372b3c632e89f9ed1ae.tar.gz coreclr-4feb5cbcbeea277f7addb372b3c632e89f9ed1ae.tar.bz2 coreclr-4feb5cbcbeea277f7addb372b3c632e89f9ed1ae.zip |
Fix PIE options (#26323)submit/tizen/20200415.223728accepted/tizen/unified/20200416.080052
* 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/gc')
-rw-r--r-- | src/gc/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/gc/unix/CMakeLists.txt | 1 |
2 files changed, 0 insertions, 2 deletions
diff --git a/src/gc/CMakeLists.txt b/src/gc/CMakeLists.txt index ab9f3a0bad..17a774ceb5 100644 --- a/src/gc/CMakeLists.txt +++ b/src/gc/CMakeLists.txt @@ -97,7 +97,6 @@ target_link_libraries(clrgc ${GC_LINK_LIBRARIES}) install_clr(clrgc) if(CLR_CMAKE_PLATFORM_UNIX) - add_compile_options(-fPIC) # dprintf causes many warnings (https://github.com/dotnet/coreclr/issues/13367) add_compile_options(-Wno-format) endif(CLR_CMAKE_PLATFORM_UNIX) diff --git a/src/gc/unix/CMakeLists.txt b/src/gc/unix/CMakeLists.txt index fbb94fd513..7c6e627c73 100644 --- a/src/gc/unix/CMakeLists.txt +++ b/src/gc/unix/CMakeLists.txt @@ -1,5 +1,4 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) -add_compile_options(-fPIC) include_directories("../env") include(configure.cmake) |