Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/libglib2: update atomic patch
@ 2024-05-03 18:31 Fabrice Fontaine
  2024-05-05  9:57 ` Yann E. MORIN
  2024-05-21 20:12 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2024-05-03 18:31 UTC (permalink / raw)
  To: buildroot; +Cc: Fabrice Fontaine

Commit 929bffbf4bf8fcb91bda446777f907f32c782656 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: 929bffbf4bf8fcb91bda446777f907f32c782656
 - 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>
---
 .../0005-link-with-latomic-when-needed.patch  | 45 ----------------
 .../0006-link-with-latomic-when-needed.patch  | 52 +++++++++++++++++++
 2 files changed, 52 insertions(+), 45 deletions(-)
 delete mode 100644 package/libglib2/0005-link-with-latomic-when-needed.patch
 create mode 100644 package/libglib2/0006-link-with-latomic-when-needed.patch

diff --git a/package/libglib2/0005-link-with-latomic-when-needed.patch b/package/libglib2/0005-link-with-latomic-when-needed.patch
deleted file mode 100644
index 275d86032b..0000000000
--- a/package/libglib2/0005-link-with-latomic-when-needed.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From d1814dbd3a88c95a43d4c9805bb4a523cf62d97b Mon Sep 17 00:00:00 2001
-From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-Date: Sun, 17 Sep 2023 20:42:00 +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/-/merge_requests/3586
----
- glib/meson.build | 1 +
- meson.build      | 2 ++
- 2 files changed, 3 insertions(+)
-
-diff --git a/glib/meson.build b/glib/meson.build
-index c26a35e42..7a761306b 100644
---- a/glib/meson.build
-+++ b/glib/meson.build
-@@ -426,6 +426,7 @@ libglib = library('glib-2.0',
-     pcre2,
-     platform_deps,
-     thread_dep,
-+    atomic_dep
-   ],
-   c_args : glib_c_args,
-   objc_args : glib_c_args,
-diff --git a/meson.build b/meson.build
-index 25ae10fc2..5ae84b3b3 100644
---- a/meson.build
-+++ b/meson.build
-@@ -2130,6 +2130,8 @@ libffi_dep = dependency('libffi', version : '>= 3.0.0')
- 
- libz_dep = dependency('zlib')
- 
-+atomic_dep = cc.find_library('atomic', required: false)
-+
- # 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.40.1
-
diff --git a/package/libglib2/0006-link-with-latomic-when-needed.patch b/package/libglib2/0006-link-with-latomic-when-needed.patch
new file mode 100644
index 0000000000..5ac0744cbf
--- /dev/null
+++ b/package/libglib2/0006-link-with-latomic-when-needed.patch
@@ -0,0 +1,52 @@
+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/-/merge_requests/4034
+---
+ glib/meson.build | 1 +
+ meson.build      | 9 +++++++++
+ 2 files changed, 10 insertions(+)
+
+diff --git a/glib/meson.build b/glib/meson.build
+index 24cbb664d..b2dd569e1 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 46c5aa200..8b4294055 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.43.0
+
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/libglib2: update atomic patch
  2024-05-03 18:31 [Buildroot] [PATCH 1/1] package/libglib2: update atomic patch Fabrice Fontaine
@ 2024-05-05  9:57 ` Yann E. MORIN
  2024-05-21 20:12 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Yann E. MORIN @ 2024-05-05  9:57 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: buildroot

Fabrice, All,

On 2024-05-03 20:31 +0200, Fabrice Fontaine spake thusly:
> Commit 929bffbf4bf8fcb91bda446777f907f32c782656 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: 929bffbf4bf8fcb91bda446777f907f32c782656
>  - http://autobuild.buildroot.org/results/a12b9c4436594818f4ce128595b429adf7d90e31
> 
> [1]: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3606

This has now been merged, so I tweaked the patch to refer to the actual
commit rather than the MR.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/libglib2: update atomic patch
  2024-05-03 18:31 [Buildroot] [PATCH 1/1] package/libglib2: update atomic patch Fabrice Fontaine
  2024-05-05  9:57 ` Yann E. MORIN
@ 2024-05-21 20:12 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2024-05-21 20:12 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: buildroot

>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:

 > Commit 929bffbf4bf8fcb91bda446777f907f32c782656 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: 929bffbf4bf8fcb91bda446777f907f32c782656
 >  - 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>

Committed to 2024.02.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-05-21 20:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-03 18:31 [Buildroot] [PATCH 1/1] package/libglib2: update atomic patch Fabrice Fontaine
2024-05-05  9:57 ` Yann E. MORIN
2024-05-21 20:12 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox