File: gcc-atomic-detection.patch

package info (click to toggle)
tbb 2020.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 15,844 kB
  • sloc: cpp: 142,989; ansic: 11,007; makefile: 1,367; python: 860; asm: 517; sh: 406; javascript: 215; lisp: 198; objc: 176; pascal: 65
file content (21 lines) | stat: -rw-r--r-- 781 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Description: Fix the gcc atomic detection to work for
  gcc-5.x and up, as well as adding -latomic to LIBS
Author: Adam Conrad <adconrad@ubuntu.com>
Bug-Debian: https://bugs.debian.org/787084
Last-Update: 2017-07-08
[ Steve Capper: rebase patch against new upstream version of TBB ]

--- a/build/linux.gcc.inc
+++ b/build/linux.gcc.inc
@@ -41,8 +41,10 @@
 endif
 
 # gcc 4.8 and later support RTM intrinsics, but require command line switch to enable them
+# furthemore, on gcc 4.8 and later, some arches require -latomic to use atomic intrinsics
 ifneq (,$(shell $(CONLY) -dumpfullversion -dumpversion | egrep  "^(4\.[8-9]|[5-9]|1[0-9])"))
-    RTM_KEY = -mrtm
+	RTM_KEY = -mrtm
+    LIBS += -latomic
 endif
 
 # gcc 4.0 and later have -Wextra that is used by some our customers.