From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 85B22C46CD2 for ; Tue, 9 Jan 2024 08:30:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Mime-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Brv7ln/rqzWuUkAv+tvLVzHHM6pHb34y0asO2f6UD5g=; b=eXDM36pHroI2V6 EYWtnGo0nSDcM7nBHR90sXHczvKsoL04k5pPSwpPoJpXVfNbXf8uvP+Lsj4lqIhCoTPxTDZ98E53C I9SwS2+A1CsLhARt9FfWAkX5u+ZpFk/EnF9b0zbT54R4Mxu2qLDZJm/2qNbiWEGzIdNuUEeaI0VJJ Ik8djZOi4Ojv7X8V2RkxwfwP555srPUmZ7d7sb9orMISGqpUEAli3OJ/ACJ4YXu1UPwW59NyFekOz cV0sHfRkdeuJgcTqDcC9p2cEUYhLW1eiUnKAjLvEgYRvZnCkQhFc4Eo5Xgla9mKEkDbp22kXfrTX/ VhKQGk7PhEyk9n+poGfw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rN7Uk-007KN6-0U; Tue, 09 Jan 2024 08:29:58 +0000 Received: from gate.crashing.org ([63.228.1.57]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rN7Uh-007KLu-1U for linux-arm-kernel@lists.infradead.org; Tue, 09 Jan 2024 08:29:56 +0000 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 4098QmWa018414; Tue, 9 Jan 2024 02:26:48 -0600 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 4098Qmev018413; Tue, 9 Jan 2024 02:26:48 -0600 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Tue, 9 Jan 2024 02:26:47 -0600 From: Segher Boessenkool To: Xi Ruoyao Cc: richard clark , Mark Rutland , gcc-help@gcc.gnu.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: undefined reference to `__aarch64_cas4_sync' error on arm64 native build Message-ID: <20240109082647.GJ19790@gate.crashing.org> References: <9aef98eed96ed32962ce90499291cb30ad5e3e14.camel@xry111.site> <20240109074843.GI19790@gate.crashing.org> <4ee8067e72028b070d92e10fa33ddde3a498cb48.camel@xry111.site> Mime-Version: 1.0 Content-Disposition: inline In-Reply-To: <4ee8067e72028b070d92e10fa33ddde3a498cb48.camel@xry111.site> User-Agent: Mutt/1.4.2.3i X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240109_002955_621829_5533DEB1 X-CRM114-Status: GOOD ( 12.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Jan 09, 2024 at 04:09:20PM +0800, Xi Ruoyao wrote: > If GCC is configured with things like --with-arch=something, libgcc can > contain (FP/vector) instructions unsafe to use in kernel w/o special > handling. No, it can not. Please file a bug () if this happens to you. Thanks! --with-arch= only sets the *default* options, the user can override this always (with an -march= option, say). > If libgcc is so vital GCC needs to provide a way to make it work for a > set of compiler switches incompatible with any pre-built multilib. For > example, installing the source of libgcc into /usr/lib/gcc and provide a > tool to build a libgcc.a with the specified options. That is how things are supposed to work, already. Either libgcc uses only instructions that work everywhere, or libgcc is multilibbed, things like that. In all normal cases this is completely transparent to the compiler user. Segher _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel