From patchwork Wed Aug 23 11:50:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 13362209 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E9D19EE49B5 for ; Wed, 23 Aug 2023 11:51:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234019AbjHWLvF (ORCPT ); Wed, 23 Aug 2023 07:51:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234545AbjHWLvE (ORCPT ); Wed, 23 Aug 2023 07:51:04 -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 AE285DB; Wed, 23 Aug 2023 04:51:02 -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 3B73964B5F; Wed, 23 Aug 2023 11:51:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EFE55C433BB; Wed, 23 Aug 2023 11:50:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692791461; bh=17ZI9OuOHnRLfA+Aw4o40RdR2fIS9vJw5OhR2qQpZiI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eUxX4xhsUQgev7TX7KnUzypflQUoGPIqH8x29uyoEn26LluX/etqEJ1udaR/94PEz GRJiMpf1EMIA9nJAp64bvT3EdAn+HalMD8WVX6ed7DwYReKntOvr0zF5c+VeB45iYp yqqux7rPhmld+o67J4rmILzy8FflfnQ4JRWe/CPYcsxDS9+LFlKN6p6dEQ13GzQDrx SCqzA7gT/mo0ujZGj3kVfM0/VTUj8K+3uzVkZGHSDCmq3uLor8uV1N8xfV5IyeRjFX Wd+PweV490O6s4pKn5yZ3XDD5DFXE5E3lqHNm4gzgg9sGAQD+SD+SC3oPknXYVovAV m2/bbSFidLEgQ== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Masahiro Yamada , Nathan Chancellor , Nick Desaulniers , Nicolas Schier Subject: [PATCH 4/8] kbuild: remove $(MODLIB)/source symlink Date: Wed, 23 Aug 2023 20:50:44 +0900 Message-Id: <20230823115048.823011-4-masahiroy@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230823115048.823011-1-masahiroy@kernel.org> References: <20230823115048.823011-1-masahiroy@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org This reverts the old commit "kbuild: Introduce source symlink in /lib/modules/.../". [1] The current Kbuild does not require $(MODLIB)/source. If the kernel was built in a separate output directory, $(MODLIB)/build/Makefile wraps the Makefile in the source tree. It is enough for building external modules. [1] https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/commit/?id=e09e58867154b8aae0a3ac26a9b1c05962f5a355 Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier --- Makefile | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index c9c8019e4720..7d9cab3d2186 100644 --- a/Makefile +++ b/Makefile @@ -1486,14 +1486,10 @@ modules_install: $(modinst_pre) PHONY += __modinst_pre __modinst_pre: @rm -rf $(MODLIB)/kernel - @rm -f $(MODLIB)/source + @rm -f $(MODLIB)/build @mkdir -p $(MODLIB) ifdef CONFIG_MODULES - @ln -s $(abspath $(srctree)) $(MODLIB)/source - @if [ ! $(objtree) -ef $(MODLIB)/build ]; then \ - rm -f $(MODLIB)/build ; \ - ln -s $(CURDIR) $(MODLIB)/build ; \ - fi + @ln -s $(CURDIR) $(MODLIB)/build @sed 's:^\(.*\)\.o$$:kernel/\1.ko:' modules.order > $(MODLIB)/modules.order endif @cp -f modules.builtin $(MODLIB)/