qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Akihiko Odaki" <akihiko.odaki@gmail.com>,
	qemu-devel@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Roman Bolshakov <r.bolshakov@yadro.com>,
	Christian Schoenebeck <qemu_oss@crudebyte.com>,
	Andrew Jones <drjones@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [PATCH v2 4/8] configure: Disable out-of-line atomic operations on Aarch64
Date: Fri, 18 Feb 2022 12:46:15 +1100	[thread overview]
Message-ID: <94417e74-a2e8-f23d-b4fd-e53c9d3c8323@linaro.org> (raw)
In-Reply-To: <02c7d441-815b-2fd8-21dc-8357b5cd6ebb@amsat.org>

On 2/17/22 04:18, Philippe Mathieu-Daudé wrote:
> On 16/2/22 17:42, Akihiko Odaki wrote:
>> On 2022/02/17 0:08, Philippe Mathieu-Daudé wrote:
>>> On 16/2/22 11:19, Richard Henderson wrote:
>>>> These should have been supplied by libgcc.a, which we're supposed to be linking 
>>>> against. Something is wrong with your installation.
>>>
>>> I don't have gobjc/g++ installed, so ./configure defaulted to Clang to
>>> compile these languages, but compiled C files using GCC. At the end the
>>> Clang linker is used (the default c++ symlink).

This is another form of compiler mis-configuration.
If you don't have g++ to go with gcc, use --cxx=false to avoid picking up a different 
compiler.

>>> Could there be a mismatch between Clang (-mno-outline-atomics) and GCC
>>> (-moutline-atomics)?

I have no idea if those options do the same thing.

>> I think you have to instruct Clang to use libgcc instead of compiler-rt and link the 
>> objects with GCC. Here is the documentation of Clang about the runtime I could find:
>> https://clang.llvm.org/docs/Toolchain.html#libgcc-s-gnu
> 
> Thanks for the pointer. And the next section is
> https://clang.llvm.org/docs/Toolchain.html#atomics-library :)
> 
>    Clang does not currently automatically link against libatomic when
>     using libgcc_s. You may need to manually add -latomic to support
>    this configuration when using non-native atomic operations (if you
>    see link errors referring to __atomic_* functions).
> 
> I'll try that.

-moutline-atomics is *not* the same as libatomic.
You should not need libatomic at all.


r~


  parent reply	other threads:[~2022-02-18  1:49 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-15 17:00 [PATCH v2 0/8] buildsys: More fixes to use GCC on macOS Philippe Mathieu-Daudé via
2022-02-15 17:00 ` [PATCH v2 1/8] osdep: Avoid using Clang-specific __builtin_available() Philippe Mathieu-Daudé via
2022-02-15 17:01 ` [PATCH v2 2/8] osdep: Ignore 'unguarded-availability-new' warnings on macOS Catalina Philippe Mathieu-Daudé via
2022-02-16  2:36   ` Akihiko Odaki
2022-02-15 17:01 ` [PATCH v2 3/8] meson: Resolve the entitlement.sh script once for good Philippe Mathieu-Daudé via
2022-02-15 17:01 ` [PATCH v2 4/8] configure: Disable out-of-line atomic operations on Aarch64 Philippe Mathieu-Daudé via
2022-02-16  2:41   ` Akihiko Odaki
2022-02-16 10:19   ` Richard Henderson
2022-02-16 15:08     ` Philippe Mathieu-Daudé via
2022-02-16 16:42       ` Akihiko Odaki
2022-02-16 17:18         ` Philippe Mathieu-Daudé via
2022-02-16 17:19           ` Peter Maydell
2022-02-18  1:46           ` Richard Henderson [this message]
2022-02-18 15:36             ` Paolo Bonzini
2022-03-06 22:21               ` Philippe Mathieu-Daudé
2022-02-18 15:42   ` Paolo Bonzini
2022-02-15 17:01 ` [PATCH v2 5/8] meson: Log QEMU_CXXFLAGS content in summary Philippe Mathieu-Daudé via
2022-02-15 17:01 ` [PATCH v2 6/8] configure: Pass filtered QEMU_OBJCFLAGS to meson Philippe Mathieu-Daudé via
2022-02-18 15:44   ` Paolo Bonzini
2022-02-15 17:01 ` [PATCH v2 7/8] audio: Rename coreaudio extension to use Objective-C compiler Philippe Mathieu-Daudé via
2022-02-15 17:01 ` [PATCH v2 8/8] ui/cocoa: Constify qkeycode translation arrays Philippe Mathieu-Daudé via

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=94417e74-a2e8-f23d-b4fd-e53c9d3c8323@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=akihiko.odaki@gmail.com \
    --cc=drjones@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu_oss@crudebyte.com \
    --cc=r.bolshakov@yadro.com \
    --cc=stefanha@redhat.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;
as well as URLs for NNTP newsgroup(s).