Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp72958rdf; Mon, 20 Nov 2023 16:52:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IEdAXGx2VNmGa3666KW3qBBExPqbSUgHmGsMaHogdL6xJimziSOXxj0IpHQFffEZ87yF+L1 X-Received: by 2002:a05:6808:1704:b0:3b2:dd7d:fc5e with SMTP id bc4-20020a056808170400b003b2dd7dfc5emr4194737oib.10.1700527927676; Mon, 20 Nov 2023 16:52:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700527927; cv=none; d=google.com; s=arc-20160816; b=a8w5vg5t6yeUk0Zk4o7JBv2H1m0rD69chzonrrsO4JI5Da7HBQIo0JdAs0lmd0RuUC 31zJvt+FoXrsJxsOriAPbgHFXhv9fSZQLJ5sjbBLN6xlJQQJmcTxXI9XItXLaO0FERyf Ykp3oGw2mbQEdFZyVtUh/NqtfgzRtSpPM/6sV0BiH0h9J7QEVgrgFL0uHjvd1jU5gDO4 ruP/RfkKny7pCcy6zXd1jdgbb70feOX+NYNY8DBvnm7lXuhRMxPT9I7xbx4yfCIFEoN2 FZSdjS4ttL8Kx5AWZ28QjAvfA93KWBo7xpqzfyxJOqZ5nkACB2O5WdPQNmVdOvRvz42S AHyA== 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:cc:to:from:subject :message-id:date:content-transfer-encoding:mime-version :dkim-signature; bh=Pn9aLSeosG7l0BmT5llM/BGYPNtLICtF9m0AjdHG0XM=; fh=KMo8MAw4bQLWF/OujuZ8B4LoEXf5o7mhgjhSSwomVdQ=; b=wiiU06dk9SxW93tDH9Yihqm4XNNs8Uc/9tchNGzO1mFFNIfp2UV0NgxZuWECvsnDdS Win35GBIQl60EEmtwJikkl+l/v28SpG/xhyhrFrbXf70MoqzoevTxEC0bb0clIfVj2eK 8A1GT5bxskloGMF/B82K8yRXPdr/qNb/t9B/AUkNuSZVbUzaEdlBFcicgQ4LAnIce4JG MbvVFCZYGhwSdJbQWMDUrS780k9mzDiRTGWCbmdX8s06PWy3pLPaUZ42bwm8gFOkamN/ yX7CmX0ucrVV+ILtS8g8XjAfK/l4ViyuAn+Tf22SU4iZPGii3RYss+6+1WORTWfA4RIk rKzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ljYUw9po; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id j11-20020a63550b000000b005be3c62f45fsi9018033pgb.638.2023.11.20.16.52.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 16:52:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ljYUw9po; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 9A27E805C15A; Mon, 20 Nov 2023 16:52:04 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232896AbjKUAvu (ORCPT + 99 others); Mon, 20 Nov 2023 19:51:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229757AbjKUAvq (ORCPT ); Mon, 20 Nov 2023 19:51:46 -0500 Received: from mail-oi1-x22e.google.com (mail-oi1-x22e.google.com [IPv6:2607:f8b0:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1BB9D2 for ; Mon, 20 Nov 2023 16:51:41 -0800 (PST) Received: by mail-oi1-x22e.google.com with SMTP id 5614622812f47-3b2ea7cc821so3225801b6e.1 for ; Mon, 20 Nov 2023 16:51:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700527901; x=1701132701; darn=vger.kernel.org; h=in-reply-to:references:cc:to:from:subject:message-id:date :content-transfer-encoding:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Pn9aLSeosG7l0BmT5llM/BGYPNtLICtF9m0AjdHG0XM=; b=ljYUw9pomTOCuHuLfwq5xwrekbGMMY1fJg0l9NVnaO8ZAdfPg/6la38Q8g5FXbuI+J g6qXXhzv4TiyfGT54ZxjVmnc51vOUTTN4YZO7dXphU/tLSWmmAgiRAJdZ4Y0cn9RDDjW 9ZIytbVzVK7PbZsiqw3o+WxR0+LkJwoezcw5lFrNp9eDBAd1F0X9hgQfv2lvpV3eTN88 mHM3/wiez566LYEski/4SgFjNCrLqlx9w11i2K9wMQQq3Zbk3Y7DDKD9JOPwf2fcJuaw PrOkb66w7PzcfRubpUx7u557fSnzh9/tmyjsYUD1v5iyMPHURGrir4bvys93elhIXfaw ZeTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700527901; x=1701132701; h=in-reply-to:references:cc:to:from:subject:message-id:date :content-transfer-encoding:mime-version:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=Pn9aLSeosG7l0BmT5llM/BGYPNtLICtF9m0AjdHG0XM=; b=QeV+sSrAvMNZz/Hv8XMeLRqtwltEHNbn+E7Q1KMfRROI4UX/8/QGtzZwItKKDjnJ3L UeFoamgANkKR4mTjq53HRN/LTnRSFbzfRfwXRoEyD9R5Zk6Io1hPK35e6azbP5rCtrtL 21Yqudy6GI6J4foAxi5rEZ/+oeFgKN/3ura1r/ibgHmc4hihAntMyfqV2DET/UVw+NYR TGWzDwxuPp6cVVqaY6mGDpjnH4iYwFrj8O76LFwxi2i2Arcp9jEbvE79gs8q7gNN7UwH LHG6JkzFFjWZvLWjpEZ56xHUB+Hv+HRTX2e5/dguf5b2JriddhinchMFpMO8bJjrvxvb K9og== X-Gm-Message-State: AOJu0YwZBU1I4ByRNlpqXXdj7LeGtiQ7t2HihcSdf9v/KJjyQtNzY8P/ GbIBt0WPFgXBYwbdNx1srtQ= X-Received: by 2002:a05:6871:a60a:b0:1f5:b60d:68ff with SMTP id we10-20020a056871a60a00b001f5b60d68ffmr10197694oab.14.1700527901134; Mon, 20 Nov 2023 16:51:41 -0800 (PST) Received: from localhost (203-219-179-16.tpgi.com.au. [203.219.179.16]) by smtp.gmail.com with ESMTPSA id n28-20020a056a000d5c00b006cbb80e4577sm723318pfv.210.2023.11.20.16.51.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Nov 2023 16:51:40 -0800 (PST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 21 Nov 2023 10:51:34 +1000 Message-Id: Subject: Re: [PATCH] powerpc: add crtsavres.o to always-y instead of extra-y From: "Nicholas Piggin" To: "Masahiro Yamada" , "Michael Ellerman" , "Christophe Leroy" , Cc: "Nathan Chancellor" , "Nick Desaulniers" , "Tom Rix" , , X-Mailer: aerc 0.15.2 References: <20231120232332.4100288-1-masahiroy@kernel.org> In-Reply-To: <20231120232332.4100288-1-masahiroy@kernel.org> X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Mon, 20 Nov 2023 16:52:04 -0800 (PST) On Tue Nov 21, 2023 at 9:23 AM AEST, Masahiro Yamada wrote: > crtsavres.o is linked to modules. However, as explained in commit > d0e628cd817f ("kbuild: doc: clarify the difference between extra-y > and always-y"), 'make modules' does not build extra-y. > > For example, the following command fails: > > $ make ARCH=3Dpowerpc LLVM=3D1 KBUILD_MODPOST_WARN=3D1 mrproper ps3_def= config modules > [snip] > LD [M] arch/powerpc/platforms/cell/spufs/spufs.ko > ld.lld: error: cannot open arch/powerpc/lib/crtsavres.o: No such file o= r directory > make[3]: *** [scripts/Makefile.modfinal:56: arch/powerpc/platforms/cell= /spufs/spufs.ko] Error 1 > make[2]: *** [Makefile:1844: modules] Error 2 > make[1]: *** [/home/masahiro/workspace/linux-kbuild/Makefile:350: __bui= ld_one_by_one] Error 2 > make: *** [Makefile:234: __sub-make] Error 2 > Thanks. Is this the correct Fixes tag? Fixes: d0e628cd817f ("powerpc/64: Do not link crtsavres.o in vmlinux") Hmm, looks like LLD might just do this now automatically for us too without --save-restore-funcs (https://reviews.llvm.org/D79977). But we probably still need it for older versions, so we still need your patch. Reviewed-by: Nicholas Piggin > Signed-off-by: Masahiro Yamada > --- > > arch/powerpc/lib/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile > index 51ad0397c17a..6eac63e79a89 100644 > --- a/arch/powerpc/lib/Makefile > +++ b/arch/powerpc/lib/Makefile > @@ -45,7 +45,7 @@ obj-$(CONFIG_FUNCTION_ERROR_INJECTION) +=3D error-injec= t.o > # so it is only needed for modules, and only for older linkers which > # do not support --save-restore-funcs > ifndef CONFIG_LD_IS_BFD > -extra-$(CONFIG_PPC64) +=3D crtsavres.o > +always-$(CONFIG_PPC64) +=3D crtsavres.o > endif > =20 > obj-$(CONFIG_PPC_BOOK3S_64) +=3D copyuser_power7.o copypage_power7.o \