From owner-freebsd-toolchain@freebsd.org Fri Aug 7 21:29:11 2020 Return-Path: Delivered-To: freebsd-toolchain@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 0B4FF374F80 for ; Fri, 7 Aug 2020 21:29:11 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 4BNdlp5q3mz3wsm for ; Fri, 7 Aug 2020 21:29:10 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: by mailman.nyi.freebsd.org (Postfix) id C5AEA374F7F; Fri, 7 Aug 2020 21:29:10 +0000 (UTC) Delivered-To: toolchain@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 C4430374D20 for ; Fri, 7 Aug 2020 21:29:10 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BNdlp20Ypz3gkj; Fri, 7 Aug 2020 21:29:09 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 077LSuIk050282 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 8 Aug 2020 00:28:59 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 077LSuIk050282 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 077LSuM4050281; Sat, 8 Aug 2020 00:28:56 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 8 Aug 2020 00:28:55 +0300 From: Konstantin Belousov To: Gleb Popov Cc: toolchain@freebsd.org Subject: Re: Undefined reference to __atomic_store_8 Message-ID: <20200807212855.GB2551@kib.kiev.ua> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home X-Rspamd-Queue-Id: 4BNdlp20Ypz3gkj X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; REPLY(-4.00)[] X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Aug 2020 21:29:11 -0000 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.