Date: Sun, 9 Aug 2020 18:43:12 +0300 From: Konstantin Belousov <kostikbel@gmail.com> To: =?utf-8?Q?T=C4=B3l?= Coosemans <tijl@freebsd.org> Cc: Gleb Popov <arrowd@freebsd.org>, toolchain@freebsd.org Subject: Re: Undefined reference to __atomic_store_8 Message-ID: <20200809154312.GH2551@kib.kiev.ua> In-Reply-To: <20200809143742.430764e7@FreeBSD.org> References: <CALH631msD2jEwaH2ejzdE5RCYd=CA2GYV-o-%2BfC6sPSskXdkTg@mail.gmail.com> <20200807212855.GB2551@kib.kiev.ua> <CALH631=FxoEdp_akV-szxTuLVrZ4oFgHWKcWJNOGEuLwqJ3Hyw@mail.gmail.com> <20200808133000.GC2551@kib.kiev.ua> <CALH631nqdHq02xYM4cnOaPhmB5L3O5TJyZiKVNrUJu7kHg0uFQ@mail.gmail.com> <20200809143742.430764e7@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Aug 09, 2020 at 02:37:42PM +0200, Tijl Coosemans wrote: > On Sun, 9 Aug 2020 15:36:51 +0400 Gleb Popov <arrowd@freebsd.org> wrote: > > On Sat, Aug 8, 2020 at 5:30 PM Konstantin Belousov <kostikbel@gmail.com> > > wrote: > >> For code generated by gcc or clang, yes. > >> If the reference to the symbol was generated by ghc, then I do not know. > > > > This doesn't seem to work. > > > > The code referencing __atomic_load_n() is C and GHC buildsystem already > > passes -march=i686. Still, the problem persists. > > Interestingly, 12.1-RELEASE-p2 doesn't have this problem, but > > 12.1-RELEASE-p7 does. > > > > What library provides these symbols when clang is used? And I'm a bit > > obscured how -march flag can affect these symbols' visibility at all? > > There is no such library. i586 supports 64 bit atomic operations so > the compiler should emit instructions for that instead of a function > call. Check that *.o files that match "__atomic_load" are in fact built > with -march. > > 12.1-RELEASE-p7 probably has a newer clang that fixed an issue where the > compiler would always emit instructions, even for i386 and i486. I do not believe there were any change in the toolchain between p2 and p7, this is more likely indicates some fluctuation in the build. The only change that could be even remotely declared as possibly related is EN-20:10.build r360473. Indeed you need to look at the .o files that reference _8 symbol. I would closely look at the compilation command used for them, for start.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200809154312.GH2551>