Date: Sat, 8 Aug 2020 16:11:55 +0200 From: =?UTF-8?B?VMSzbA==?= Coosemans <tijl@FreeBSD.org> To: Gleb Popov <arrowd@freebsd.org> Cc: Konstantin Belousov <kostikbel@gmail.com>, toolchain@freebsd.org Subject: Re: Undefined reference to __atomic_store_8 Message-ID: <20200808161155.5db7e655@FreeBSD.org> In-Reply-To: <CALH631=FxoEdp_akV-szxTuLVrZ4oFgHWKcWJNOGEuLwqJ3Hyw@mail.gmail.com> References: <CALH631msD2jEwaH2ejzdE5RCYd=CA2GYV-o-%2BfC6sPSskXdkTg@mail.gmail.com> <20200807212855.GB2551@kib.kiev.ua> <CALH631=FxoEdp_akV-szxTuLVrZ4oFgHWKcWJNOGEuLwqJ3Hyw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 8 Aug 2020 12:37:42 +0400 Gleb Popov <arrowd@freebsd.org> wrote: > On Sat, Aug 8, 2020 at 1:29 AM Konstantin Belousov <kostikbel@gmail.com> > wrote: >> On Fri, Aug 07, 2020 at 08:42:12PM +0400, Gleb Popov wrote: >>> Hello toolchain@ >>> >>> I'm testing a new release of GHC (Haskell compiler) and it fails to link >>> to i386 architectures with >>> >>> /wrkdirs/usr/ports/lang/ghc/work/ghc-8.10.1/libraries/ghc-prim/dist-install/build/libHSghc-prim-0.6.1-ghc8.10.1.so: >>> undefined reference to `__atomic_store_8' >>> >>> /wrkdirs/usr/ports/lang/ghc/work/ghc-8.10.1/libraries/ghc-prim/dist-install/build/libHSghc-prim-0.6.1-ghc8.10.1.so: >>> undefined reference to `__atomic_load_8' >>> >>> Any suggestions on how to fix this? >> >> Either link to libatomic from recent gcc, or switch target cpu to something >> that is pentium or newer. I doubt that it is reasonable to run GHC on 486. > > By switching target CPU you mean passing -march=pentium? Some ports use this: .include <bsd.port.options.mk> [...] .if ${ARCH} == i386 && empty(CFLAGS:M-march=*) CFLAGS+= -march=i586 .endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200808161155.5db7e655>