All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [FreeBSD] Host build i386 failing to build aarch64 targets
@ 2016-03-20 19:20 Sean Bruno
  2016-03-20 20:03 ` Peter Maydell
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Sean Bruno @ 2016-03-20 19:20 UTC (permalink / raw)
  To: QEMU Developers

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

aarch64 targets are now failing to build on i386 hosts due to missing
__atomic_load_8() calls since this commit:

https://github.com/qemu/qemu/commit/a0aa44b488b3601415d55041e4619aef5f3a4ba8#diff-c143d686899ae51d7b927d9c682e12fd

I'm unsure if Linux is disabling aarch64 targets for i386 hosts or if
this commit works "just fine" on Linux hosts right now, as it doesn't
work with clang or gcc.

More or less, the code in question ends up looking like this bit of
test code:

#include <stdio.h>
#include <sys/types.h>
#include <machine/atomic.h>

#define atomic_read(ptr)                          \
    ({                                            \
    typeof(*ptr) _val;                            \
     __atomic_load(ptr, &_val, __ATOMIC_RELAXED); \
    _val;                                         \
    })

int main ()
{
	int foo;
	int64_t foo64;

	atomic_read(&foo);
	atomic_read(&foo64);

	return(0);
}


This test code will manifest the same issue as the aarch64 target
building on FreeBSD i386 with the error:

undefined reference to `__atomic_load_8'
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQF8BAEBCgBmBQJW7vgAXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRCQUFENDYzMkU3MTIxREU4RDIwOTk3REQx
MjAxRUZDQTFFNzI3RTY0AAoJEBIB78oecn5kZsoH+gOHnQEZp967VbHTGFz+loK1
VnwdJC+fxTt/Una2awaztF5mOWcHPQ/yEtZUmsoBOKlynNxHAFEKQHTqA/0H+78g
J1Xyi28cXFZDB4Seuk2tBgpky1rq9xMTHkh3W79Dcn/g1Kpmf4ha06rZYcSITilK
pTOAHCKYTI5X8LW33NibY3avo/p4NSvbm7DTiLGtzR8xiGrtKKTF5UBQ0If3xvnp
VG4aCm9dt9G/KmYvGQAaZqXc3mV5hfVr1cxG++5zprH8CKHBck9uc8pm0o70qUb5
/uhwaQTMiJbRd642/vwUjZuXa4dZCeb3WLHHIz6pNO6HhBBxtXiSFHYTZ4fqdxI=
=t6x6
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2016-04-06 18:51 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-20 19:20 [Qemu-devel] [FreeBSD] Host build i386 failing to build aarch64 targets Sean Bruno
2016-03-20 20:03 ` Peter Maydell
2016-03-21  9:11   ` Alex Bennée
2016-03-21 14:52     ` Sean Bruno
2016-03-21 15:36       ` Alex Bennée
2016-03-21 15:56         ` Paolo Bonzini
2016-03-22 16:10           ` Sean Bruno
2016-03-22 16:22             ` Alex Bennée
2016-03-28 17:00               ` Sean Bruno
2016-03-31 16:57               ` Sean Bruno
2016-03-21  9:06 ` Paolo Bonzini
2016-03-21  9:35   ` Peter Maydell
2016-03-21 11:23     ` Paolo Bonzini
2016-03-21 11:49       ` Alex Bennée
2016-04-06 16:11 ` Sean Bruno
2016-04-06 18:51   ` Alex Bennée

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.