From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yw1-f173.google.com (mail-yw1-f173.google.com [209.85.128.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B64E93D7D9F for ; Wed, 5 Aug 2026 18:56:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785956163; cv=none; b=hrPFc48utOnKn8awdmsYlnFpapeTmmZPBGQ4IbO8EnTGJ0FIRL/jhGPDHN69HMPEWBltS3ImdfnRHIPCbt/1pl00x4U32x/mhLmNIbayS19djSa2q4pWW0ZKir9aIE4wirTulORjvE9qH1SkCjI7x2rsnA2XBTjpml53KLBwflQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785956163; c=relaxed/simple; bh=X/sheB2HerNRDwMRSjJhuRwSfkYyfYB880Mu9Bm0zM8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WwlJRsvM0WoPW9FuDFy4cCxtmGUDmvv0VaRcv144tZOUohiFGN3HsdaeLEXQ1PzE+JBoyadymkUsxEUw0SZDPUwvYGhaaSpwd8huC++mB8JdOiMpRNMFwut7V2BmKq205PpWdebOF94UlXlJUGkznb5UR0TKhDWYZ5ge1/RsImU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=cPmT/+uL; arc=none smtp.client-ip=209.85.128.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="cPmT/+uL" Received: by mail-yw1-f173.google.com with SMTP id 00721157ae682-81ee6b2da98so20138627b3.3 for ; Wed, 05 Aug 2026 11:56:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785956160; x=1786560960; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=TGeYBl1VUIwt/G4nfmKLTgCtjzdo27V8KoUvBJpzzDw=; b=cPmT/+uLpce8SKENudlRxESni5y8tchI2GJAosBoI7UNsrQMWVUhdh9jGiw2DZSV3H bp7Eh1iJAmwk4s9U3Qby6oTesb588lrHrS7I5t4S7vlckBf7S/TPaiqgACP2vThFKX7I xIfP1M5Wzw7/8SQOq3v+tFtzbC/IA6Lol1iUilBa97PVQtznFFVu/1Ssy9UF8JOQD4ob POu3Wb+N0sO+szx9u+5tXoLKOMb/X+pJYE6Ejplh+vSI267sq51g8pNlDwt7KjQyXfuT 8QLyGCDhEgbEK7vk/h1WA897qVGW04btQT9Vf7QbbrdcMhebtUplbdWrnlgUnhCet5Xm S8Uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785956160; x=1786560960; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=TGeYBl1VUIwt/G4nfmKLTgCtjzdo27V8KoUvBJpzzDw=; b=afzMrVkFDqYGBNUKVedBJo/A9lmoXUcaKOuzftLYLtslWL/ZbW22w5CtLTapjU2bkX sRc/jjI4rhLrn5E9cMpd9kALtSrmGuoP1pWBc71pTXbWcqV7lNIeJwa5WJmvjip4bJii fbSOblnZ8Uun0YUErc3IQWYiBJC4fPQPYlbSmoIUULKVPyRJWTelBIrLhyn1Wcet1eDd bkQxBc4XYtMkQ21aVIYtfSlyyxghwSjc+pp2i9GoVYqyilyJDsiGB/PLYi98GS6EEMsn wsrjE4umZ9maZDppqOJCR/nesH7psNLJYZz5S4Uqi32mSHDue+8v5gIhbdcrjHmYkhzg IYNw== X-Forwarded-Encrypted: i=1; AHgh+RqgA+5q2QviK/tSzRYXsZYh0F+PJLHbzP/8WbxgbJCwAXukENqzAR017fKWKKmlGQaZUQWPWR2ti/FZUh0=@vger.kernel.org X-Gm-Message-State: AOJu0YxdGX1jq/FJp5eV5wsaGE4rRI8laBgGt7yO/a2nAytDMe+5iVJm Xg5q8SK770TN7AxEBlIBBCG7RO8+khu+QuH5kI+Yqdb+DIXT2QIigOmL X-Gm-Gg: AR+sD117LWWE//iRTyzkBPsH5jxfB8RHSEOS6TZAlq4ZIE2rzkUhS+ZyIlxduK0qDo8 03aJi8bMOOC88pC0YhcZH0PehEjF7dBYcPoF98kZpWjWOLxWDohXbQkU8yBzvtS+V1mXPJKEFJm RPBijemfrMt0Pk/xOmGQxX3hiv7F7/vlJZhr8EiZr6+k6vxdsix4nTigtoqlB1cQ0aiJfGc1Abk fUyKYCiDHsQe5+Hl7VtrR5iozIlMYYyktBzPOslGXrmL6JOy1lfvqbHhakvxHDjlB3H/618Yl9x gJB6YoG7au/hvmGaQWEnKPbZWPTlZF7j1BPgtEx5vsRUreZl6UZ0J4deMNoWe/yhEsdWehGCAWt CWImQVKuIGxysoLtxD3inP9vzV4mvoHe89EWzsOgJhLYq8Hg5aRPMQcXVEQDRkUQ11nCSuULUDr dLAwcp8CcrDDsaYwyLgCxgUUsz/xOjxM4v8CSBmgrmJN42zBJ8brauZUqwIpE2 X-Received: by 2002:a05:690c:6212:b0:81f:64cf:2c58 with SMTP id 00721157ae682-8201bccf8ddmr51869547b3.6.1785956159995; Wed, 05 Aug 2026 11:55:59 -0700 (PDT) Received: from localhost ([2600:1702:7a90:6f9f:8bc4:8aec:108d:7a04]) by smtp.gmail.com with ESMTPSA id 00721157ae682-820131d9135sm25910817b3.6.2026.08.05.11.55.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Aug 2026 11:55:58 -0700 (PDT) From: Matt Turner To: Richard Henderson , Matt Turner , Magnus Lindholm , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Nicolas Schier Cc: linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-kbuild@vger.kernel.org Subject: [PATCH v2 1/2] alpha: pass -Wa,-mev6 only when using GNU as Date: Wed, 5 Aug 2026 14:55:57 -0400 Message-ID: <20260805185557.3283233-1-mattst88@gmail.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260803-alpha-clang-v1-0-1c4ba5ba7a64@gmail.com> References: <20260803-alpha-clang-v1-0-1c4ba5ba7a64@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit That flag exists to stop gas emulating instructions the assembler thinks the target lacks. It is a gas-only option, and LLVM's integrated assembler does not emulate instructions in the first place, so nothing is needed there. Condition it on CONFIG_AS_IS_GNU rather than the compiler, so it is still passed for clang builds using GNU as (LLVM_IAS=0) and omitted only for the integrated assembler. Signed-off-by: Matt Turner --- Only this patch changed; patch 2/2 ("alpha: read $gp and $sp explicitly for clang") is unchanged from v1 and is not resent. Changes in v2: - Drop the scripts/Makefile.clang CLANG_TARGET_FLAGS_alpha entry. It will be sent separately when the alpha backend is upstreamed to LLVM. - Condition -Wa,-mev6 on CONFIG_AS_IS_GNU rather than CONFIG_CC_IS_GCC, so it is still passed for clang builds using GNU as (LLVM_IAS=0). - Reword the subject and commit message for the reduced scope. - Link to v1: https://lore.kernel.org/r/20260803-alpha-clang-v1-0-1c4ba5ba7a64@gmail.com arch/alpha/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/alpha/Makefile b/arch/alpha/Makefile index 35445ff2e489..7074602dca94 100644 --- a/arch/alpha/Makefile +++ b/arch/alpha/Makefile @@ -27,10 +27,16 @@ cpuflags-$(CONFIG_ALPHA_GENERIC) := -mcpu=ev56 -mtune=ev6 cflags-y += $(cpuflags-y) +KBUILD_CFLAGS += $(cflags-y) + # For TSUNAMI, we must have the assembler not emulate our instructions. # The same is true for IRONGATE, POLARIS, PYXIS. # BWX is most important, but we don't really want any emulation ever. -KBUILD_CFLAGS += $(cflags-y) -Wa,-mev6 +# Only gas emulates instructions the target does not implement, and only gas +# understands -mev6. LLVM's integrated assembler never emulates. +ifdef CONFIG_AS_IS_GNU +KBUILD_CFLAGS += -Wa,-mev6 +endif libs-y += arch/alpha/lib/ -- 2.54.0