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($<$:-Wno-inconsistent-missing-override>) add_compile_options($<$:-Wno-mismatched-tags>)