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 31 32 33 34 35
|
Description: Link with libatomic on some arches.
Author: Hilmar Preusse <hille42@web.de>
Last-Update: 2024-02-21
Forwarded: not needed.
--- luametatex.orig/cmake/luametatex.cmake
+++ luametatex/cmake/luametatex.cmake
@@ -1,3 +1,13 @@
+# Debian: determine host arch.
+execute_process(COMMAND
+ dpkg-architecture
+ -qDEB_HOST_ARCH
+ OUTPUT_VARIABLE
+ CMAKE_DEB_HOST_ARCH
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+)
+
+
add_compile_options(-DLUA_CORE)
set(luametatex_sources
@@ -69,6 +79,13 @@
)
endif()
+# Debian: link with atomic on specific arches.
+if(${CMAKE_DEB_HOST_ARCH} MATCHES "m68k" OR ${CMAKE_DEB_HOST_ARCH} MATCHES "powerpc" OR ${CMAKE_DEB_HOST_ARCH} MATCHES "sh4" OR ${CMAKE_DEB_HOST_ARCH} MATCHES "armel")
+ target_link_libraries(luametatex
+ atomic
+)
+endif()
+
if (${CMAKE_HOST_SOLARIS})
target_link_libraries(luametatex
rt
|