File: libatomic.patch

package info (click to toggle)
mathicgb 1.0~git20250513-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,800 kB
  • sloc: cpp: 22,587; sh: 217; makefile: 106
file content (19 lines) | stat: -rw-r--r-- 703 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Description: Link against libatomic.
 The -latomic flag is no longer provided by the TBB pkg-config file, but it
 is necessary to build on mipsel and m68k.
Author: Doug Torrance <dtorrance@debian.org>
Forwarded: https://github.com/Macaulay2/mathicgb/pull/41
Last-Update: 2022-06-25

--- a/configure.ac
+++ b/configure.ac
@@ -83,6 +83,9 @@
 )
 AS_IF([test "x$with_tbb" == "xno"], [TBB_CFLAGS="-DMATHICGB_NO_TBB"])
 
+AS_IF([test "x$with_tbb" = "xyes" && echo "$TBB_LIBS" | grep "\-latomic"],
+  [], [TBB_LIBS="$TBB_LIBS -latomic"])
+
 dnl ----- The librt dependency
 dnl On Linux TBB calls clock_gettime, which requires librt, but librt is not
 dnl linked in automatically. So we need to check for that.