Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Thomas Devoogdt <thomas@devoogdt.com>
Cc: Joseph Kogut <joseph.kogut@gmail.com>,
	Rahul Bedarkar <rahulbedarkar89@gmail.com>,
	Fabrice Fontaine <fontaine.fabrice@gmail.com>,
	buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v1 1/8] package/libsoup3: fix reference to atomic
Date: Thu, 2 May 2024 09:56:05 +0200	[thread overview]
Message-ID: <20240502095605.32987057@windsurf> (raw)
In-Reply-To: <20240420185853.4134260-1-thomas@devoogdt.com>

Hello,

On Sat, 20 Apr 2024 20:58:46 +0200
Thomas Devoogdt <thomas@devoogdt.com> wrote:

> gthread-posix.c:(.text+0x137c): undefined reference to `__atomic_compare_exchange_4'
> collect2: error: ld returned 1 exit status
> 
> Fixes:
>  - http://autobuild.buildroot.net/results/4fb9f4c49777dde3abc30bb9f324816d3ed87567
> 
> Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com>

I think this whole patch series is not the right way to fix the
problem. Indeed, what's using libatomic here is libglib2, and with your
solution, you have to chase down *all* reverse dependencies of libglib2.

Instead, what I'd like to see is that the glib-2.0.pc (pkg-config) file
gets updated to include -latomic in the Libs.private flags, so that it
gets automatically picked up by all reverse dependencies of libglib2
when they are static linking.

This also brings the advantage that you're not linking say libsoup3
directly with libatomic, like you're doing with your patch. Instead, in
a dynamic linking case, we keep on having libsoup3 linked just with
libglib2, and libglib2 linked with libatomic. It's only in the static
linking case that when we're building a final executable that uses
libsoup3, we need to also bring libatomic.a into the mix.

Could you have a look at fixing glib-2.0.pc instead?

Thanks!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  parent reply	other threads:[~2024-05-02  7:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-20 18:58 [Buildroot] [PATCH v1 1/8] package/libsoup3: fix reference to atomic Thomas Devoogdt
2024-04-20 18:58 ` [Buildroot] [PATCH v1 2/8] package/gssdp: " Thomas Devoogdt
2024-04-20 18:58 ` [Buildroot] [PATCH v1 3/8] package/gupnp: " Thomas Devoogdt
2024-04-20 18:58 ` [Buildroot] [PATCH v1 4/8] package/gupnp-av: " Thomas Devoogdt
2024-04-20 18:58 ` [Buildroot] [PATCH v1 5/8] package/gupnp-dlna: " Thomas Devoogdt
2024-04-20 18:58 ` [Buildroot] [PATCH v1 6/8] package/at-spi2-core: " Thomas Devoogdt
2024-04-20 18:58 ` [Buildroot] [PATCH v1 7/8] package/gdk-pixbuf: " Thomas Devoogdt
2024-04-20 18:58 ` [Buildroot] [PATCH v1 8/8] package/libqmi: " Thomas Devoogdt
2024-05-02  7:56 ` Thomas Petazzoni via buildroot [this message]
2024-05-02  8:15   ` [Buildroot] [PATCH v1 1/8] package/libsoup3: " Fabrice Fontaine
2024-05-02  8:30     ` Thomas Petazzoni via buildroot
2024-05-02 14:15       ` Thomas Devoogdt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240502095605.32987057@windsurf \
    --to=buildroot@buildroot.org \
    --cc=fontaine.fabrice@gmail.com \
    --cc=joseph.kogut@gmail.com \
    --cc=rahulbedarkar89@gmail.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=thomas@devoogdt.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox