Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp192848rdd; Tue, 9 Jan 2024 00:38:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IHoVDpIjDMOrZ5AB7T1KZaUSl9YcLCPAIoI9h+O7f2CMMg4QzyQ5je70dELLUQAL1c98DWf X-Received: by 2002:a05:622a:1893:b0:429:8bdc:2ba with SMTP id v19-20020a05622a189300b004298bdc02bamr465922qtc.10.1704789531028; Tue, 09 Jan 2024 00:38:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704789531; cv=none; d=google.com; s=arc-20160816; b=N6pnP6lAV/EoVNJWAjK+BtIYpC+IsVkkDkbVWxcaCL4hchy79zvgZ1L9xQ79BMSQvh peaOdTVYc2cmunJfl9A9zfqhtNfyMYiMHVjlLc2lV9O4cq0V4yXjD7Z1oIwiRsTuqJIW kLK03ITNmQKOAmtmoa5ye1BUjSOcUCZJ9R9kpod4NgCq1vVIjmPQSd92Sbndsmleo0gH 4uQcGh4qCQE3Xbt4YPBIz89YTZmzS8gTNHteF5vYrnKd2EctV4uDwTIOzylZCStOBn7d B7F0pJ8XcCPIX08PDnzc8/hEGvNHfuwDSuYvv9aO8f8uh9TCK6suQjd+QyKs29YYjgYv rwUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=+BXcSvkw81jPXa9p3zu6u1GyW/GgGwqE1Aj6CoPeBIc=; fh=RFoyDDwxfmEUunhFhmt6lU6e2yzzLizxK3WBeCCeiFM=; b=DUY2WhDvyfSdRbFRPk+XkQmJKuexaksVPY4w7csntsRZYzemcScYuytfxgFiaX4e1z imDMp87z43v/WSMKCCdRh23289CSSao+1XAE6v/RBIun3nh3JU6qYxO6hLUMk6vJMwqC 1oe9+E9TVwtnzUm+3e4K0hwQEY/Wp0JRfdpcoHMGcrQzV64YqKS9nW1fC45voE9uup9n 0RjwOWa2V2aV1UISNfOu8rF5TKvnM56Ux/Cz0YcZEk+LdrH7CV8CD/PVJk7Qjei0259c buGnY4STks+Wv2eEu4rTs68biDqqwnxMyjXspdsiWT5RzFiz6A4tpARdRKNldMdMcC40 dF3A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-20588-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20588-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id ca11-20020a05622a1f0b00b00429a5bb284csi933851qtb.22.2024.01.09.00.38.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 00:38:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-20588-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-20588-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20588-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id C89441C25A7B for ; Tue, 9 Jan 2024 08:38:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 83999374C5; Tue, 9 Jan 2024 08:30:02 +0000 (UTC) Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D61093716B for ; Tue, 9 Jan 2024 08:29:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kernel.crashing.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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 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