File: link-libatomic.patch

package info (click to toggle)
ruby-re2 2.23.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,944 kB
  • sloc: ruby: 1,977; cpp: 1,183; makefile: 7
file content (21 lines) | stat: -rw-r--r-- 762 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: Add option to link libatomic
 Some platforms may need to link libatomic to get a successful build. This is
 the case for armel in Debian. Here, we add an option to enable linking
 libatomic.
Author: Athos Ribeiro <athoscribeiro@gmail.com>
Forwarded: no
Last-Update: 2024-05-03
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/ext/re2/extconf.rb
+++ b/ext/re2/extconf.rb
@@ -133,6 +133,9 @@ module RE2
     def build_extension
       $CFLAGS << " -Wall -Wextra -funroll-loops"
       $CXXFLAGS << " -Wall -Wextra -funroll-loops"
+      if ENV["X_DEB_LINK_ATOMIC"]
+        $LDFLAGS << " -latomic"
+      end
 
       # Pass -x c++ to force gcc to compile the test program
       # as C++ (as it will end in .c by default).