f5257789d6
Commit929bffbf4b
forgot to update patch number Moreover, replace it with a new iteration to follow upstream request [1] and avoid the following build host build failure with br-autobuild-1: /usr/bin/ld: cannot find /usr/lib64/libatomic.so.1.2.0: No such file or directory Fixes:929bffbf4b
- http://autobuild.buildroot.org/results/a12b9c4436594818f4ce128595b429adf7d90e31 [1]: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3606 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> [yann.morin.1998@free.fr: mention upstream commit now it's merged] Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
53 lines
1.6 KiB
Diff
53 lines
1.6 KiB
Diff
From 4e6dc4dee0e1c6407113597180d9616b4f275f94 Mon Sep 17 00:00:00 2001
|
|
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
|
Date: Thu, 2 May 2024 14:02:17 +0200
|
|
Subject: [PATCH] link with -latomic when needed
|
|
|
|
Some architecture such as sparc and some flavors of arm needs -latomic
|
|
to avoid the following build failure:
|
|
|
|
gthread-posix.c:(.text+0xda8): undefined reference to `__atomic_compare_exchange_4'
|
|
|
|
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
|
Upstream: https://gitlab.gnome.org/GNOME/glib/-/commit/4e6dc4dee0e1c6407113597180d9616b4f275f94
|
|
---
|
|
glib/meson.build | 1 +
|
|
meson.build | 9 +++++++++
|
|
2 files changed, 10 insertions(+)
|
|
|
|
diff --git a/glib/meson.build b/glib/meson.build
|
|
index 24cbb664d4..b2dd569e1e 100644
|
|
--- a/glib/meson.build
|
|
+++ b/glib/meson.build
|
|
@@ -419,6 +419,7 @@ libglib = library('glib-2.0',
|
|
include_directories : configinc,
|
|
link_with: [charset_lib, gnulib_lib],
|
|
dependencies : [
|
|
+ atomic_dep,
|
|
gnulib_libm_dependency,
|
|
libiconv,
|
|
libintl_deps,
|
|
diff --git a/meson.build b/meson.build
|
|
index 46c5aa200a..8b42940558 100644
|
|
--- a/meson.build
|
|
+++ b/meson.build
|
|
@@ -2233,6 +2233,15 @@ libffi_dep = dependency('libffi', version : '>= 3.0.0')
|
|
|
|
libz_dep = dependency('zlib')
|
|
|
|
+libatomic_test_code = '''
|
|
+ int main (int argc, char ** argv) {
|
|
+ return 0;
|
|
+ }'''
|
|
+atomic_dep = []
|
|
+if cc.links(libatomic_test_code, args : '-latomic', name : 'check for -latomic')
|
|
+ atomic_dep = cc.find_library('atomic')
|
|
+endif
|
|
+
|
|
# First check in libc, fallback to libintl, and as last chance build
|
|
# proxy-libintl subproject.
|
|
# FIXME: glib-gettext.m4 has much more checks to detect broken/uncompatible
|
|
--
|
|
2.44.0
|
|
|