File: link-libatomic.patch

package info (click to toggle)
ruby-re2 2.7.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,872 kB
  • sloc: ruby: 1,902; cpp: 1,165; makefile: 7
file content (21 lines) | stat: -rw-r--r-- 774 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
@@ -123,6 +125,9 @@
   # Enable optional warnings but disable deprecated register warning for Ruby 2.6 support
   $CFLAGS << " -Wall -Wextra -funroll-loops"
   $CPPFLAGS << " -Wno-register"
+  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).