qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 4/8] configure: Disable out-of-line atomic operations on A


From: Richard Henderson
Subject: Re: [PATCH v2 4/8] configure: Disable out-of-line atomic operations on Aarch64
Date: Fri, 18 Feb 2022 12:46:15 +1100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0

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~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]