sys-cluster/ceph: fix build with clang

clang: error: unknown argument: '-export-dynamic', this issue was
introduced by ceph-17.2.3-flags.patch, which was added to address
https://bugs.gentoo.org/866159 and has been dropped for ceph 20+.

Bug: https://bugs.gentoo.org/866159
Signed-off-by: Z. Liu <zhixu.liu@gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/45459
Closes: https://github.com/gentoo/gentoo/pull/45459
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Z. Liu
2026-01-20 23:50:35 +08:00
committed by Sam James
parent 267b62c63f
commit bca102e00e
3 changed files with 23 additions and 0 deletions

View File

@@ -250,6 +250,7 @@ PATCHES=(
# https://bugs.gentoo.org/960812
"${FILESDIR}/ceph-19.2.2-silent-unused-variable-warning.patch"
"${FILESDIR}/ceph-19.2.2-src-mgr-make-enum-statically-castable.patch"
"${FILESDIR}/ceph-19.2.2-drop-export-dynamic.patch"
)
check-reqs_export_vars() {

View File

@@ -249,6 +249,7 @@ PATCHES=(
# https://bugs.gentoo.org/960812
"${FILESDIR}/ceph-19.2.2-silent-unused-variable-warning.patch"
"${FILESDIR}/ceph-19.2.2-src-mgr-make-enum-statically-castable.patch"
"${FILESDIR}/ceph-19.2.2-drop-export-dynamic.patch"
)
check-reqs_export_vars() {

View File

@@ -0,0 +1,21 @@
clang: error: unknown argument: '-export-dynamic'
This issue was introduced by ceph-17.2.3-flags.patch,
which was added to address https://bugs.gentoo.org/866159
and has been dropped for ceph 20+. However, upstream
has refused to drop '-export-dynamic', see
https://github.com/ceph/ceph/pull/62424
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index da3102f..fe053f9 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -148,7 +148,7 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL Clang)
message(FATAL_ERROR "C++20 support requires a minimum Clang version of 12.")
endif()
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_EXPORTS_C_FLAG}")
- string(APPEND CMAKE_LINKER_FLAGS " -rdynamic -export-dynamic ${CMAKE_EXE_EXPORTS_C_FLAG}")
+ string(APPEND CMAKE_LINKER_FLAGS " -rdynamic ${CMAKE_EXE_EXPORTS_C_FLAG}")
string(PREPEND CMAKE_CXX_FLAGS_DEBUG "-g ")
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-Wno-inconsistent-missing-override>)
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-Wno-mismatched-tags>)