summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCHUNSEOK LEE <chunseok.lee@samsung.com>2017-08-21 13:37:33 +0900
committerCHUNSEOK LEE <chunseok.lee@samsung.com>2017-08-21 13:37:33 +0900
commite651b05b391a974a25625ec878b6bd6a1079c74c (patch)
tree73fe3c9dcf07837679529d3b20b4e07651e8fd89
parent88719c82c86e6e58b889f725cf071fdb210e90e0 (diff)
downloadcoreclr-submit/pie_dev/20170822.015924.tar.gz
coreclr-submit/pie_dev/20170822.015924.tar.bz2
coreclr-submit/pie_dev/20170822.015924.zip
Change-Id: Ia00f75b63d668e07d86122b3424327fde881d0c4 Signed-off-by: CHUNSEOK LEE <chunseok.lee@samsung.com>
-rw-r--r--packaging/PIE.patch15
-rw-r--r--packaging/coreclr.spec4
2 files changed, 18 insertions, 1 deletions
diff --git a/packaging/PIE.patch b/packaging/PIE.patch
new file mode 100644
index 0000000000..2b1b63a003
--- /dev/null
+++ b/packaging/PIE.patch
@@ -0,0 +1,15 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f55b54c..e7e68cf 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -372,6 +372,10 @@ if (WIN32)
+ set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO} /NODEFAULTLIB:libucrt.lib /DEFAULTLIB:ucrt.lib")
+
+ elseif (CLR_CMAKE_PLATFORM_UNIX)
++ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -Wall -fPIE")
++ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CXXFLAGS} -Wall -fPIE")
++ SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -pie")
++
+ # Set the values to display when interactively configuring CMAKE_BUILD_TYPE
+ set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "DEBUG;CHECKED;RELEASE;RELWITHDEBINFO")
+
diff --git a/packaging/coreclr.spec b/packaging/coreclr.spec
index 46211a05e3..370d39faae 100644
--- a/packaging/coreclr.spec
+++ b/packaging/coreclr.spec
@@ -23,7 +23,7 @@ Source1000: downloaded_files.tar.gz
Source1001: %{name}.manifest
Source1002: libicu.tar.gz
Source1003: dep_libs.tar.gz
-# Gbp-Ignore-Patches: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
+# Gbp-Ignore-Patches: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Patch0: Add-project.assets.json-files.patch
Patch1: Add-Tizen-RuntimeID-case.patch
Patch2: Change-O3-build-in-clang3.8.patch
@@ -43,6 +43,7 @@ Patch15: 0001-Fix-CreateDump-related-undefined-reference-on-non-AM.patch
Patch16: 0001-ARM-Linux-Enable-DacStackWalk.patch
Patch17: profiling.patch
Patch18: clear_cache.patch
+Patch19: PIE.patch
ExcludeArch: aarch64
@@ -160,6 +161,7 @@ cp %{SOURCE1001} .
%patch16 -p1
%patch17 -p1
%patch18 -p1
+%patch19 -p1
%if 0%{skipmscorlib}
%else