summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-mathematics/rstudio/files/rstudio-0.97.551-linker_flags.patch')
-rw-r--r--sci-mathematics/rstudio/files/rstudio-0.97.551-linker_flags.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/sci-mathematics/rstudio/files/rstudio-0.97.551-linker_flags.patch b/sci-mathematics/rstudio/files/rstudio-0.97.551-linker_flags.patch
new file mode 100644
index 000000000000..a336fccbc981
--- /dev/null
+++ b/sci-mathematics/rstudio/files/rstudio-0.97.551-linker_flags.patch
@@ -0,0 +1,18 @@
+Some gcc hardening options were added, however since we add
+"-Wl,--as-needed" we end up with "-Wl,--as-needed;-Wl,-z,relro" which
+leads to linker errors about unknown options, if we make it so the
+as-needed option is the last option on the line, everything is fine.
+
+diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt
+index 0589ca0..fe5bd5f 100644
+--- a/src/cpp/CMakeLists.txt
++++ b/src/cpp/CMakeLists.txt
+@@ -57,7 +57,7 @@ if(UNIX)
+ add_definitions(-D_FORTIFY_SOURCE=2)
+ add_definitions(-fstack-protector --param ssp-buffer-size=4)
+ add_definitions(-pie -fPIE)
+- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-z,relro,-z,now")
++ set(CMAKE_EXE_LINKER_FLAGS "-Wl,-z,relro,-z,now ${CMAKE_EXE_LINKER_FLAGS}")
+ endif()
+
+ # Win32 specific global directives