Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 00/17] Rework atomic handling
Date: Mon, 1 Feb 2016 16:19:26 +0100	[thread overview]
Message-ID: <20160201161926.3b2488f8@free-electrons.com> (raw)
In-Reply-To: <20160201144730.7ca660e9@pcviktorin.fit.vutbr.cz>

Jan,

On Mon, 1 Feb 2016 14:47:30 +0100, Jan Viktorin wrote:

> recently, I was doing some tests on MicroBlaze and discovered that I
> am missing the atomic operations there. Then I could see this patch
> series. Thanks for that, however, I have still issues with this.

Ah, so you're doing some Microblaze stuff? If so, some help would
definitely be welcome to maintain this platform.

> The libatomic_ops claims to not support MicroBlaze in its Config.in.

Right.

> So it is not possible to use either __sync_* ones nor __atomic_* ones.

This has nothing to do with libatomic_ops or not.

__sync and __atomic built-ins are provided by gcc, the compiler.

They are completely orthogonal to libatomic_ops. Programs/libraries
using __sync* or __atomic* functions do not need libatomic_ops. 

> Even if I change this and enable it for BR2_microblaze, I am unable to
> compile the libatomic_ops properly (with the Buildroot toolchain 4.9.x).

There is no support for Microblaze in libatomic_ops, so this is not
surprising. See src/atomic_ops/sysdeps/gcc/ in the libatomic_ops
sources.

Maybe with generic.h / generic-small.h, libatomic_ops can rely on the
__sync or __atomic built-ins, but I haven't tried this possibility.

> Moreover, I've read somewhere that the new GCC connects the __sync_*
> interface to the __atomic_* interface internally. Is it true?

I don't know how things are implemented internally in gcc.

> Is this done by the libatomic_ops library? I am confused by this
> situation... I made some wrappers doing the __sync_* to __atomic_*
> translation but still with no success.

Are you use you are not confusing libatomic_ops and libatomic ?

libatomic_ops is a separate project, which has nothing to do with gcc.

libatomic is a library part of gcc, which exists since gcc 4.7, and
provided as part of the gcc runtime on the target.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  reply	other threads:[~2016-02-01 15:19 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-27 22:47 [Buildroot] [PATCH v2 00/17] Rework atomic handling Thomas Petazzoni
2016-01-27 22:47 ` [Buildroot] [PATCH v2 01/17] toolchain: add BR2_TOOLCHAIN_HAS_SYNC_x hidden booleans Thomas Petazzoni
2016-01-28 22:31   ` Yann E. MORIN
2016-01-27 22:47 ` [Buildroot] [PATCH v2 02/17] docs/manual: document usage of BR2_TOOLCHAIN_HAS_SYNC_x Thomas Petazzoni
2016-01-28 22:01   ` Yann E. MORIN
2016-01-27 22:47 ` [Buildroot] [PATCH v2 03/17] json-c: needs __sync_val_compare_and_swap_4 Thomas Petazzoni
2016-01-28 22:03   ` Yann E. MORIN
2016-01-27 22:47 ` [Buildroot] [PATCH v2 04/17] pulseaudio: remove BR2_ARCH_HAS_ATOMICS dependency Thomas Petazzoni
2016-01-28 22:05   ` Yann E. MORIN
2016-01-27 22:47 ` [Buildroot] [PATCH v2 05/17] apache, apr: fix atomic handling Thomas Petazzoni
2016-01-28 22:08   ` Yann E. MORIN
2016-01-27 22:47 ` [Buildroot] [PATCH v2 06/17] jack2: use the proper BR2_TOOLCHAIN_HAS_SYNC_x symbol Thomas Petazzoni
2016-01-27 22:47 ` [Buildroot] [PATCH v2 07/17] libtorrent: use the proper BR2_TOOLCHAIN_HAS_SYNC_x symbols Thomas Petazzoni
2016-01-27 22:47 ` [Buildroot] [PATCH v2 08/17] gauche: disable on SPARC(64), remove atomics dependency Thomas Petazzoni
2016-01-27 22:47 ` [Buildroot] [PATCH v2 09/17] cairo, harfbuzz: rework atomic dependencies Thomas Petazzoni
2016-01-27 22:47 ` [Buildroot] [PATCH v2 10/17] squid: rework atomic handling Thomas Petazzoni
2016-01-27 22:47 ` [Buildroot] [PATCH v2 11/17] thrift: remove BR2_ARCH_HAS_ATOMICS dependency Thomas Petazzoni
2016-01-27 22:47 ` [Buildroot] [PATCH v2 12/17] msgpack: rework " Thomas Petazzoni
2016-01-27 22:47 ` [Buildroot] [PATCH v2 13/17] arch: remove BR2_ARCH_HAS_ATOMICS option Thomas Petazzoni
2016-01-27 22:47 ` [Buildroot] [PATCH v2 14/17] glog: fix atomic built-in problem Thomas Petazzoni
2016-01-27 22:47 ` [Buildroot] [PATCH v2 15/17] openal: add missing BR2_TOOLCHAIN_HAS_SYNC_4 dependency Thomas Petazzoni
2016-01-29 18:34   ` André Hentschel
2016-01-29 23:06     ` Thomas Petazzoni
2016-01-30 11:30       ` André Hentschel
2016-02-03 14:38         ` Thomas Petazzoni
2016-01-27 22:47 ` [Buildroot] [PATCH v2 16/17] freerdp: " Thomas Petazzoni
2016-01-27 22:47 ` [Buildroot] [PATCH v2 17/17] neard: " Thomas Petazzoni
2016-02-01 13:47 ` [Buildroot] [PATCH v2 00/17] Rework atomic handling Jan Viktorin
2016-02-01 15:19   ` Thomas Petazzoni [this message]
2016-02-01 15:38     ` Jan Viktorin
2016-02-01 15:46       ` Thomas Petazzoni

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=20160201161926.3b2488f8@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /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