All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Mathias Krause <minipli@grsecurity.net>
Cc: Nicolas Schier <nsc@kernel.org>,
	linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kbuild: prevent building single targets twice
Date: Wed, 21 Oct 2026 14:55:24 -0700	[thread overview]
Message-ID: <20261021215524.GA627677@ax162> (raw)
In-Reply-To: <aad229bb-27c2-4c5f-bfce-73d2a0d04996@grsecurity.net>

On Wed, Oct 21, 2026 at 11:25:13PM +0200, Mathias Krause wrote:
> On 21.10.26 21:03, Nathan Chancellor wrote:
> > On Wed, Oct 21, 2026 at 07:04:33PM +0200, Nicolas Schier wrote:
> >> On Wed, Oct 21, 2026 at 08:53:56AM +0200, Mathias Krause wrote:
> >>> Ping! I know, it's the merge window but this patch may have fallen
> >>> through the cracks as there was no response so far. Just trying to take
> >>> care it doesn't get lost.
> >>
> >> thanks for the ping.  The patch is in my review queue for the upcoming
> >> cycle.
> > 
> > Same, I will try to review it this week or next once I clear my tip of
> > tree clang regressions backlog and Kbuild merge window madness.

I forgot to mention, it looks like this is a known corner case in Kbuild
that has come up before:

  https://lore.kernel.org/7b663b86-4df0-c3df-18a7-e4f47f900be4@kernel.org/
  https://lore.kernel.org/CAK7LNAQhORSPEuB=XFa_i5EcQfsJ6uXy0MM5YWo_84eLGcoxNQ@mail.gmail.com/

This patch might be the fix that Masahiro could not figure out but it
might be better to just forsake drivers-y here and use obj-y properly,
especially since it looks like core-y is not even used for x86 anymore
(but maybe these objects still need to linked towards the end of the
kernel?). This diff appears to resolve the reported issue but I did not
try running the result.

diff --git a/arch/x86/Kbuild b/arch/x86/Kbuild
index 36b985d0e7bf..bd0621207c0c 100644
--- a/arch/x86/Kbuild
+++ b/arch/x86/Kbuild
@@ -36,5 +36,12 @@ obj-$(CONFIG_KEXEC_FILE) += purgatory/
 
 obj-y += virt/
 
+obj-$(CONFIG_PCI) += pci/
+
+# suspend and hibernation support
+obj-$(CONFIG_PM) += power/
+
+obj-$(CONFIG_VIDEO) += video/
+
 # for cleaning
 subdir- += boot tools
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index b7e08519b8c1..9a872bd9520e 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -279,14 +279,6 @@ archprepare: $(cpufeaturemasks.hdr)
 
 libs-y  += arch/x86/lib/
 
-# drivers-y are linked after core-y
-drivers-$(CONFIG_PCI)            += arch/x86/pci/
-
-# suspend and hibernation support
-drivers-$(CONFIG_PM) += arch/x86/power/
-
-drivers-$(CONFIG_VIDEO) += arch/x86/video/
-
 ####
 # boot loader support. Several targets are kept for legacy purposes
 
-- 
Cheers,
Nathan

  reply	other threads:[~2026-10-21 21:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-23 12:39 [PATCH] kbuild: prevent building single targets twice Mathias Krause
2026-10-21  6:53 ` Mathias Krause
2026-10-21 17:04   ` Nicolas Schier
2026-10-21 19:03     ` Nathan Chancellor
2026-10-21 21:25       ` Mathias Krause
2026-10-21 21:55         ` Nathan Chancellor [this message]
2026-10-22 10:05           ` Mathias Krause
2026-10-22 19:37             ` Nathan Chancellor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261021215524.GA627677@ax162 \
    --to=nathan@kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minipli@grsecurity.net \
    --cc=nsc@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.