diff options
-rw-r--r-- | src/coreclr/hosts/osxbundlerun/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/coreclr/hosts/unixcoreconsole/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/coreclr/hosts/unixcorerun/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/coreclr/hosts/unixcoreruncommon/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/ilasm/CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/ildasm/exe/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/tools/crossgen/CMakeLists.txt | 4 |
7 files changed, 17 insertions, 0 deletions
diff --git a/src/coreclr/hosts/osxbundlerun/CMakeLists.txt b/src/coreclr/hosts/osxbundlerun/CMakeLists.txt index 31ed5704a1..9c8fd7a275 100644 --- a/src/coreclr/hosts/osxbundlerun/CMakeLists.txt +++ b/src/coreclr/hosts/osxbundlerun/CMakeLists.txt @@ -2,6 +2,8 @@ project(osxbundlerun) include_directories(../unixcoreruncommon) +add_compile_options(-fPIE) + set(CORERUN_SOURCES ../unixcoreruncommon/coreruncommon.cpp osxbundlerun.cpp diff --git a/src/coreclr/hosts/unixcoreconsole/CMakeLists.txt b/src/coreclr/hosts/unixcoreconsole/CMakeLists.txt index 905ed261a1..ec5f0e7f6b 100644 --- a/src/coreclr/hosts/unixcoreconsole/CMakeLists.txt +++ b/src/coreclr/hosts/unixcoreconsole/CMakeLists.txt @@ -2,6 +2,8 @@ project(unixcoreconsole) include_directories(../unixcoreruncommon) +add_compile_options(-fPIE) + set(CORECONSOLE_SOURCES coreconsole.cpp ) diff --git a/src/coreclr/hosts/unixcorerun/CMakeLists.txt b/src/coreclr/hosts/unixcorerun/CMakeLists.txt index d17ca0ba7a..48da17c9e0 100644 --- a/src/coreclr/hosts/unixcorerun/CMakeLists.txt +++ b/src/coreclr/hosts/unixcorerun/CMakeLists.txt @@ -2,6 +2,8 @@ project(unixcorerun) include_directories(../unixcoreruncommon) +add_compile_options(-fPIE) + set(CORERUN_SOURCES corerun.cpp ) diff --git a/src/coreclr/hosts/unixcoreruncommon/CMakeLists.txt b/src/coreclr/hosts/unixcoreruncommon/CMakeLists.txt index 92c5cfd8b2..f71e979cc6 100644 --- a/src/coreclr/hosts/unixcoreruncommon/CMakeLists.txt +++ b/src/coreclr/hosts/unixcoreruncommon/CMakeLists.txt @@ -1,5 +1,7 @@ project(unixcoreruncommon) +add_compile_options(-fPIC) + add_library(unixcoreruncommon STATIC coreruncommon.cpp diff --git a/src/ilasm/CMakeLists.txt b/src/ilasm/CMakeLists.txt index bd7934965f..5e82cd2e11 100644 --- a/src/ilasm/CMakeLists.txt +++ b/src/ilasm/CMakeLists.txt @@ -10,6 +10,10 @@ add_definitions(-DFEATURE_CORECLR) include_directories(.) include_directories(../ildasm/unixcoreclrloader) +if(CLR_CMAKE_PLATFORM_UNIX) + add_compile_options(-fPIE) +endif(CLR_CMAKE_PLATFORM_UNIX) + set(ILASM_SOURCES assem.cpp writer.cpp diff --git a/src/ildasm/exe/CMakeLists.txt b/src/ildasm/exe/CMakeLists.txt index 84c9d2a242..7d86bf48c8 100644 --- a/src/ildasm/exe/CMakeLists.txt +++ b/src/ildasm/exe/CMakeLists.txt @@ -10,6 +10,7 @@ add_definitions(-DFEATURE_CORECLR) include_directories(..) if(CLR_CMAKE_PLATFORM_UNIX) + add_compile_options(-fPIE) include_directories(../unixcoreclrloader) build_resources(${CMAKE_CURRENT_SOURCE_DIR}/../dasm.rc dasm_rc TARGET_CPP_FILE) diff --git a/src/tools/crossgen/CMakeLists.txt b/src/tools/crossgen/CMakeLists.txt index ceb808106b..1700eb3dbf 100644 --- a/src/tools/crossgen/CMakeLists.txt +++ b/src/tools/crossgen/CMakeLists.txt @@ -12,6 +12,10 @@ if(WIN32) add_definitions(-D_CRT_NON_CONFORMING_WCSTOK) endif() +if(CLR_CMAKE_PLATFORM_UNIX) + add_compile_options(-fPIE) +endif(CLR_CMAKE_PLATFORM_UNIX) + add_definitions(-DFX_VER_INTERNALNAME_STR=crossgen.exe) add_definitions(-DNO_NGENPDB) |