From owner-freebsd-current@freebsd.org Mon Oct 5 06:47:13 2020 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C9F9E3F9D31; Mon, 5 Oct 2020 06:47:13 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C4WNx4mJCz4l2b; Mon, 5 Oct 2020 06:47:13 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:470:7a58:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 640F61D337; Mon, 5 Oct 2020 06:47:13 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:470:7a58::ec78:3cd1:1c78:583c] (unknown [IPv6:2001:470:7a58:0:ec78:3cd1:1c78:583c]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 7E1B64CABE; Mon, 5 Oct 2020 08:47:11 +0200 (CEST) From: Dimitry Andric Message-Id: <09E17145-6746-428D-87F2-65FBA934BCF5@FreeBSD.org> Content-Type: multipart/signed; boundary="Apple-Mail=_62687C09-45AB-47F0-AFB0-73D1D7D60E62"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.17\)) Subject: Re: mips32 + gcc9 -- still broken Date: Mon, 5 Oct 2020 08:47:10 +0200 In-Reply-To: Cc: Alexander Richardson , freebsd-current , "freebsd-mips@freebsd.org" To: Adrian Chadd References: X-Mailer: Apple Mail (2.3445.104.17) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2020 06:47:13 -0000 --Apple-Mail=_62687C09-45AB-47F0-AFB0-73D1D7D60E62 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Sorry, i hadn't picked up on this thread at all. What is the concrete = patch you are proposing? Is is in Phabricator somewhere? (Note that when building with gcc, we should really just automatically = add -latomic, to get rid of these errors.) -Dimitry > On 5 Oct 2020, at 05:40, Adrian Chadd wrote: >=20 > ping! >=20 > I've got the world building on gcc + mips32 just patching = cxx_contention_t to be 32 bits, but it looks like an ABI change. >=20 > Would the better thing be to just make it 32 bits on FreeBSD + MIPS = for now? I don't think anyone is going to mind that changing at this = point. >=20 >=20 >=20 > -adrian >=20 >=20 > On Sat, 3 Oct 2020 at 13:35, Adrian Chadd wrote: >=20 >=20 > On Mon, 21 Sep 2020 at 00:43, Alexander Richardson = wrote: >=20 > On Mon, 21 Sep 2020, 07:38 Adrian Chadd, wrote: > So, the big list of unknown symbols was my fault! Whoops. >=20 > i've gotten further using gcc-6.4 by fixing some of the = warnings/issues > that have crept up. >=20 > Here's a review for one of them: >=20 > https://reviews.freebsd.org/D26504 >=20 > However, now I've hit: >=20 > /usr/local/bin/mips-unknown-freebsd13.0-ld: > = /usr/home/adrian/work/freebsd/head-embedded/obj/mips_ap/usr/home/adrian/wo= rk/freebsd/head-embedded/src/mips.mips/tmp/usr/lib/libc++.so.1: > undefined reference to `__atomic_fetch_sub_8' > /usr/local/bin/mips-unknown-freebsd13.0-ld: > = /usr/home/adrian/work/freebsd/head-embedded/obj/mips_ap/usr/home/adrian/wo= rk/freebsd/head-embedded/src/mips.mips/tmp/usr/lib/libc++.so.1: > undefined reference to `__atomic_load_8' > /usr/local/bin/mips-unknown-freebsd13.0-ld: > = /usr/home/adrian/work/freebsd/head-embedded/obj/mips_ap/usr/home/adrian/wo= rk/freebsd/head-embedded/src/mips.mips/tmp/usr/lib/libc++.so.1: > undefined reference to `__atomic_fetch_add_8' >=20 > .. looks like we need some 64 bit atomics now in mips32 for libc++ / = devd >=20 > Those are now provided by compiler-rt when using clang. With GCC = you'll have to link libatomic. I had a quick look at the code in libc++ = that uses the 64-bit atomics a few weeks ago and I believe it's the = futex fallback code. The best solution would probably be to port it to = use umtx but for MIPS32 it might be fine to use a 32 bit atomic instead. >=20 > It compiled fine with a 32 bit atomic. Why's it 64 bit for everything = but Linux? >=20 > Can we make it a 32 bit atomic for all FreeBSD platforms? Are there = ABI concerns? >=20 >=20 >=20 > -adrian >=20 >=20 > Alex --Apple-Mail=_62687C09-45AB-47F0-AFB0-73D1D7D60E62 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCX3rBbgAKCRCwXqMKLiCW o6ZQAJwI4EiWgZGXE+7ICu5AChJ9t+WpAgCfb/SUy8lPbn8Hr3AN1JMZgG7i7RA= =I6y3 -----END PGP SIGNATURE----- --Apple-Mail=_62687C09-45AB-47F0-AFB0-73D1D7D60E62--