From owner-freebsd-toolchain@freebsd.org Sun Aug 9 12:37:51 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 2DC913B520A for ; Sun, 9 Aug 2020 12:37:51 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4BPdsq0Hnqz434F for ; Sun, 9 Aug 2020 12:37:51 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 07FB33B5209; Sun, 9 Aug 2020 12:37:51 +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 06A043B4F32 for ; Sun, 9 Aug 2020 12:37:51 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: from mailrelay116.isp.belgacom.be (mailrelay116.isp.belgacom.be [195.238.20.143]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "relay.skynet.be", Issuer "GlobalSign RSA OV SSL CA 2018" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BPdsp2KZPz42sZ; Sun, 9 Aug 2020 12:37:49 +0000 (UTC) (envelope-from tijl@freebsd.org) IronPort-SDR: nQK8kti1A0guzLd+xhFR9ZKvtYDHmckQcUWkPDnMtjLigX4qmB5LVe68wZbnLwiuIXTFtI7pjY PxTm8LV+sHEs5OPSt0kOjx/0jp0F+jWxoDXKcwKaM8BxpMnsrJ6DaOj/jAl+SqOKg9eTHDcrZa OYha7Lw8j4Kd62FX+pQZHoHxppqmDUx5qdxgdBYXCAAGprHoqkMlbtpw+UbOkaISC/Fxw80bnD xyOMXhRDg/d0QvRUwVc/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90jRr+PbormsOlB+Q4KR?= =?us-ascii?q?ICX2+B+eSzzLHj/Ev5T6tWjvAukaTVrYrWKdoUq6KlGQNY3YQu5wyiAzqi1N?= =?us-ascii?q?kUhXwHI0hEeBKDgYjpIVbOIPXgAPejglSskjNryuvIPr37HJrCMGPMkKz8cr?= =?us-ascii?q?pn7E5c0gUzwchF551IErEBPO7zWkjpudzECR85NAi0zPrnCNpn14MeX3mCAq?= =?us-ascii?q?GDMKzMr1CH/fkvLPSWaI8Sojb9JOAv5+Tygn8hhV8dYa6p0IMUaHC/BfRmP0?= =?us-ascii?q?SZYXn3jdgfFWcHpQU+TOnwh12DVT5ffWq9X6U55jsjEoKpEZ/DRpyxgLyGxC?= =?us-ascii?q?q0BIdWZnpBClGCDHjlbIuEW+0SZy2MOcBhiSELWaKmS4872hH9/DP9npVjI+?= =?us-ascii?q?CcwioAsoyrgNFv/erMmTk87zF5Bd+RlWaXQDcnsHkPQmoKO6Q3ikt60VqG2K?= =?us-ascii?q?5jy6hEFN5Xz91TXwoQDrKayPZ1XYOhEjndd8uEHQ71Cu6tBis8G4o8?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2DIAwBr7S9f/8cv8FFgGwEBAQEBAQE?= =?us-ascii?q?BBQEBARIBAQEDAwEBAUAHgUMCgwNoAUkVjTeGCIIQiGKBJX+JYIcrCwEBAQE?= =?us-ascii?q?BAQEBATcEAQGETAKCNyU4EwIDAQEBAwIFAQEGAQEBAQEBBQQBhg9FQwEBBAs?= =?us-ascii?q?BgWIigxkBBTocIxALDgouITYGE4VyAzKySIE0hVKCZg2BHYEFgTgBjSiCAIN?= =?us-ascii?q?sNT6CGogaBJI+iF2aO1CCbJUchG4woBItnyKUJYF6TTAIgyRQGQ2caD8DMDc?= =?us-ascii?q?CBggBAQMJhTKEWIcHAQE?= X-IPAS-Result: =?us-ascii?q?A2DIAwBr7S9f/8cv8FFgGwEBAQEBAQEBBQEBARIBAQEDA?= =?us-ascii?q?wEBAUAHgUMCgwNoAUkVjTeGCIIQiGKBJX+JYIcrCwEBAQEBAQEBATcEAQGET?= =?us-ascii?q?AKCNyU4EwIDAQEBAwIFAQEGAQEBAQEBBQQBhg9FQwEBBAsBgWIigxkBBTocI?= =?us-ascii?q?xALDgouITYGE4VyAzKySIE0hVKCZg2BHYEFgTgBjSiCAINsNT6CGogaBJI+i?= =?us-ascii?q?F2aO1CCbJUchG4woBItnyKUJYF6TTAIgyRQGQ2caD8DMDcCBggBAQMJhTKEW?= =?us-ascii?q?IcHAQE?= Received: from 199.47-240-81.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([81.240.47.199]) by relay.skynet.be with ESMTP; 09 Aug 2020 14:37:46 +0200 Received: from localhost (localhost [127.0.0.1]) by kalimero.tijl.coosemans.org (8.16.1/8.16.1) with ESMTP id 079CbhWN034194; Sun, 9 Aug 2020 14:37:43 +0200 (CEST) (envelope-from tijl@FreeBSD.org) Date: Sun, 9 Aug 2020 14:37:42 +0200 From: =?UTF-8?B?VMSzbA==?= Coosemans To: Gleb Popov Cc: Konstantin Belousov , toolchain@freebsd.org Subject: Re: Undefined reference to __atomic_store_8 Message-ID: <20200809143742.430764e7@FreeBSD.org> In-Reply-To: References: <20200807212855.GB2551@kib.kiev.ua> <20200808133000.GC2551@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4BPdsp2KZPz42sZ X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; ASN(0.00)[asn:5432, ipnet:195.238.0.0/19, country:BE]; local_wl_from(0.00)[freebsd.org] 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: Sun, 09 Aug 2020 12:37:51 -0000 On Sun, 9 Aug 2020 15:36:51 +0400 Gleb Popov wrote: > On Sat, Aug 8, 2020 at 5:30 PM Konstantin Belousov > 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.