From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by sourceware.org (Postfix) with ESMTP id 2CFE63858C2C for ; Tue, 9 Jan 2024 08:27:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2CFE63858C2C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.crashing.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2CFE63858C2C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=63.228.1.57 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704788873; cv=none; b=iZgmdmj3MwECNeOQPnJDLbWAtAGpCjY2dZrK04PMGZ0qH7ZcTTd5maPq+0N28o9ixTByfwAQVHRAtdIGFy35JyeY63TQMT1vLdQx6Sndzffc5DLmS2ISO5pOM+5fuhVVcePXkkINUD0Kpwvb4NdNkfvjfILT12v1sEewDXUiZ2A= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704788873; c=relaxed/simple; bh=2S8494SsG1wg7gOWTRhifd5zdKE7H7sFpqZ7OD3t/cA=; h=Date:From:To:Subject:Message-ID:Mime-Version; b=ha8a+36mUb5TiMm/+EHrCy8XzTHq/cVo8hB3SnsFbO0Wx+AfcEKWEKNvCwuTF5/+tjXPuroz7U17asqy/J22C5rMDN6gmJd3yOTBCLzUFXiFyCPa5cIXVEStGPCfeI7bM/7Wkn4F4R94c74kN36Gsz+yG4G/2ywtWC8mp3hiLyc= ARC-Authentication-Results: i=1; server2.sourceware.org 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4ee8067e72028b070d92e10fa33ddde3a498cb48.camel@xry111.site> User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,KAM_SHORT,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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