Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp15542735rwd; Sun, 25 Jun 2023 20:08:33 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4LrraqbD04ful3eUY07sgo7xNvv8lUTsUrsdf2QmT4rNE8J3I6GS43gtkpR+u16u0Eq+MQ X-Received: by 2002:a17:906:8a4a:b0:991:c842:2ca2 with SMTP id gx10-20020a1709068a4a00b00991c8422ca2mr547431ejc.15.1687748913103; Sun, 25 Jun 2023 20:08:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687748913; cv=none; d=google.com; s=arc-20160816; b=iTMI4tS5srNy/GH/Bakj12U6Slganz+Zin8LHjLlmvfIv47UuDfrMMliiKi4vv8NMN 5m7dmnNM6bCiVM14aVfrvzh6YuLJKqI+zMV02KzuyKNPu3zRt0fsH5K6bdg6dNAh3G/Q hG9ByoBWTQFbwk2xDX90V0+56woIjP+qe6XCjjP8frwesD5avO7+X90Lf04pCoJM69Op TnBAdoaGtRkIfaI1uv0OH5PJ7hZbbbo34lyewOIISqjKyYS5PsseUqeDfkd6itsc7ax0 0wElxxBlxLLa9til6wbCVb1pRTNn6VVAXGk5hWIqgmko5nU8AzU1u7LgXOcTO0E5qXEh r2LA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:references:from:subject:cc:to :message-id:date:content-transfer-encoding:mime-version :dkim-signature; bh=sIi3FkwCk5HG64ANT+PN0JameuFfw1WbglMg15jyrTQ=; fh=fM70jaot1mM3HkLhzDPJxRPH0GgWVKGV5i5nKntBLn8=; b=je3LEeQ5OxmbgPdzghS9SpCdlNSJX2U0FrzZUOGy6j/fH71QkjeYCaN5MTXZEItdX/ HSHszy1KJE4wvI7zo3+E2DSiF7VrcB27uhaSQY30YY2XV3W6sX1jObODp3+oWndrgHv2 W36R4PWyHAyFV/ePqAoedcj3H2uyQBqiCfnPHblh8rETGoDs4AUNerYTKzsy/E6/O4b5 SY4qnyrK10An/XurGQcQx3W67KWnB7rOdQ2Ce04H2qzVkdf26X9aIMCsbewhkB8pbslQ PbW4SM3WiO+FpIVfUZoLUWoKZzZf/xL77xJqiqgIecSVg8DcU+j+HB7VGLVqqzmKqhx+ XsQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="DGmwX3l/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bx14-20020a170906a1ce00b0098770b8882dsi2121537ejb.1030.2023.06.25.20.08.08; Sun, 25 Jun 2023 20:08:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="DGmwX3l/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229724AbjFZB6R (ORCPT + 99 others); Sun, 25 Jun 2023 21:58:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229454AbjFZB6Q (ORCPT ); Sun, 25 Jun 2023 21:58:16 -0400 Received: from mail-oi1-x236.google.com (mail-oi1-x236.google.com [IPv6:2607:f8b0:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3327F135; Sun, 25 Jun 2023 18:58:15 -0700 (PDT) Received: by mail-oi1-x236.google.com with SMTP id 5614622812f47-38e04d1b2b4so2099186b6e.3; Sun, 25 Jun 2023 18:58:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687744694; x=1690336694; h=in-reply-to:references:from:subject:cc:to:message-id:date :content-transfer-encoding:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=sIi3FkwCk5HG64ANT+PN0JameuFfw1WbglMg15jyrTQ=; b=DGmwX3l/5bkd6oo8XKGuxduVBE1isYcG0BSNBXdo60CHGPwIdJI0SK1bob1tVFBi4Q WkkwPiTAUIVN2HKL8p/l5mNkEylwL49oZY0MApytICxYKc33dZzEI3lK7E1zP7Wjg/68 Bu73LM/XkHzSN8PuNYh3o1p9HCzCVYUbho1gqSyDBsjKnI8gm0vGx/Gx8H2cw1EVBcmP Ng3S9CqDov70r4jNpfME0G0BzxPJuwat9i2USToRbYjdMn7T0f3KZ/FYq8A/FB7nCJw2 loAt4Az2UHBl0E97jwJIsoCGnRLkJoYFDjj8IRVrgKZzDGvGsK/F3kB8XakoW1Hhi99q X60Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687744694; x=1690336694; h=in-reply-to:references:from:subject:cc:to:message-id:date :content-transfer-encoding:mime-version:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=sIi3FkwCk5HG64ANT+PN0JameuFfw1WbglMg15jyrTQ=; b=kHJxitwii+cE94QdoiIRVMSy+Ar/LxG0CH/kqZ7B54TeXxT8jtlvcUuWi1lndbkk7s Bvmv2ylyII1LxVha42UYceN52EXz78qU+2MPgCmZoU3T2oWG3MLLD+Ws0PmjBm+3nZHV Ow9ZJ72LvG40ATh/8Cnbc6LIMYTLomO3Zmi6Cs3WVbnRHK9+bLxxH+m0BIw0dqxJ1BFN BEwZjq7WenCPXvHeFSUbNeWrOGihFP+vtf3V3OxD7Rr8zcIP5uhtkE9TzH9SH2l8PNp8 S8sWURW0TVE5wnQtpS6WGibJe7+lrSZv21sehjb6/iTTy2kQE7UHVROh70/+u6+eYPDd NjdA== X-Gm-Message-State: AC+VfDxHbKcj/ai6IR0efTJMAcCEJ2QqAaEO1X72gqWlJoqMzaw7D9Lm Wk25WRNCSBcDB/h9P8afPIk= X-Received: by 2002:a05:6808:1981:b0:3a1:cdba:e4e0 with SMTP id bj1-20020a056808198100b003a1cdbae4e0mr3634854oib.50.1687744694384; Sun, 25 Jun 2023 18:58:14 -0700 (PDT) Received: from localhost (193-116-198-102.tpgi.com.au. [193.116.198.102]) by smtp.gmail.com with ESMTPSA id az12-20020a170902a58c00b001b0034557afsm2992916plb.15.2023.06.25.18.58.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 25 Jun 2023 18:58:13 -0700 (PDT) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Mon, 26 Jun 2023 11:58:06 +1000 Message-Id: To: "Masahiro Yamada" , "Joel Stanley" , "Michael Ellerman" , Cc: , "Christophe Leroy" , "Nathan Chancellor" , "Nick Desaulniers" , , "Nicolas Schier" Subject: Re: [PATCH] powerpc: remove checks for binutils older than 2.25 From: "Nicholas Piggin" X-Mailer: aerc 0.15.2 References: <20230119082250.151485-1-masahiroy@kernel.org> In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun Jun 25, 2023 at 6:02 PM AEST, Masahiro Yamada wrote: > On Thu, Jan 19, 2023 at 9:37=E2=80=AFPM Masahiro Yamada wrote: > > > > On Thu, Jan 19, 2023 at 9:12 PM Joel Stanley wrote: > > > > > > On Thu, 19 Jan 2023 at 08:24, Masahiro Yamada = wrote: > > > > > > > > Commit e4412739472b ("Documentation: raise minimum supported versio= n of > > > > binutils to 2.25") allows us to remove the checks for old binutils. > > > > > > > > There is no more user for ld-ifversion. Remove it as well. > > > > > > ppc kernels fail to link with 2.27 under some configurations: > > > > > > https://github.com/linuxppc/issues/issues/388 > > > > > > We may want to use ld-ifversion to exclude that version. > > > > > > > Ping? > > > > > > > > For LLD, CONFIG option is directly checked. Yeah, doesn't seem too difficult to add new linker version tests if needed. > > > > > > masahiro@zoe:~/ref/linux(master)$ git grep CONFIG_LLD_VERSION > > Makefile:ifeq ($(call test-lt, $(CONFIG_LLD_VERSION), 130000),y) > > arch/riscv/Makefile:ifeq ($(call test-lt, $(CONFIG_LLD_VERSION), 150000= ),y) > > arch/x86/Makefile:ifeq ($(call test-lt, $(CONFIG_LLD_VERSION), 130000),= y) > > scripts/Kbuild.include:# Usage: $(call test-lt, $(CONFIG_LLD_VERSION), = 150000) > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Signed-off-by: Masahiro Yamada > > > > --- > > > > > > > > arch/powerpc/Makefile | 22 +--------------------- > > > > arch/powerpc/lib/Makefile | 2 +- > > > > scripts/Makefile.compiler | 4 ---- > > > > 3 files changed, 2 insertions(+), 26 deletions(-) > > > > > > > > diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile > > > > index dc4cbf0a5ca9..3d265b16c0ae 100644 > > > > --- a/arch/powerpc/Makefile > > > > +++ b/arch/powerpc/Makefile > > > > @@ -42,18 +42,13 @@ machine-$(CONFIG_PPC64) +=3D 64 > > > > machine-$(CONFIG_CPU_LITTLE_ENDIAN) +=3D le > > > > UTS_MACHINE :=3D $(subst $(space),,$(machine-y)) > > > > > > > > -# XXX This needs to be before we override LD below > > > > -ifdef CONFIG_PPC32 > > > > -KBUILD_LDFLAGS_MODULE +=3D arch/powerpc/lib/crtsavres.o > > > > -else > > > > -ifeq ($(call ld-ifversion, -ge, 22500, y),y) > > > > +ifeq ($(CONFIG_PPC64)$(CONFIG_LD_IS_BFD),yy) > > > > # Have the linker provide sfpr if possible. > > > > # There is a corresponding test in arch/powerpc/lib/Makefile > > > > KBUILD_LDFLAGS_MODULE +=3D --save-restore-funcs > > > > else > > > > KBUILD_LDFLAGS_MODULE +=3D arch/powerpc/lib/crtsavres.o > > > > endif > > > > -endif > > > > > > > > ifdef CONFIG_CPU_LITTLE_ENDIAN > > > > KBUILD_CFLAGS +=3D -mlittle-endian > > > > @@ -389,8 +384,6 @@ vdso_prepare: prepare0 > > > > $(build)=3Darch/powerpc/kernel/vdso include/generat= ed/vdso64-offsets.h) > > > > endif > > > > > > > > -archprepare: checkbin > > > > - > > > > archheaders: > > > > $(Q)$(MAKE) $(build)=3Darch/powerpc/kernel/syscalls all > > > > > > > > @@ -405,16 +398,3 @@ else > > > > $(eval KBUILD_CFLAGS +=3D -mstack-protector-guard-offset=3D= $(shell awk '{if ($$2 =3D=3D "TASK_CANARY") print $$3;}' include/generated/= asm-offsets.h)) > > > > endif > > > > endif > > > > - > > > > -PHONY +=3D checkbin > > > > -# Check toolchain versions: > > > > -# - gcc-4.6 is the minimum kernel-wide version so nothing required= . > > > > -checkbin: > > > > - @if test "x${CONFIG_LD_IS_LLD}" !=3D "xy" -a \ > > > > - "x$(call ld-ifversion, -le, 22400, y)" =3D "xy" ; t= hen \ > > > > - echo -n '*** binutils 2.24 miscompiles weak symbols= ' ; \ > > > > - echo 'in some circumstances.' ; \ > > > > - echo '*** binutils 2.23 do not define the TOC sy= mbol ' ; \ > > > > - echo -n '*** Please use a different binutils versio= n.' ; \ > > > > - false ; \ > > > > - fi > > > > diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile > > > > index 4de71cbf6e8e..c53618c34b70 100644 > > > > --- a/arch/powerpc/lib/Makefile > > > > +++ b/arch/powerpc/lib/Makefile > > > > @@ -42,7 +42,7 @@ obj-$(CONFIG_FUNCTION_ERROR_INJECTION) += =3D error-inject.o > > > > # 64-bit linker creates .sfpr on demand for final link (vmlinux), > > > > # so it is only needed for modules, and only for older linkers whi= ch > > > > # do not support --save-restore-funcs > > > > -ifeq ($(call ld-ifversion, -lt, 22500, y),y) > > > > +ifndef CONFIG_LD_IS_BFD > > > > extra-$(CONFIG_PPC64) +=3D crtsavres.o > > > > endif This test got inverted for LLD now AFAIKS? Does LLVM support --save-restore-funcs and supply .sfpr already I wonder? We could remove this stuff entirely. Thanks, Nick