Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Oct 2020 08:47:10 +0200
From:      Dimitry Andric <dim@FreeBSD.org>
To:        Adrian Chadd <adrian@FreeBSD.org>
Cc:        Alexander Richardson <arichardson@freebsd.org>, freebsd-current <freebsd-current@freebsd.org>, "freebsd-mips@freebsd.org" <freebsd-mips@freebsd.org>
Subject:   Re: mips32 + gcc9 -- still broken
Message-ID:  <09E17145-6746-428D-87F2-65FBA934BCF5@FreeBSD.org>
In-Reply-To: <CAJ-VmokV4UfiLe6yntED7__TeJ6TORVkW67kpoc3tCKxH4vrmA@mail.gmail.com>
References:  <CAJ-Vmonck6=QYFshmrnuyi8C8LiPKE9gNGeSoKLybV0pjXZbPw@mail.gmail.com> <CAJ-Vmo=1c0M2QppvqUKqn9jVD%2BtH3SR9BONxV6cH4QXvBS8xkw@mail.gmail.com> <CA%2BZ_v8reurn%2BfVtKn2PeOUK3n-UyBLM0dSdBsA%2BK5LPwq0u5Hw@mail.gmail.com> <CAJ-VmonYD7RECe-X2cj5NHVtXvM18WSxY5zM1sKiz_4tViiXhg@mail.gmail.com> <CAJ-VmokV4UfiLe6yntED7__TeJ6TORVkW67kpoc3tCKxH4vrmA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--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 <adrian@FreeBSD.org> 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 <adrian@freebsd.org> wrote:
>=20
>=20
> On Mon, 21 Sep 2020 at 00:43, Alexander Richardson =
<arichardson@freebsd.org> wrote:
>=20
> On Mon, 21 Sep 2020, 07:38 Adrian Chadd, <adrian@freebsd.org> 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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?09E17145-6746-428D-87F2-65FBA934BCF5>