* [Buildroot] [PATCH 1/1] package/glibmm: link with -latomic if needed
@ 2021-12-29 9:42 Fabrice Fontaine
2021-12-29 9:59 ` Giulio Benetti
2021-12-29 17:33 ` Thomas Petazzoni
0 siblings, 2 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2021-12-29 9:42 UTC (permalink / raw)
To: buildroot; +Cc: Fabrice Fontaine, James Knight
Link with -latomic if needed to avoid the following build failure since
bump to version 2.68.2 in commit
dddb65efbdf2c7952f22a1e51009f17f1676db4a:
/home/peko/autobuild/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/sparc-buildroot-linux-uclibc/9.3.0/../../../../sparc-buildroot-linux-uclibc/bin/ld: glib/glibmm/libglibmm-2.68.so.1.3.0.p/main.cc.o: in function `Glib::Source::reference() const':
main.cc:(.text+0xd40): undefined reference to `__atomic_fetch_add_4'
Fixes:
- http://autobuild.buildroot.org/results/6a2709956fbb16ac3cbf676acb242c88f83fcdae
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
package/glibmm/glibmm.mk | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/package/glibmm/glibmm.mk b/package/glibmm/glibmm.mk
index 578267c75e..525da6b618 100644
--- a/package/glibmm/glibmm.mk
+++ b/package/glibmm/glibmm.mk
@@ -15,9 +15,15 @@ GLIBMM_DEPENDENCIES = libglib2 libsigc host-pkgconf
GLIBMM_CONF_OPTS = -Dbuild-examples=false
GLIBMM_CXXFLAGS = $(TARGET_CXXFLAGS)
+GLIBMM_LDFLAGS = $(TARGET_LDFLAGS)
ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
GLIBMM_CXXFLAGS += -O0
endif
+# Uses __atomic_fetch_add_4
+ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
+GLIBMM_LDFLAGS += -latomic
+endif
+
$(eval $(meson-package))
--
2.33.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/glibmm: link with -latomic if needed
2021-12-29 9:42 [Buildroot] [PATCH 1/1] package/glibmm: link with -latomic if needed Fabrice Fontaine
@ 2021-12-29 9:59 ` Giulio Benetti
2021-12-29 17:33 ` Thomas Petazzoni
1 sibling, 0 replies; 3+ messages in thread
From: Giulio Benetti @ 2021-12-29 9:59 UTC (permalink / raw)
To: Fabrice Fontaine, buildroot; +Cc: James Knight
Hi Fabrice, All,
I've just sent a worse patch for this:
https://patchwork.ozlabs.org/project/buildroot/patch/20211229095600.212449-1-giulio.benetti@benettiengineering.com/
So please drop that and keep this one.
Best regards
--
Giulio Benetti
Benetti Engineering sas
On 29/12/21 10:42, Fabrice Fontaine wrote:
> Link with -latomic if needed to avoid the following build failure since
> bump to version 2.68.2 in commit
> dddb65efbdf2c7952f22a1e51009f17f1676db4a:
>
> /home/peko/autobuild/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/sparc-buildroot-linux-uclibc/9.3.0/../../../../sparc-buildroot-linux-uclibc/bin/ld: glib/glibmm/libglibmm-2.68.so.1.3.0.p/main.cc.o: in function `Glib::Source::reference() const':
> main.cc:(.text+0xd40): undefined reference to `__atomic_fetch_add_4'
>
> Fixes:
> - http://autobuild.buildroot.org/results/6a2709956fbb16ac3cbf676acb242c88f83fcdae
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> package/glibmm/glibmm.mk | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/package/glibmm/glibmm.mk b/package/glibmm/glibmm.mk
> index 578267c75e..525da6b618 100644
> --- a/package/glibmm/glibmm.mk
> +++ b/package/glibmm/glibmm.mk
> @@ -15,9 +15,15 @@ GLIBMM_DEPENDENCIES = libglib2 libsigc host-pkgconf
> GLIBMM_CONF_OPTS = -Dbuild-examples=false
>
> GLIBMM_CXXFLAGS = $(TARGET_CXXFLAGS)
> +GLIBMM_LDFLAGS = $(TARGET_LDFLAGS)
>
> ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
> GLIBMM_CXXFLAGS += -O0
> endif
>
> +# Uses __atomic_fetch_add_4
> +ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
> +GLIBMM_LDFLAGS += -latomic
> +endif
> +
> $(eval $(meson-package))
>
_______________________________________________
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/glibmm: link with -latomic if needed
2021-12-29 9:42 [Buildroot] [PATCH 1/1] package/glibmm: link with -latomic if needed Fabrice Fontaine
2021-12-29 9:59 ` Giulio Benetti
@ 2021-12-29 17:33 ` Thomas Petazzoni
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2021-12-29 17:33 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: James Knight, buildroot
On Wed, 29 Dec 2021 10:42:25 +0100
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> Link with -latomic if needed to avoid the following build failure since
> bump to version 2.68.2 in commit
> dddb65efbdf2c7952f22a1e51009f17f1676db4a:
>
> /home/peko/autobuild/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/sparc-buildroot-linux-uclibc/9.3.0/../../../../sparc-buildroot-linux-uclibc/bin/ld: glib/glibmm/libglibmm-2.68.so.1.3.0.p/main.cc.o: in function `Glib::Source::reference() const':
> main.cc:(.text+0xd40): undefined reference to `__atomic_fetch_add_4'
>
> Fixes:
> - http://autobuild.buildroot.org/results/6a2709956fbb16ac3cbf676acb242c88f83fcdae
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> package/glibmm/glibmm.mk | 6 ++++++
> 1 file changed, 6 insertions(+)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
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:[~2021-12-29 17:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-29 9:42 [Buildroot] [PATCH 1/1] package/glibmm: link with -latomic if needed Fabrice Fontaine
2021-12-29 9:59 ` Giulio Benetti
2021-12-29 17:33 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox