qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Stefan Hajnoczi" <stefanha@redhat.com>,
	"Emilio G. Cota" <cota@braap.org>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: qemu-devel@nongnu.org, Qemu-block <qemu-block@nongnu.org>
Subject: Re: [Bug 1910505] [NEW] atomic failure linking with --enable-sanitizers on 32-bit Linux hosts
Date: Thu, 7 Jan 2021 11:23:31 +0100	[thread overview]
Message-ID: <605b709c-19b7-d692-5ed0-2c12a48a8bb4@redhat.com> (raw)
In-Reply-To: <88bee064-f323-366a-7931-dc4bc40057e3@redhat.com>

On 07/01/21 10:10, Philippe Mathieu-Daudé wrote:
> libblock.fa(block_io.c.o): In function `stat64_max':
> include/qemu/stats64.h:58: undefined reference to `__atomic_load_8'
> include/qemu/stats64.h:60: undefined reference to
> `__atomic_compare_exchange_8'
> libblock.fa(block_qapi.c.o): In function `stat64_get':
> include/qemu/stats64.h:40: undefined reference to `__atomic_load_8'
> libqemuutil.a(util_qsp.c.o): In function `qatomic_set_u64':
> include/qemu/atomic.h:478: undefined reference to `__atomic_store_8'
> libqemuutil.a(util_qsp.c.o): In function `qatomic_read_u64':
> include/qemu/atomic.h:468: undefined reference to `__atomic_load_8'
> clang: error: linker command failed with exit code 1 (use -v to see
> invocation)
> 
> Issue previously reported on the list here:
> https://www.mail-archive.com/qemu-devel@nongnu.org/msg770128.html

Looks like 64-bit atomics are available without sanitizers, but fall 
back to libatomic with sanitizers (tsan probably?).

So CONFIG_ATOMIC64 is not detected properly in configure, because 
-fsanitize=* flags are added (at "end of CC checks" around line 5000) 
after the atomic64 test (around 400 lines before that).

I'm not sure what breaks if -fsanitize flags are added earlier.

Paolo



  reply	other threads:[~2021-01-07 10:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-07  8:40 [Bug 1910505] [NEW] atomic failure linking with --enable-sanitizers on 32-bit Linux hosts Philippe Mathieu-Daudé
2021-01-07  9:10 ` Philippe Mathieu-Daudé
2021-01-07 10:23   ` Paolo Bonzini [this message]
2021-05-09 15:44 ` [Bug 1910505] " Philippe Mathieu-Daudé

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=605b709c-19b7-d692-5ed0-2c12a48a8bb4@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=cota@braap.org \
    --cc=marcandre.lureau@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --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).