LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Jan Beulich <jbeulich@novell.com>, Roman Zippel <zippel@linux-m68k.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] kconfig/kbuild: fix dependency problem
Date: Sat, 31 Mar 2007 09:40:21 +0200	[thread overview]
Message-ID: <20070331074021.GB11383@uranus.ravnborg.org> (raw)
In-Reply-To: <20070331064228.GA11023@uranus.ravnborg.org>

>From bbc89026f3e5d9e437ce4cd26d3013fe226103e2 Mon Sep 17 00:00:00 2001
From: Sam Ravnborg <sam@neptun.ravnborg.org>
Date: Sat, 31 Mar 2007 09:34:46 +0200
Subject: [PATCH] kconfig/kbuild: fix dependency problem

Commit 2e3646e51b2d6415549b310655df63e7e0d7a080 changed the way
the split config tree is built, but failed to also adjust fixdep
accordingly - if changing a config option from or to m, files
referencing the respective CONFIG_..._MODULE (but not the
corresponding CONFIG_...) didn't get rebuilt.

This happens because tristate symbol has three values represented
by different CONFIG_ symbols:

=n => CONFIG_SYMBOL undefined
=y => CONFIG_SYMBOL equals 1
=m => CONFIG_SYMBOL_MODULE equals 1

But conf_split_config did not support the _MODULE syntax
and therefore no include/config/symbol/module.h file was
generated/touched when changing a symbol to/from m.
Thus make did nt pick up the change and rebuild failed.

This patch teaches conf_split_config to support the
_MODULE variant.

This fixes a problem reported by Randy Dunlap <randy.dunlap@oracle.com>.
arch/i386/kernel/apm.o revealed this bug.
Original fix was posted by:  "Jan Beulich" <jbeulich@novell.com>
which inspired this better fix.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
 scripts/kconfig/confdata.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index ff6b39b..4137961 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -646,6 +646,12 @@ int conf_split_config(void)
 		*d = '\0';
 		if (touch_file(path))
 			return 1;
+		/* For tristate symbols we need to touch symbol/module.h too */
+		if (sym->type == S_TRISTATE) {
+			strcat(path, "/module");
+			if (touch_file(path))
+				return 1;
+		}
 	}
 	if (chdir("../.."))
 		return 1;
-- 
1.5.1.rc3.gaa453


  parent reply	other threads:[~2007-03-31  7:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-29  9:27 [PATCH] fix dependency generation Jan Beulich
2007-03-29 15:39 ` Randy Dunlap
2007-03-29 16:06   ` Jan Beulich
2007-03-29 16:38     ` Randy Dunlap
2007-03-30  9:14       ` Jan Beulich
2007-03-30 15:17         ` Randy Dunlap
2007-03-30 15:08 ` Sam Ravnborg
2007-03-30 15:43   ` Jan Beulich
2007-03-30 17:14     ` Jeff Dike
2007-03-31  6:42 ` Sam Ravnborg
2007-03-31  7:39   ` [PATCH 1/2] kconfig: factor out code in conf_spilt_config Sam Ravnborg
2007-03-31  7:40   ` Sam Ravnborg [this message]
2007-03-31 16:11   ` [PATCH] fix dependency generation Roman Zippel
2007-04-01 18:45     ` Sam Ravnborg

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=20070331074021.GB11383@uranus.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=jbeulich@novell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zippel@linux-m68k.org \
    --subject='Re: [PATCH 2/2] kconfig/kbuild: fix dependency problem' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).