File: Add-version-script-to-control-exposed-symbols.patch

package info (click to toggle)
rocfft 6.4.3-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 6,968 kB
  • sloc: cpp: 72,181; python: 6,506; sh: 387; xml: 204; makefile: 61
file content (30 lines) | stat: -rw-r--r-- 1,021 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
23
24
25
26
27
28
29
30
From: Christian Kastner <ckk@debian.org>
Date: Sun, 29 Jun 2025 15:27:39 +0200
Subject: Add version script to control exposed symbols

The C++ symbols emitted are clearly not intended to be part of the API.
Rather than spending a lot of time finding the root cause, simply allow
only the rocfft_ symbols.

Based on a solution by Xuanteng Huang for src:rocm-smi-lib.

Forwarded: not-needed
---
 CMakeLists.txt | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 75e5c36..8688c35 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -25,6 +25,10 @@ cmake_minimum_required( VERSION 3.16 )
 # We use C++17 features, this will add compile option: -std=c++17
 set( CMAKE_CXX_STANDARD 17 )
 
+# Debian: symbol hygiene
+set(SYMVERSCRIPT "${CMAKE_SOURCE_DIR}/debian/librocfft0.version.lds")
+set(CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} "-Wl,--version-script=${SYMVERSCRIPT}")
+
 # This should appear before the project command, because it does not
 # use FORCE
 if( WIN32 )