From patchwork Thu Dec 15 16:26:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13074334 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 10158C4332F for ; Thu, 15 Dec 2022 16:27:45 +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:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=QOsPVsOEEkdX7CPN9IthQ2NykMNC9rONOd12MfPCtXI=; b=GOB75p2wO3iQP5 mO2QAdtsi2NT2jXL0ljK4zfitq3ULwY97pVXzWP1e3su8bi7S2bzvF2aDPOvSEpmm3xL1KKpGoTQm pC5429Rcp1ikm16ylX48rtKF3SvPhGMiMd3p02Uc3jz+kiwYQQlMbVIa7he7P3sgo8U+UqgPuKrVw XwiNvszi4DAQ5HMoinSDe80FBfDx6b5Z220C5qWhp7ofiQKL9bosfnaTawJ0RqucGH5FZFoLCY0/7 zexd0kJIPK4DW63x1kpLcN/HcnNgp8dIxnEip0SulfaOnoHTAPWttBYy6RKyIJDm8NPh7QDMW80qw MpiyLGg8Rrd/P04SDE3w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p5r4K-00AIuO-MD; Thu, 15 Dec 2022 16:26:48 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p5r4H-00AIsH-0Q for linux-arm-kernel@lists.infradead.org; Thu, 15 Dec 2022 16:26:46 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 57328B81C0F; Thu, 15 Dec 2022 16:26:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 304D0C433EF; Thu, 15 Dec 2022 16:26:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1671121601; bh=NQhOvRDb47qHa+Q6SeiWEqOiMrLXdQJpkU+Bg3f6MZU=; h=From:To:List-Id:Cc:Subject:Date:From; b=RC7RD4kKa4Ojq7CyadAqJYUontCem9zIv7i+DnS4OwIrFPNBr0YoYMVDMXvAkWbu5 yQx5ST5lwGpGblAH9Iy6Sev1pjJbtmjIy5+vhhb9Qt5KiLvt81/Z+k0CxeXehWPZUS LmJW1Z6ENc7QW2Du2bQnIPIAG3mR0fRJwBauStVF4t0xobw92GIjOUOY/zGEnc7F47 z3rbk5a/s6I8nYEFQ/0cfUFdHgSkzj8WRnpFNx3U5kBm5OvwZr5X+oqsEHIDVaZB3n pvtMXsSgosE3mbTXTOWBIImS8tqHo3kxL4KGpJFUQNPZrSVpEqDNtbA0XHrfqFm4Bu fFpVaRJ/8Scpw== From: Arnd Bergmann To: Russell King , Nathan Chancellor , Nick Desaulniers Cc: soc@kernel.org, Arnd Bergmann , Tom Rix , Linus Walleij , "Russell King (Oracle)" , Ard Biesheuvel , Geert Uytterhoeven , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: [PATCH] ARM: disallow pre-ARMv5 builds with ld.lld Date: Thu, 15 Dec 2022 17:26:20 +0100 Message-Id: <20221215162635.3750763-1-arnd@kernel.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221215_082645_216765_1033BD7B X-CRM114-Status: GOOD ( 11.19 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Arnd Bergmann lld cannot build for ARMv4/v4T targets because it inserts 'blx' instructions that are unsupported there: ld.lld: warning: lld uses blx instruction, no object with architecture supporting feature detected Add a Kconfig time dependency to prevent those targets from being selected in randconfig builds. Link: https://github.com/llvm/llvm-project/issues/50764 Link: https://github.com/ClangBuiltLinux/linux/issues/964 Signed-off-by: Arnd Bergmann Reviewed-by: Nathan Chancellor --- arch/arm/Kconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 4a8fff7f9be0..d995054ab602 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -344,12 +344,14 @@ comment "CPU Core family selection" config ARCH_MULTI_V4 bool "ARMv4 based platforms (FA526, StrongARM)" depends on !ARCH_MULTI_V6_V7 + depends on !LD_IS_LLD select ARCH_MULTI_V4_V5 select CPU_FA526 if !(CPU_SA110 || CPU_SA1100) config ARCH_MULTI_V4T bool "ARMv4T based platforms (ARM720T, ARM920T, ...)" depends on !ARCH_MULTI_V6_V7 + depends on !LD_IS_LLD select ARCH_MULTI_V4_V5 select CPU_ARM920T if !(CPU_ARM7TDMI || CPU_ARM720T || \ CPU_ARM740T || CPU_ARM9TDMI || CPU_ARM922T || \