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 )
|