Date: Tue, 11 Aug 2020 15:57:01 +0400 From: Gleb Popov <arrowd@freebsd.org> To: =?UTF-8?Q?T=C4=B3l_Coosemans?= <tijl@freebsd.org> Cc: Konstantin Belousov <kostikbel@gmail.com>, toolchain@freebsd.org Subject: Re: Undefined reference to __atomic_store_8 Message-ID: <CALH631mUDeH3WHXyUwEQMKWNOoaAUpFJ2ZVU0rgme_5PWpEF4A@mail.gmail.com> 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 9, 2020 at 4:37 PM T=C4=B3l Coosemans <tijl@freebsd.org> 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 kno= w. > > > > This doesn't seem to work. > > > > The code referencing __atomic_load_n() is C and GHC buildsystem already > > passes -march=3Di686. 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. > Ok, thanks for explanations.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CALH631mUDeH3WHXyUwEQMKWNOoaAUpFJ2ZVU0rgme_5PWpEF4A>