Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp14633528rwd; Sun, 25 Jun 2023 01:10:07 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ60/xVsxrcfZ9QMfDwar7OKTCUHT8vMfwgilDS+z7kD380s3GxaKomj5hYdqCRY1L5qAAwR X-Received: by 2002:a92:ab0d:0:b0:345:1704:a621 with SMTP id v13-20020a92ab0d000000b003451704a621mr6514365ilh.0.1687680606923; Sun, 25 Jun 2023 01:10:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687680606; cv=none; d=google.com; s=arc-20160816; b=wh/Bp08cI1mqtXWuOFtctgBd8L7uYWxd3pjeG8+QuYkciYkV4pgF8VE8ix2WSeRLAK GwK3LgCYIBsiTGHzzKlEFdKK4Tpq5J/ZxRhYBhv99vx4wWjZjkuJToZzsWyAhuHHUM7A u4i6ECULBq8u1Jpbon6f7mJIJ4wXwzBm1Jz2N/57ourWqFy7hn6zLI947eZaK7e5HRUH 8yF8c83xnrKRddgOS8yXzFXW7ZFARmaSY36/jxFwBpF0p4hNsjaXra0BU83UaKNzvbwr iY4nlRWWvYQSbwdeG90oDtLw1OnynHOO+QQwQYWuFWrnAcmQyOQwkD88dmXqqARHDNaq ylpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=TypPZiK69jZ4kEaUiiYr1PUba8jZI3TftGPjRaySQYw=; fh=nbju2snVxiSGiPpnIVcSbJO49o06rTNGTzNrXmY7nT0=; b=edX5R0lfr7GCzvAvahW4xzO+G80vctxRJ/ofxC39RdDEylpbGSjSCLynyEu/yGNOtU 3tjvhohO9oi21QAo9NrRqq4Bo78VutSl9jUOXFpWWJGnmkbDnEj6Mj5qtslc+Y7MWqkM tLrYy0hyEwft25IKNezAlOc27TAGWtdSbCYfe1IsEJCCKc7yKTkjne5MlfYCSe+4y9R8 oCKbf3wyorhiZalIwwQk/ZXBB6+ntTk60NkNwsUdZSIEwIQRFQDtZA8aMmLixkgQ2I06 XZ9QzFMbBozYL9gRvotgqoUtfSlgjgWvZonhCgh1xAKjKBXHHQRZAx6bev4UnDnXIBZc d2yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VITkWm9+; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z27-20020a056a001d9b00b00666c9148d03si429105pfw.6.2023.06.25.01.09.54; Sun, 25 Jun 2023 01:10:06 -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=@kernel.org header.s=k20201202 header.b=VITkWm9+; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231389AbjFYIC7 (ORCPT + 99 others); Sun, 25 Jun 2023 04:02:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229901AbjFYIC6 (ORCPT ); Sun, 25 Jun 2023 04:02:58 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91174E52; Sun, 25 Jun 2023 01:02:51 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 10A7F60B62; Sun, 25 Jun 2023 08:02:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5EB7EC433C8; Sun, 25 Jun 2023 08:02:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687680170; bh=Yn7ur0hSLgRRcuejzwOvXvGPThkAsc4tD6ZTogw5Dbk=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=VITkWm9+HFxZZGaLbiI0TbgwUuWrOm7vVonDHwKcmhh0Ez/L05hHn3Ei32oV0/Ipz A4lxW7STEyOgjMah1JrloMlux884tQaXIQePy0eBaTZ7Rp0iwnlikQOuy42B2YtPDS oeVh4DN/bldtBPjD1RCW6qRbt4IMQx882cizX5lghRJJ+z4DhP/CF7PO/FEip3a2gq 3m6b6FUc4A6u8X5ystwZXJw+M5p2p9SRH/IH2tIwhMkfI5xd7Ml9bwursZnUt2Gh3P q8E3DG2lnOax4AUY+fQro5eUGWrxD6fL8gktT/OB0s5p11lD1RzUp2xH6Cxj8iRnb4 fW8L6r6CJJ7fA== Received: by mail-oo1-f50.google.com with SMTP id 006d021491bc7-55e04a83465so1655056eaf.3; Sun, 25 Jun 2023 01:02:50 -0700 (PDT) X-Gm-Message-State: AC+VfDzUtIILXlSK+XG8A3q2V29KDcFXUOH0O1LeHBe5pxDnfURm+/OW a2d95LyQxbafifo+AD74nz1PTY2el7h1OzFqHkc= X-Received: by 2002:a4a:dc19:0:b0:560:c7dd:e19e with SMTP id p25-20020a4adc19000000b00560c7dde19emr9398546oov.3.1687680169577; Sun, 25 Jun 2023 01:02:49 -0700 (PDT) MIME-Version: 1.0 References: <20230119082250.151485-1-masahiroy@kernel.org> In-Reply-To: From: Masahiro Yamada Date: Sun, 25 Jun 2023 17:02:13 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] powerpc: remove checks for binutils older than 2.25 To: Joel Stanley , Michael Ellerman , linuxppc-dev@lists.ozlabs.org Cc: linux-kbuild@vger.kernel.org, Nicholas Piggin , Christophe Leroy , Nathan Chancellor , Nick Desaulniers , linux-kernel@vger.kernel.org, Nicolas Schier Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 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 wr= ote: > > > > > > Commit e4412739472b ("Documentation: raise minimum supported version = 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. > > > 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), 15= 0000) > > > > > > > > > > > > > > > > > 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/generated= /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/as= m-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" ; the= n \ > > > - echo -n '*** binutils 2.24 miscompiles weak symbols '= ; \ > > > - echo 'in some circumstances.' ; \ > > > - echo '*** binutils 2.23 do not define the TOC symb= ol ' ; \ > > > - echo -n '*** Please use a different binutils version.= ' ; \ > > > - 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 which > > > # 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 > > > > > > diff --git a/scripts/Makefile.compiler b/scripts/Makefile.compiler > > > index 3d8adfd34af1..ad07a4efc253 100644 > > > --- a/scripts/Makefile.compiler > > > +++ b/scripts/Makefile.compiler > > > @@ -72,7 +72,3 @@ clang-min-version =3D $(call test-ge, $(CONFIG_CLAN= G_VERSION), $1) > > > # ld-option > > > # Usage: KBUILD_LDFLAGS +=3D $(call ld-option, -X, -Y) > > > ld-option =3D $(call try-run, $(LD) $(KBUILD_LDFLAGS) $(1) -v,$(1),$= (2),$(3)) > > > - > > > -# ld-ifversion > > > -# Usage: $(call ld-ifversion, -ge, 22252, y) > > > -ld-ifversion =3D $(shell [ $(CONFIG_LD_VERSION)0 $(1) $(2)0 ] && ech= o $(3) || echo $(4)) > > > -- > > > 2.34.1 > > > > > > > -- > Best Regards > Masahiro Yamada --=20 Best Regards Masahiro Yamada