File: shared-libraries-no-pie.patch

package info (click to toggle)
yubihsm-shell 2.7.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,020 kB
  • sloc: ansic: 41,745; sh: 2,030; cpp: 528; makefile: 18; xml: 16
file content (22 lines) | stat: -rw-r--r-- 884 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
From: Colin Watson <cjwatson@debian.org>
Date: Fri, 26 Sep 2025 13:49:22 +0100
Subject: Don't build shared libraries with -pie

Bug-Debian: https://bugs.debian.org/1113655
Last-Update: 2025-09-26
---
 cmake/SecurityFlags.cmake | 1 -
 1 file changed, 1 deletion(-)

diff --git a/cmake/SecurityFlags.cmake b/cmake/SecurityFlags.cmake
index 5e2ed75..cde1594 100644
--- a/cmake/SecurityFlags.cmake
+++ b/cmake/SecurityFlags.cmake
@@ -39,7 +39,6 @@ if (CMAKE_C_COMPILER_ID STREQUAL "Clang" OR
     endif ()
 
     if (NOT APPLE)
-        set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -pie")
         set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie")
         set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,noexecstack -Wl,-z,relro,-z,now")
         set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-z,noexecstack -Wl,-z,relro,-z,now")