Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp9236204rwl; Sat, 31 Dec 2022 22:51:55 -0800 (PST) X-Google-Smtp-Source: AMrXdXvYF2kjCyVJVE759G0Ep58nglVjiJqyTeokzt/GfHDFTPnd+gs6J5qkx5X/b++1YYGpmsmN X-Received: by 2002:a05:6402:327:b0:483:fea4:295 with SMTP id q7-20020a056402032700b00483fea40295mr20627564edw.16.1672555915180; Sat, 31 Dec 2022 22:51:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672555915; cv=none; d=google.com; s=arc-20160816; b=0nm3MRE8LSlY/cIv+cBJFKoVxIY31koYJZz8Qc0kgZD899cgC1Rv64UyywdxRbj990 O0zZpzx1zPV6cMgimYHtMLu/G0ghPrlYcm9sh3xMpw7+3rkIcoJR7LIJmxAubTvkDQ3e ewQVHvnNN6NSkOt1ZAMyYpsQdkQ6mK9CrOJgJ1fJJycnZg3sKNMDSp9jLKgoEtiuvgtB 5i2kt3vPMnAGaOiB0U7GLRt+dKTkcWvOLzaM5mE6mkPFXEC2btHO3TwDBHXQQyw5eAOH vNXDFJ1Sw2viHzSK+7HsbKyZ/KbrdAWptGHrVluAEfhfyPioyIE+MusP6kYHp4Om35LQ /6sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature:dkim-filter; bh=7ybTzL94IkNlUhsJSs+/8TOUWgjgmDY30w2NqMVmPAA=; b=ADxzbhglTbRgeNq5pCjj3M2JYqX4v5oySge8GrEEQCCxRqmevGxSxFr1vezMzRjpx9 WV7sut7lCsiUXFwbYVMp6/CirqY+te/YlGq4VLnuNGOEmNZ+v4cIlzO/qWm50AZF58XW MME3I4+WXfjy0pUSNq7d5SkLRfHQghwRzOI152ZlIv3/bdIqcfK4bB44McVamq4gWE5x btRS1a1JYEkCbcdIdmH/9YZOmun5v+oqL011kL8Cdrtw2rlRBupwTHuwuyG5k13oLRks O48GDN+gXwTDOq0/VK0bLNe42a+Yy2jx2GdFFa5YK89wqNjulyoaoO5acNRmOqSgdSGp X72A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=f8O5BrAz; 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 g11-20020a056402090b00b00469dd6e394asi25607545edz.579.2022.12.31.22.51.38; Sat, 31 Dec 2022 22:51:55 -0800 (PST) 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=@nifty.com header.s=dec2015msa header.b=f8O5BrAz; 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 S229934AbjAAGjK (ORCPT + 61 others); Sun, 1 Jan 2023 01:39:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229472AbjAAGjI (ORCPT ); Sun, 1 Jan 2023 01:39:08 -0500 Received: from conssluserg-04.nifty.com (conssluserg-04.nifty.com [210.131.2.83]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29756633F; Sat, 31 Dec 2022 22:39:06 -0800 (PST) Received: from mail-oi1-f182.google.com (mail-oi1-f182.google.com [209.85.167.182]) (authenticated) by conssluserg-04.nifty.com with ESMTP id 3016cpCZ003313; Sun, 1 Jan 2023 15:38:52 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-04.nifty.com 3016cpCZ003313 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1672555132; bh=7ybTzL94IkNlUhsJSs+/8TOUWgjgmDY30w2NqMVmPAA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=f8O5BrAzaYWfxyAFagWX61Q6TFy3MBAHJ63HyAPTeQuQrAr1QSo0t6kQbWfDoqYbY hRDHyZ38XT4OY1LebIAgQkrbllU4CSddYK3WghVbezWmnpPblUs2piVXhNd2BVXGXx 9bkLzcwjpMqlxd3kKWdPsqjWK2DzK2/R69tja/FX3tZ9W2mqXLvFAeDxSXbmsuKloB rgCn7GNN8VvvupIT+QnPVSyDso16mtkRjC8tiU/ci9Iu3i6xzaR226nb3BF+Ygf0O8 KLt5+XGg+V/FwZRIWeJ65inL72gxHt9IrktwQUl6B5OK03HbiAxD/FA4o1k+vyv6ce SyVd8mlghYylg== X-Nifty-SrcIP: [209.85.167.182] Received: by mail-oi1-f182.google.com with SMTP id s187so22618932oie.10; Sat, 31 Dec 2022 22:38:52 -0800 (PST) X-Gm-Message-State: AFqh2kopXorRZU/SzIUaHk+OJmSV/WCaFgpN/buo6TAVdR3wMwIGoI3i k4NbLfxW2yXpGArFmPCKVcJuCS2UY3rneUgpf0Q= X-Received: by 2002:aca:3755:0:b0:35e:7c55:b015 with SMTP id e82-20020aca3755000000b0035e7c55b015mr2032967oia.287.1672555131207; Sat, 31 Dec 2022 22:38:51 -0800 (PST) MIME-Version: 1.0 References: <20221211130408.2800314-1-masahiroy@kernel.org> <20221231174745.jc3qlmwydujswrne@pengutronix.de> In-Reply-To: <20221231174745.jc3qlmwydujswrne@pengutronix.de> From: Masahiro Yamada Date: Sun, 1 Jan 2023 15:38:15 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/2] kbuild: change module.order to list *.o instead of *.ko To: Marc Kleine-Budde Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Luis Chamberlain , Nathan Chancellor , Nick Desaulniers , Nicolas Schier , Tom Rix , linux-modules@vger.kernel.org, llvm@lists.linux.dev, kernel@pengutronix.de Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_SOFTFAIL autolearn=no 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, Jan 1, 2023 at 2:48 AM Marc Kleine-Budde wrote: > > On 11.12.2022 22:04:07, Masahiro Yamada wrote: > > scripts/Makefile.build replaces the suffix .o with .ko, then > > scripts/Makefile.modpost calls the sed command to change .ko back > > to the original .o suffix. > > > > Instead of converting the suffixes back-and-forth, store the .o paths > > in modules.order, and replace it with .ko in 'make modules_install'. > > > > This avoids the unneeded sed command. > > This breaks direct compilation of kernel modules (on current Linus's > master): > > | $ make drivers/net/can/dev/can-dev.ko > | [...] > | CC [M] drivers/net/can/dev/skb.o > | CC [M] drivers/net/can/dev/calc_bittiming.o > | CC [M] drivers/net/can/dev/bittiming.o > | CC [M] drivers/net/can/dev/dev.o > | CC [M] drivers/net/can/dev/length.o > | CC [M] drivers/net/can/dev/netlink.o > | LD [M] drivers/net/can/dev/can-dev.o > | make[5]: 'drivers/net/can/dev/can-dev.mod' is up to date. > | LDS scripts/module.lds > | MODPOST Module.symvers > | drivers/net/can/dev/can-dev.ko: No such file or directory > | make[1]: *** [.../linux/scripts/Makefile.modpost:129: Module.symvers] Error 1 > | make: *** [.../linux/Makefile:1982: single_modules] Error 2 > > According to "make help" it should be possible: > > | dir/file.ko - Build module including final link > > I've bisected it to: > > | first bad commit: [f65a486821cfd363833079b2a7b0769250ee21c9] kbuild: change module.order to list *.o instead of *.ko > > regards, > Marc Thanks for the report. I submitted a fix. https://lore.kernel.org/lkml/20230101060709.208512-1-masahiroy@kernel.org/T/#u > > -- > Pengutronix e.K. | Marc Kleine-Budde | > Embedded Linux | https://www.pengutronix.de | > Vertretung West/Dortmund | Phone: +49-231-2826-924 | > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- Best Regards Masahiro Yamada