File: link-atomic-as-needed.patch

package info (click to toggle)
opentelemetry-cpp 1.23.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,372 kB
  • sloc: cpp: 96,239; sh: 1,766; makefile: 36; python: 31
file content (25 lines) | stat: -rw-r--r-- 724 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
22
23
24
25
From: Colin Watson <cjwatson@debian.org>
Date: Mon, 29 Sep 2025 19:24:27 +0100
Subject: Link with -latomic as needed

This works around https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81358 on
armel; it can be dropped once Debian has the fix for that bug.

Last-Update: 2025-09-29
---
 CMakeLists.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5caa7c6..f987709 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -27,6 +27,8 @@ project(
   VERSION "${OPENTELEMETRY_VERSION_NUMBER}"
   LANGUAGES CXX)
 
+link_libraries(-Wl,--push-state,--as-needed atomic -Wl,--pop-state)
+
 # Mark variables as used so cmake doesn't complain about them
 mark_as_advanced(CMAKE_TOOLCHAIN_FILE)