All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Cc: Pierre-Jean Texier <texier.pj2@gmail.com>,
	Buildroot Mailing List <buildroot@buildroot.org>
Subject: Re: [Buildroot] [PATCH 1/1] package/numactl: needs atomic
Date: Fri, 29 Apr 2022 09:33:58 +0200	[thread overview]
Message-ID: <20220429093358.55e406a5@windsurf> (raw)
In-Reply-To: <CAPi7W80-tGgUc_PibQtzVpRbKNz1+RmXqkALF5x_ZScEgAM=ww@mail.gmail.com>

Hello Fabrice,

On Fri, 29 Apr 2022 09:05:21 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> > However, the key thing is that the build failure
> > http://autobuild.buildroot.org/results/e225cb83dae390d9dc543d4da85c52180efbd40a
> > has thread support disabled, and when threads are disabled, libatomic
> > is not built, and therefore BR2_TOOLCHAIN_HAS_LIBATOMIC is false.
> >
> > However, I don't see anywhere in the numactl build system where
> > -latomic is passed. Does it build on architectures that need to link
> > against libatomic to get atomic intrinsics?  
> 
> Linking with -latomic is done thanks to 0002-link-with-latomic-if-needed.patch.
> This patch was added to fix the build on architectures such as sparcv8.

Ah, I missed that patch, thanks for pointing it out!

> However, I don't understand why the build fails on microblaze without libatomic.
> Are we sure that microblaze really supports atomic without libatomic?

I explained it in my previous e-mail I think :-)

It fails because the configuration you're pointing to has threads
disabled, and when threads are disabled, libatomic is not
built/provided by gcc. This is properly handled by
BR2_TOOLCHAIN_HAS_LIBATOMIC being false in such configurations.

So basically, your patch is correct (IMO), but the commit log isn't:
the problem isn't Microblaze specific, but would happen on any
architecture that needs libatomic to provide atomic intrinsics.

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

      reply	other threads:[~2022-04-29  7:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-27 20:50 [Buildroot] [PATCH 1/1] package/numactl: needs atomic Fabrice Fontaine
2022-04-28 21:45 ` Thomas Petazzoni via buildroot
2022-04-29  7:05   ` Fabrice Fontaine
2022-04-29  7:33     ` Thomas Petazzoni via buildroot [this message]

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=20220429093358.55e406a5@windsurf \
    --to=buildroot@buildroot.org \
    --cc=fontaine.fabrice@gmail.com \
    --cc=texier.pj2@gmail.com \
    --cc=thomas.petazzoni@bootlin.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.