From owner-freebsd-toolchain@freebsd.org Tue Aug 11 11:57:31 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 181683AB676 for ; Tue, 11 Aug 2020 11:57:31 +0000 (UTC) (envelope-from 6yearold@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 4BQrtL69NRz4R0y for ; Tue, 11 Aug 2020 11:57:30 +0000 (UTC) (envelope-from 6yearold@gmail.com) Received: by mailman.nyi.freebsd.org (Postfix) id D3B4B3ABD8B; Tue, 11 Aug 2020 11:57:30 +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 D37C23ABD10 for ; Tue, 11 Aug 2020 11:57:30 +0000 (UTC) (envelope-from 6yearold@gmail.com) Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BQrtK6WPHz4Qqk; Tue, 11 Aug 2020 11:57:29 +0000 (UTC) (envelope-from 6yearold@gmail.com) Received: by mail-lj1-f175.google.com with SMTP id m22so13122751ljj.5; Tue, 11 Aug 2020 04:57:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=r+C2UGNogAR6RuWCYY+PDNrWwNzev6n9SigspMsel2o=; b=h0At6s7752DjG/JuIM0V2eJIoi79g96kieINmu5vJ2GpQ+Iu4GQdtIXYL2sVg6DrpZ 4JBdGrmfzjjG5ArQkXacRAcCpF2Ta5MYBK9DQeiey/yDgO3R3cVPJJ6g9F1ard5Lmqic G21urylXRhSeAjOGr7ShTHEqKqDpH+6SlptELiAKRbfqShO5xe/ZpJG+SWwRkk8MGp2F Tuhu/tVocNj1gGT33dlP40hsrVC965NhDJS8aUcwUH6lEGvyOVZlUAp6pTu+0BY7r9oB v5RtL3Sb3lPvH1heJYOmg/5IzEIZbMkCNps+n5b8ibVmpafRe7XfEuNMKk8q042iUicx tw1g== X-Gm-Message-State: AOAM532oCM/oLYsi+jxkxgivs6Fk0/nWcX7BOull1IZPcbF/+RUHuXFr lcK9VW9rh7lfLACF0nJYnuitV4D9bWc= X-Google-Smtp-Source: ABdhPJwFKn1cW88eM6AeVR5no6rFlzgA2dAK9k9OTRe4voS25FeQZ16ByK7YnscLDzp6J9G9eVBOpQ== X-Received: by 2002:a2e:8193:: with SMTP id e19mr3159975ljg.80.1597147048072; Tue, 11 Aug 2020 04:57:28 -0700 (PDT) Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com. [209.85.167.52]) by smtp.gmail.com with ESMTPSA id u9sm11592176lfl.75.2020.08.11.04.57.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 11 Aug 2020 04:57:27 -0700 (PDT) Received: by mail-lf1-f52.google.com with SMTP id b30so6493532lfj.12; Tue, 11 Aug 2020 04:57:27 -0700 (PDT) X-Received: by 2002:ac2:4ecf:: with SMTP id p15mr3073567lfr.11.1597147047475; Tue, 11 Aug 2020 04:57:27 -0700 (PDT) MIME-Version: 1.0 References: <20200807212855.GB2551@kib.kiev.ua> <20200808133000.GC2551@kib.kiev.ua> <20200809143742.430764e7@FreeBSD.org> In-Reply-To: <20200809143742.430764e7@FreeBSD.org> From: Gleb Popov Date: Tue, 11 Aug 2020 15:57:01 +0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Undefined reference to __atomic_store_8 To: =?UTF-8?Q?T=C4=B3l_Coosemans?= Cc: Konstantin Belousov , toolchain@freebsd.org X-Rspamd-Queue-Id: 4BQrtK6WPHz4Qqk X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of 6yearold@gmail.com designates 209.85.208.175 as permitted sender) smtp.mailfrom=6yearold@gmail.com X-Spamd-Result: default: False [-2.12 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; NEURAL_HAM_LONG(-0.94)[-0.937]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-0.91)[-0.912]; TO_DN_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.27)[-0.266]; RCVD_IN_DNSWL_NONE(0.00)[209.85.208.175:from]; FORGED_SENDER(0.30)[arrowd@freebsd.org,6yearold@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.208.175:from]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[arrowd@freebsd.org,6yearold@gmail.com]; FREEMAIL_ENVFROM(0.00)[gmail.com]; FREEMAIL_CC(0.00)[gmail.com,freebsd.org] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.33 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: Tue, 11 Aug 2020 11:57:31 -0000 On Sun, Aug 9, 2020 at 4:37 PM T=C4=B3l Coosemans wrote: > 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 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.