Date: Sat, 6 Jul 2013 15:08:55 +1000 From: Peter Jeremy <peter@rulingia.com> To: freebsd-arm@freebsd.org Subject: Re: buildworld failure on arm/armv6 using gcc Message-ID: <20130706050855.GQ39302@server.rulingia.com> In-Reply-To: <20130706013348.GP39302@server.rulingia.com> References: <20130706013348.GP39302@server.rulingia.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--itqfrb9Qq3wY07cp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2013-Jul-06 11:33:48 +1000, Peter Jeremy <peter@rulingia.com> wrote: >I'm getting the following error trying to build either r252698 >(natively) or r252781 (cross) for my RPi with gcc (ie >WITHOUT_CLANG=3Dyes). The problem goes away if I use clang but I understood gcc should still be supported. >/usr/obj/usr/src/usr.bin/svn/svn/../lib/libsvn_subr/libsvn_subr.a(named_at= omic.o): In function `svn_named_atomic__cmpxchg': >named_atomic.c:(.text+0xf0): undefined reference to `__sync_val_compare_an= d_swap_8' >/usr/obj/usr/src/usr.bin/svn/svn/../lib/libsvn_subr/libsvn_subr.a(named_at= omic.o): In function `svn_named_atomic__add': >named_atomic.c:(.text+0x174): undefined reference to `__sync_add_and_fetch= _8' >/usr/obj/usr/src/usr.bin/svn/svn/../lib/libsvn_subr/libsvn_subr.a(named_at= omic.o): In function `svn_named_atomic__write': >named_atomic.c:(.text+0x1c0): undefined reference to `__sync_lock_test_and= _set_8' >/usr/obj/usr/src/usr.bin/svn/svn/../lib/libapr/libapr.a(builtins.o): In fu= nction `apr_atomic_dec32': >builtins.c:(.text+0x90): undefined reference to `__sync_sub_and_fetch_4' >*** Error code 1 I've split the failures into two categories: __sync_add_and_fetch_8 __sync_lock_test_and_set_8 __sync_val_compare_and_swap_8 these should be defined in /usr/src/sys/arm/arm/stdatomic.c (and compiled into libcompiler_rt.a) but that file only defines 1-, 2- and 4-byte variants for userland armv6 (it looks like it fakes 8-byte variants in the kernel by disabling interrupts). I don't know ARM assembler well enough to know if there's any way to do 64-bit atomic operations. I suspect not. __sync_sub_and_fetch_4 There are references to __sync_sub_and_fetch() but I can't any sign of a definition. It looks like __sync_sub_and_fetch_4 is supposed to be a gcc builtin so I'm not sure why it's being emitted without a definition. >Tinberbox build are succeeding but I gather they are using clang. It looks like it would be worthwhile building 9.x and head with both gcc and clang to prevent this sort of regression. --=20 Peter Jeremy --itqfrb9Qq3wY07cp Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (FreeBSD) iEYEARECAAYFAlHXpmcACgkQ/opHv/APuIfhkACfWYL/jeeIv9pj04MoC6BkpPy2 Rg0An143IyeSHXHxQJTp8nvklbJdhqtL =QJ4j -----END PGP SIGNATURE----- --itqfrb9Qq3wY07cp--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130706050855.GQ39302>