summaryrefslogtreecommitdiff
path: root/gnu/packages/debug.scm
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2025-06-09 10:08:00 +0300
committerEfraim Flashner <efraim@flashner.co.il>2025-06-11 08:45:40 +0300
commite8a3d363f4db70a4ee55c8fb15e88650d00084ad (patch)
tree34f32872a5c84c9b98d2b7ac16a2ec01fa03ded1 /gnu/packages/debug.scm
parenta41238594855fc926c4e6a38383fb647f8469f2a (diff)
gnu: cppdap: Link with libatomic.
* gnu/packages/debug.scm (cppdap)[arguments]: Remove configure-flag linking the executable with libatomic when building for riscv64-linux. Add a phase to link with libatomic. Change-Id: I16c899d921967caafa159d11d30d6c81a6d67729
Diffstat (limited to 'gnu/packages/debug.scm')
-rw-r--r--gnu/packages/debug.scm18
1 files changed, 14 insertions, 4 deletions
diff --git a/gnu/packages/debug.scm b/gnu/packages/debug.scm
index d558cbd503e..d454bceb409 100644
--- a/gnu/packages/debug.scm
+++ b/gnu/packages/debug.scm
@@ -220,10 +220,20 @@ tools that process C/C++ code.")
220 ;; Only one of the following three can be enabled at the same time 220 ;; Only one of the following three can be enabled at the same time
221 ;; "-DCPPDAP_USE_EXTERNAL_RAPIDJSON_PACKAGE=ON" 221 ;; "-DCPPDAP_USE_EXTERNAL_RAPIDJSON_PACKAGE=ON"
222 ;; "-DCPPDAP_USE_EXTERNAL_JSONCPP_PACKAGE=ON" 222 ;; "-DCPPDAP_USE_EXTERNAL_JSONCPP_PACKAGE=ON"
223 "-DCPPDAP_USE_EXTERNAL_NLOHMANN_JSON_PACKAGE=ON" 223 "-DCPPDAP_USE_EXTERNAL_NLOHMANN_JSON_PACKAGE=ON")
224 #$@(if (target-riscv64?) 224 #:phases
225 '("-DCMAKE_EXE_LINKER_FLAGS=-latomic") 225 (if (target-riscv64?)
226 '())))) 226 #~(modify-phases %standard-phases
227 ;; We need to unconditionally link with libatomic on some
228 ;; architectures to successfully build cmake.
229 (add-after 'unpack 'link-with-libatomic
230 (lambda _
231 (substitute* "CMakeLists.txt"
232 (("cppdap_set_target_options\\(cppdap\\)" all)
233 (string-append
234 all "\n\n"
235 "target_link_libraries(cppdap PRIVATE atomic)"))))))
236 #~%standard-phases)))
227 (native-inputs 237 (native-inputs
228 (list googletest)) 238 (list googletest))
229 ;; see lib/cmake/cppdap/cppdapConfig.cmake 239 ;; see lib/cmake/cppdap/cppdapConfig.cmake