From patchwork Tue Oct 29 14:49:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Koakuma via B4 Relay X-Patchwork-Id: 2003756 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=UzaD8BdS; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=ozlabs.org (client-ip=2404:9400:2221:ea00::3; helo=mail.ozlabs.org; envelope-from=srs0=9olt=rz=vger.kernel.org=sparclinux+bounces-2515-patchwork-incoming=ozlabs.org@ozlabs.org; receiver=patchwork.ozlabs.org) Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XdCpj5dvwz1xwc for ; Wed, 30 Oct 2024 01:50:05 +1100 (AEDT) Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by gandalf.ozlabs.org (Postfix) with ESMTP id 4XdCpg55hnz4x8g for ; Wed, 30 Oct 2024 01:50:03 +1100 (AEDT) Received: by gandalf.ozlabs.org (Postfix) id 4XdCpg4yKJz4xD9; Wed, 30 Oct 2024 01:50:03 +1100 (AEDT) Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: gandalf.ozlabs.org; arc=pass smtp.remote-ip="2604:1380:45e3:2400::1" arc.chain=subspace.kernel.org ARC-Seal: i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1730213400; cv=pass; b=YZp3+IrH/xr/53NS/frN8ujNPXZtEbR+KQFuEJ9VmFitj973XpLdrazk4T0qhssA+5H85c93abD5+JGAu0zpwm6HZIIEQt3+n0vXE/nx01txRs6/3x84fYsTWXLX6Sc+wh9ZSNA6c0o3qZi9P67Xeq4qZyD9FVZBoTGoPQ4zQVoTcL/wSQ47Af8HrCUqWZEJL++fyN65znp2K6S1tT1wtHL6sTqY9GumY6V9NZLcsROyTuvv6Ry6du9x0zOxHWiXb06Ja2QP5GgLOO2c1ewLujbTyTcquerYlXjzV7a5USwrOzExY4Sk0xt1P/0wMWulL/J54/Ek29cG8Oryi5fV4g== ARC-Message-Signature: i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1730213400; c=relaxed/relaxed; bh=T2AOnLpZpEFAx7jtbN0gScGcJTGk8IYyVX57phEfomQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=yW8XGxwOA/f3LTSJWTjETuSJ3W9yOJGKjuWGgTmyEyH9e2m8JxlsI9X5cg6FfhOga96jXHTw9OE4VYuuGTWoCqQ/lAbfla3yWW9O87mRD8TBbQt5evDuHlyGnxQHbqLkX3Tc+d1luDKmoERKP7DGNv6Td0+Me7IE3Lfzg7N7AtA4F9yiEkqM7shI9tC+EWBKpFuK8OTJLZtpnLqvsYAunB8TpQNLT6fJx6gNbiLV/t0zEsh1ttZ/p3kB2qyDOdJy3BZifVO4ZUfVciPFf+yxXbRzVIS/6UFm75BGrS5Nxo4HWLaPk0xWfg7fM7cATXH4hg3Z4l989q6Oa6LT12MQfQ== ARC-Authentication-Results: i=2; gandalf.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=UzaD8BdS; dkim-atps=neutral; spf=pass (client-ip=2604:1380:45e3:2400::1; helo=sv.mirrors.kernel.org; envelope-from=sparclinux+bounces-2515-patchwork-incoming=ozlabs.org@vger.kernel.org; receiver=ozlabs.org) smtp.mailfrom=vger.kernel.org Authentication-Results: gandalf.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: gandalf.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=UzaD8BdS; dkim-atps=neutral Authentication-Results: gandalf.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:45e3:2400::1; helo=sv.mirrors.kernel.org; envelope-from=sparclinux+bounces-2515-patchwork-incoming=ozlabs.org@vger.kernel.org; receiver=ozlabs.org) Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [IPv6:2604:1380:45e3:2400::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by gandalf.ozlabs.org (Postfix) with ESMTPS id 4XdCpc2C2Dz4x8g for ; Wed, 30 Oct 2024 01:50:00 +1100 (AEDT) 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id BB246281CF1 for ; Tue, 29 Oct 2024 14:50:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D42401917D9; Tue, 29 Oct 2024 14:49:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="UzaD8BdS" X-Original-To: sparclinux@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9DBE12AE7F; Tue, 29 Oct 2024 14:49:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730213395; cv=none; b=rqfdKU6nvZh34qI4hzUWa6zcQJDFIgNPPiwuJGL/ans2B8MWhgd4XA5jGvmFVH611lVnWCdkMKjRMao1tXjTIa6k/JzGRD/0CsMNk24ez97Xy8Pa7L4nv7rBbLkWJR/b08Y9E7HaHKJuUcGxqCLhQbhbkeITRwmL9UGfR9vsJ6I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730213395; c=relaxed/simple; bh=DNai7oJ0zOfmdmuloM/IxFLitC4QWuuzG9CMmFEr1rI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=V/+DUqoDpD9GpIqzaUz0Gn3G0DhFrjYNA2OT0XWtUMn22hPLATysN+CS3w/IUcceB4mTJeUQaB7vAQhs7twPF1fr5CT7sNH2lUJkn1Vp93nNUWzMhF3FYwCFdyDYQ+Y+0fTn2JVbF7RRzy5rhro51ufqPspcWiLuUS8u/880XXs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UzaD8BdS; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id 444C1C4CECD; Tue, 29 Oct 2024 14:49:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1730213395; bh=DNai7oJ0zOfmdmuloM/IxFLitC4QWuuzG9CMmFEr1rI=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=UzaD8BdSY2kirnhryrwYlV/+AIMOBQs5wzu7xVHb8n8ft/2jzbQ5g8w4h8jrXSSUD vVtZRwVpCD1xQ2t3dMtfKi2J5N0cPQtr8C14a5U7T3FiyIWXQTVQIY74yqH8KQb4LH UnH5MGmfJGWCwFYSebC+iAN5JPEJNgR1HEij+vNCaAxFol+PEd+/fKR6IRTXj/j8KN PGmQvDcS45J+zsEfZI2pVrMJdrXpTK7l4b9BBQ6wnSYfIvO8wNAQp2wuMKS5zuZVvX jTSHP//MLDxT90jHA2TfWCpeOHBM5q5KK7qrg3m+U0Bcn5GWQN71O/oXeVhGSDZIXo LNilrz8CBZJtw== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2DE22D3A662; Tue, 29 Oct 2024 14:49:55 +0000 (UTC) From: Koakuma via B4 Relay Date: Tue, 29 Oct 2024 21:49:07 +0700 Subject: [PATCH v3 1/2] sparc/build: Put usage of -fcall-used* flags behind cc-option Precedence: bulk X-Mailing-List: sparclinux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241029-sparc-cflags-v3-1-b28745a6bd71@protonmail.com> References: <20241029-sparc-cflags-v3-0-b28745a6bd71@protonmail.com> In-Reply-To: <20241029-sparc-cflags-v3-0-b28745a6bd71@protonmail.com> To: "David S. Miller" , Andreas Larsson , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , glaubitz@physik.fu-berlin.de, Masahiro Yamada , Nicolas Schier , Jonathan Corbet Cc: sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-kbuild@vger.kernel.org, linux-doc@vger.kernel.org, Koakuma X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1730213393; l=2721; i=koachan@protonmail.com; s=20240620; h=from:subject:message-id; bh=j/K37+Baat6IoHsWFp39+kRW4co5mJJ6tRxT2CAjvfU=; b=+hjWwxlr7VTHDpLFtlamCVvHi/a0OH/j3VFREyh7jZVAPzEJmwLiEHi3HSeUjllvhM20Uemvd cTmir13kw+QD1TCZxCUMeECwfkCF9MB/AMaGO9DaYbHRCEeue6Hqnjs X-Developer-Key: i=koachan@protonmail.com; a=ed25519; pk=UA59FS3yiAA1cnAAUZ1rehTmr6skh95PgkNRBLcoKCg= X-Endpoint-Received: by B4 Relay for koachan@protonmail.com/20240620 with auth_id=174 X-Original-From: Koakuma Reply-To: koachan@protonmail.com X-Spam-Status: No, score=-3.9 required=5.0 tests=ARC_SIGNED,ARC_VALID, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DMARC_PASS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on gandalf.ozlabs.org From: Koakuma Place -fcall-used* flags behind cc-option so that clang (which doesn't support them) can still compile the kernel. This is a safe change, the reasoning is as follows: In the (normal) 32-bit ABI, %g5 and %g7 is normally reserved, and in the 64-bit ABI, %g7 is the reserved one. Linux turns them into volatile registers by the way of -fcall-used-*, but on the other hand, omitting the flags shouldn't be harmful; compilers will now simply refuse to touch them, and any assembly code that happens to touch them would still work like usual (because Linux' conventions already treats them as volatile anyway). Signed-off-by: Koakuma Reviewed-by: Nathan Chancellor Tested-by: Nathan Chancellor --- arch/sparc/Makefile | 4 ++-- arch/sparc/vdso/Makefile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile index 757451c3ea1df63b948e68a45988c78f5974f9ea..0400078076e588be93a702d1c64eb9fd34466075 100644 --- a/arch/sparc/Makefile +++ b/arch/sparc/Makefile @@ -29,7 +29,7 @@ UTS_MACHINE := sparc # versions of gcc. Some gcc versions won't pass -Av8 to binutils when you # give -mcpu=v8. This silently worked with older bintutils versions but # does not any more. -KBUILD_CFLAGS += -m32 -mcpu=v8 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7 +KBUILD_CFLAGS += -m32 -mcpu=v8 -pipe -mno-fpu $(call cc-option,-fcall-used-g5) $(call cc-option,-fcall-used-g7) KBUILD_CFLAGS += -Wa,-Av8 KBUILD_AFLAGS += -m32 -Wa,-Av8 @@ -45,7 +45,7 @@ export BITS := 64 UTS_MACHINE := sparc64 KBUILD_CFLAGS += -m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow -KBUILD_CFLAGS += -ffixed-g4 -ffixed-g5 -fcall-used-g7 -Wno-sign-compare +KBUILD_CFLAGS += -ffixed-g4 -ffixed-g5 $(call cc-option,-fcall-used-g7) -Wno-sign-compare KBUILD_CFLAGS += -Wa,--undeclared-regs KBUILD_CFLAGS += $(call cc-option,-mtune=ultrasparc3) KBUILD_AFLAGS += -m64 -mcpu=ultrasparc -Wa,--undeclared-regs diff --git a/arch/sparc/vdso/Makefile b/arch/sparc/vdso/Makefile index 243dbfc4609d804fc221c3591eebe891107ffdab..50ec2978cda5397841daad6ffdc9682811b9b38e 100644 --- a/arch/sparc/vdso/Makefile +++ b/arch/sparc/vdso/Makefile @@ -46,7 +46,7 @@ CFL := $(PROFILING) -mcmodel=medlow -fPIC -O2 -fasynchronous-unwind-tables -m64 -fno-omit-frame-pointer -foptimize-sibling-calls \ -DDISABLE_BRANCH_PROFILING -DBUILD_VDSO -SPARC_REG_CFLAGS = -ffixed-g4 -ffixed-g5 -fcall-used-g5 -fcall-used-g7 +SPARC_REG_CFLAGS = -ffixed-g4 -ffixed-g5 $(call cc-option,-fcall-used-g5) $(call cc-option,-fcall-used-g7) $(vobjs): KBUILD_CFLAGS := $(filter-out $(RANDSTRUCT_CFLAGS) $(GCC_PLUGINS_CFLAGS) $(SPARC_REG_CFLAGS),$(KBUILD_CFLAGS)) $(CFL) From patchwork Tue Oct 29 14:49:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Koakuma via B4 Relay X-Patchwork-Id: 2003757 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=IKv+FT8H; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=ozlabs.org (client-ip=2404:9400:2221:ea00::3; helo=mail.ozlabs.org; envelope-from=srs0=is2w=rz=vger.kernel.org=sparclinux+bounces-2516-patchwork-incoming=ozlabs.org@ozlabs.org; receiver=patchwork.ozlabs.org) Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XdCpl1R30z1xxC for ; Wed, 30 Oct 2024 01:50:07 +1100 (AEDT) Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by gandalf.ozlabs.org (Postfix) with ESMTP id 4XdCpj2T1Fz4x8w for ; Wed, 30 Oct 2024 01:50:05 +1100 (AEDT) Received: by gandalf.ozlabs.org (Postfix) id 4XdCpj2QQbz4x8g; Wed, 30 Oct 2024 01:50:05 +1100 (AEDT) Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: gandalf.ozlabs.org; arc=pass smtp.remote-ip=139.178.88.99 arc.chain=subspace.kernel.org ARC-Seal: i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1730213401; cv=pass; b=X4LoOFhkVTauF5Rq4cuj7LNlBLxseeFqOOVhTgAa6jjAGqGBN8b9myloavmVIKIr23FYUbU2Q/Wjdf7avBJ04nXJllnIPBU9QjKTwM/b26fmm0GsgA92ndVemaEusfbqUonLLry9ctXeg+yQiH0/VmzblJqP1bho36tau5yLeEUK0vidnZ+8KvLzuqSUT3VlraRX2tAwjFUTV3ZfMKVFhJZnI5DGJsJIUaZLkvETXkU9jpARNUke9yhCE91Aw5GvN5u0BxJYN7/DWbVPaKiSYr9NgF8PtDrBLebysnje6z3k2FU2p26glBEhsPCluogPzcaLCdFQFryB6iCl70USxA== ARC-Message-Signature: i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1730213401; c=relaxed/relaxed; bh=+NYKQsmmmop+74/24EHTS8f1nM/NZBISlwn4kw9l0BU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=JWFIT2H/39ToG/vZTXiIG2tG6HiZPDiFYzAeMAUwrmuLdt+Gz5qAvGlW9JV4q5UsK2RsPaxDLQ8pvyu4Bs0Ur6MsxbI56VJJBRLlE+Ys/US0P08YCYzUFNuW0HZE8xXP1T8d2cIzTFnp2GM2o/31MhONaI7sOq/dUe3dWlWAmFRb+9xI1yur62J/HJ34NWxxKNqBYelxmisRe2gtlb29ufe6BKZnN391b3tPfknMP4LaYMrjyCyQs0xiPYz0RdyOpKbNAFY6F8wiLK6+fx9FgM6RJbKGTz5LL4bffBJHUiG+OKDjTElkwcZ+rUCpMa3yxXYPlkgtt9DJk0SO2pQMOg== ARC-Authentication-Results: i=2; gandalf.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=IKv+FT8H; dkim-atps=neutral; spf=pass (client-ip=139.178.88.99; helo=sv.mirrors.kernel.org; envelope-from=sparclinux+bounces-2516-patchwork-incoming=ozlabs.org@vger.kernel.org; receiver=ozlabs.org) smtp.mailfrom=vger.kernel.org Authentication-Results: gandalf.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: gandalf.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=IKv+FT8H; dkim-atps=neutral Authentication-Results: gandalf.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=139.178.88.99; helo=sv.mirrors.kernel.org; envelope-from=sparclinux+bounces-2516-patchwork-incoming=ozlabs.org@vger.kernel.org; receiver=ozlabs.org) Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by gandalf.ozlabs.org (Postfix) with ESMTPS id 4XdCpd3wH0z4x8w for ; Wed, 30 Oct 2024 01:50:01 +1100 (AEDT) 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 29AE92823A5 for ; Tue, 29 Oct 2024 14:50:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DC0C8191F66; Tue, 29 Oct 2024 14:49:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="IKv+FT8H" X-Original-To: sparclinux@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9DC2A13AA3F; Tue, 29 Oct 2024 14:49:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730213395; cv=none; b=G4WelEg2+5dk4/vNPyCA5MA4/KtfDeenNcqwSPVC5bnUipD6XxIMga51F99lTeg9xNRgxyyoMiZmBivnXjvEf065tXe80x3oA52MFUxsSs9kKE/SHw4YnA6bsIsxAez9xhGaUy2O9ualqlOZ87PtrVkSowXrOe5UjqsHtsRXsu0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730213395; c=relaxed/simple; bh=BlzYljgtvc2MTIkLFj7ZU1rt1YFd3eqaeSD+vg+1nfw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=TDTxJl749S2PtdtODM662t4C7qw5FvZmd1fXMerTi53qURl3G9eXEe+YiGEN+VMq+Q3CECcu4rnFdF2gGG+4JmAwrgJuvlk4sfa0DT4BZWG0p/CBLgxVlYVks3JecEBJV3zKhiWJ/KUyaswy0uLOx8d+Mt72LUCIW3dODnR9eSs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=IKv+FT8H; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id 530DCC4CEE7; Tue, 29 Oct 2024 14:49:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1730213395; bh=BlzYljgtvc2MTIkLFj7ZU1rt1YFd3eqaeSD+vg+1nfw=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=IKv+FT8Hd5+iBUKXN49pcWen80JNLhSG1r69vthGvit7CTWE8PJ2gu/StNc4ViVnJ zBmFkKiE9k7HlUD2nn8acuqYVBXKqg/SXDt6ASR6ehDi6kuQFIpEjmJwpYCJDR5sVy SmGmHNXLT8bSTVuTq9Q4SInncT2pOiYDf5qfuy0B8FliWln26csgXPigh/s1v5WRbv wJz8IzHPLsRILvfMA61V6gMezbC+Jb+qEV1Lonx8adE88Ysl/xF4RcEYqGjfO1P03o iOB6DClvRQxJRUudeIyk11ho0l2Llp1wuzYITTbzqlv9eWivvQEd36iWg2wOf5wYBb Rb6KAZyKYkbJw== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40E83D3A661; Tue, 29 Oct 2024 14:49:55 +0000 (UTC) From: Koakuma via B4 Relay Date: Tue, 29 Oct 2024 21:49:08 +0700 Subject: [PATCH v3 2/2] sparc/build: Add SPARC target flags for compiling with clang Precedence: bulk X-Mailing-List: sparclinux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241029-sparc-cflags-v3-2-b28745a6bd71@protonmail.com> References: <20241029-sparc-cflags-v3-0-b28745a6bd71@protonmail.com> In-Reply-To: <20241029-sparc-cflags-v3-0-b28745a6bd71@protonmail.com> To: "David S. Miller" , Andreas Larsson , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , glaubitz@physik.fu-berlin.de, Masahiro Yamada , Nicolas Schier , Jonathan Corbet Cc: sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-kbuild@vger.kernel.org, linux-doc@vger.kernel.org, Koakuma X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1730213393; l=1720; i=koachan@protonmail.com; s=20240620; h=from:subject:message-id; bh=qC+xpLMUpGByab1qovPWQQ3aHiMZ1dz7yem8GqVZgaw=; b=j3CG9BnJ7FWIRbyhXXEAVLB8dkBqluDHfp9prkX2enPrqN3tWd26RoXX/dgFs1O0iNkgciARn sw7SoBukKcCDoNEFREPzB0cpBbb11mSllQ7KnMz+fTX23bhUK2DgdHV X-Developer-Key: i=koachan@protonmail.com; a=ed25519; pk=UA59FS3yiAA1cnAAUZ1rehTmr6skh95PgkNRBLcoKCg= X-Endpoint-Received: by B4 Relay for koachan@protonmail.com/20240620 with auth_id=174 X-Original-From: Koakuma Reply-To: koachan@protonmail.com X-Spam-Status: No, score=-3.9 required=5.0 tests=ARC_SIGNED,ARC_VALID, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DMARC_PASS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on gandalf.ozlabs.org From: Koakuma clang only supports building 64-bit kernel, so we use the sparc64-linux-gnu target. See also: https://lore.kernel.org/lkml/e26PTXUXEz8OYXmaeKn4Mpuejr4IOlFfFwdB5vpsluXlYiqDdlyQTYcDtdAny_o4gO4SfPeQCCN2qpyT6e0nog5EaP3xk2SeUPTrF54p1gM=@protonmail.com/T/#m068e010dcf8b99d3510a90d7532bcdb70e2e2c6b Signed-off-by: Koakuma Acked-by: Nathan Chancellor --- Documentation/kbuild/llvm.rst | 3 +++ scripts/Makefile.clang | 1 + 2 files changed, 4 insertions(+) diff --git a/Documentation/kbuild/llvm.rst b/Documentation/kbuild/llvm.rst index 6dc66b4f31a7bb62ba5bb6174730dc0a69ee0bba..bc8a283bc44bbfa9948ad3c9fe8031269ce10be4 100644 --- a/Documentation/kbuild/llvm.rst +++ b/Documentation/kbuild/llvm.rst @@ -179,6 +179,9 @@ yet. Bug reports are always welcome at the issue tracker below! * - s390 - Maintained - ``LLVM=1`` (LLVM >= 18.1.0), ``CC=clang`` (LLVM < 18.1.0) + * - sparc (sparc64 only) + - Maintained + - ``CC=clang LLVM_IAS=0`` (LLVM >= 20) * - um (User Mode) - Maintained - ``LLVM=1`` diff --git a/scripts/Makefile.clang b/scripts/Makefile.clang index 6c23c6af797fb016232914589c948208345417ad..2435efae67f53a26d55a1c0f1bf254a49d9fc731 100644 --- a/scripts/Makefile.clang +++ b/scripts/Makefile.clang @@ -10,6 +10,7 @@ CLANG_TARGET_FLAGS_mips := mipsel-linux-gnu CLANG_TARGET_FLAGS_powerpc := powerpc64le-linux-gnu CLANG_TARGET_FLAGS_riscv := riscv64-linux-gnu CLANG_TARGET_FLAGS_s390 := s390x-linux-gnu +CLANG_TARGET_FLAGS_sparc := sparc64-linux-gnu CLANG_TARGET_FLAGS_x86 := x86_64-linux-gnu CLANG_TARGET_FLAGS_um := $(CLANG_TARGET_FLAGS_$(SUBARCH)) CLANG_TARGET_FLAGS := $(CLANG_TARGET_FLAGS_$(SRCARCH))