Skip to contentSkip to conversation

kbuild core updates for 2.6.39-rc1

GIT Michal Marek 3 participants 4 messages Mar 19, 2011 – Mar 21, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi Linus,

please pull these kbuild updates for 2.6.39-rc1:

* Section mismatch analysis enabled by default
- there are only a few warnings for defconfig builds, all{yes,mod}config still has a lot of them. Depending on the general perception of this change, we might disable it later in the rc phase again.
* Update of unifdef. This is a noop for kbuild, but being in sync with upstream is good.
* make W=1 mode that enables a lot of non-default gcc warnings.
* genksyms detects changes in enum constant values.
* two minor fixes.

The following changes since commit c56eb8fb6dccb83d9fe62fd4dc00c834de9bc470:

Linux 2.6.38-rc1 (2011-01-18 15:14:02 -0800)

are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6.git kbuild

Borislav Petkov (1):
kbuild: Add extra gcc checks

Michal Marek (8):
genksyms: Do not paste the bison header file to lex.c
genksyms: Simplify lexer
genksyms: Simplify printing of symbol types
genksyms: Add helpers for building string lists
genksyms: simplify usage of find_symbol()
genksyms: Track changes to enum constants
genksyms: Regenerate lexer and parser
Merge branch 'genksyms-enum' into kbuild/kbuild

Mike Waychison (1):
KBuild: silence "'scripts/unifdef' is up to date."

Randy Dunlap (1):
modpost: fix trailing comma

Tony Finch (1):
unifdef: update to upstream version 2.5

Uwe Kleine-König (1):
kbuild: reenable section mismatch analysis

 Documentation/kbuild/kbuild.txt  |    5 +
 Makefile                         |    7 +-
 lib/Kconfig.debug                |    4 -
 scripts/Makefile                 |    5 +
 scripts/Makefile.build           |   35 ++-
 scripts/genksyms/Makefile        |    4 +-
 scripts/genksyms/genksyms.c      |  192 +++++--
 scripts/genksyms/genksyms.h      |    7 +-
 scripts/genksyms/lex.c_shipped   |  427 ++++++----------
 scripts/genksyms/lex.l           |   44 ++-
 scripts/genksyms/parse.c_shipped | 1071 ++++++++++++++++++++++----------------
 scripts/genksyms/parse.h_shipped |   72 +--
 scripts/genksyms/parse.y         |   34 ++-
 scripts/mod/modpost.c            |   23 +-
 scripts/unifdef.c                |  247 +++++++---
 15 files changed, 1237 insertions(+), 940 deletions(-)
#1 lore raw
Quoted 6 lines · Michal Marek

* Section mismatch analysis enabled by default
 - there are only a few warnings for defconfig builds, all{yes,mod}config still has a lot of them. Depending on the general perception of this change, we might disable it later in the rc phase again.

No.

We don't enable stuff like this by default. Not when it actually changes some really fundamental compiler flags, and thus the whole "we can disable it late in -rc again" is a totally broken option, since if we have any compiler issues, we'd want to know it early.

And we _know_ we are going to disable it, since it enables the "don't inline" flag to gcc for called-once functions. So there's no question at all what the default should be in any release kernel.

Anyway - in general, enabling options like this had better have some _seriously_ major reasons. IOW, major known issues that just have to be sorted out and cannot be sorted out any other way. That doesn't seem to be the case here.

WE DO NOT EVER ENABLE NEW THINGS BY DEFAULT. I know, I know - every developer always thinks that _his_ code is special and magically so important that it should be enabled by default, but no, that is simply not the case. The only reason to enable something by default is that it used to never be a config option in the first place, so if somebody builds a new kernel, and he used to just silently get the feature, then the new config option is still on by default.

Not pulling. This is a pet peeve of mine. We don't use "set to 'y' on default" as a way to trick people into enabling code. No, no, no.

Linus

#2 lore raw
Quoted 8 lines · Linus Torvalds
Quoted 6 lines · Michal Marek

* Section mismatch analysis enabled by default
 - there are only a few warnings for defconfig builds, all{yes,mod}config still has a lot of them. Depending on the general perception of this change, we might disable it later in the rc phase again.

Quoted 6 lines

No.

We don't enable stuff like this by default. Not when it actually changes some really fundamental compiler flags, and thus the whole "we can disable it late in -rc again" is a totally broken option, since if we have any compiler issues, we'd want to know it early.

Note that the default y doesn't result from the patch in this pull request but from
1d53661 (blackfin: enable DEBUG_SECTION_MISMATCH)
. I admit I didn't think deeply about it, but keeping it seemed OK for me.

Quoted 3 lines

And we _know_ we are going to disable it, since it enables the "don't inline" flag to gcc for called-once functions. So there's no question at all what the default should be in any release kernel.

I wasn't aware of that, Mike so even "default y if BLACKFIN" seems to be a bad idea.

Michal, do you want just remove the default y and squash it into the commit?
And something that just occured my now is that the warning about CONFIG_DEBUG_SECTION_MISMATCH in scripts/mod/modpost.c could get an update, too. Something like:

warn("modpost: Found %d section mismatch(es).\n"

-		     "To see full details build your kernel with:\n"
-		     "'make CONFIG_DEBUG_SECTION_MISMATCH=y'\n",
+		     "To see full details enable CONFIG_DEBUG_SECTION_MISMATCH in your .config.\n"
		     sec_mismatch_count);

Best regards
Uwe

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
#3 lore raw
Quoted 9 lines · Uwe Kleine-König
Quoted 8 lines · Linus Torvalds
Quoted 6 lines · Michal Marek

* Section mismatch analysis enabled by default
 - there are only a few warnings for defconfig builds, all{yes,mod}config still has a lot of them. Depending on the general perception of this change, we might disable it later in the rc phase again.

Quoted 6 lines
Quoted 6 lines

No.

We don't enable stuff like this by default. Not when it actually changes some really fundamental compiler flags, and thus the whole "we can disable it late in -rc again" is a totally broken option, since if we have any compiler issues, we'd want to know it early.

OK, point taken.

Quoted 2 lines

Michal, do you want just remove the default y and squash it into the commit?

I'm about to add this to the kbuild branch. Linus, would you pull such version?

From: Michal Marek <[email protected]>
Subject: [PATCH] kbuild: Make DEBUG_SECTION_MISMATCH selectable, but not on by default

CONFIG_DEBUG_SECTION_MISMATCH has also runtime effects due to the -fno-inline-functions-called-once compiler flag, so forcing it on everyone is not a good idea.

lib/Kconfig.debug +0 -1
index 8b6a4f1..5a24805 100644
@@ -102,7 +102,6 @@ config HEADERS_CHECK
 
 config DEBUG_SECTION_MISMATCH
 	bool "Enable full Section mismatch analysis"
-	default y
 	help
 	  The section mismatch analysis checks if there are illegal
 	  references from one section to another section.

Michal