kbuild, kconfig + Kconfig updates
PATCH 1/1 kbuild, kconfig + Kconfig updates
Hi Linus.
Please pull latest kbuild/kconfig and Kconfig updates. Most of these have been present in -mm although a bunch of trivial updates has been applied the last week too.
Main changes
o Added cleanfile and cleanpatch scripts
Useful to tidy up stuff before submission.
The discussed checkpatch script may be a good third candidate
o section mismatch does now include vmlinux so expect a few new warnings
o Ignore section mismatch warnings in several cases to bring down false positives significantly
o complain about missing system calls
The way to find missing system calls was discussed but in general the current version was apprecated and triggered davem to add a few to sparc64 for example
o It is now possible to override build version and build timestamp using KBUILD_BUILD_VERSION and KBUILD_BUILD_TIMESTAMP
o One patch does some trivial fixes in several Kconfig files which
caused some 'nosie' in the diffstat.
o Another patch deals with module alias which explain the changes in input.h
Please pull fromgit://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild.git
shortlog + diffstat below.
Sam
Alex Landau (1):
kbuild: handle compressed cpio initramfs-es
Alexander E. Patrakov (2):
usr/Kconfig: fix typo
kconfig: fix path to modules.txt in Kconfig help
Andreas Dilger (1):
kconfig.debug: clarify CONFIG_DEBUG_INFO help text
Andy Green (1):
kbuild: scripts/basic/fixdep segfault on pathological string-o-death
Anton Blanchard (1):
kbuild: small documentation fix in Documentation/kbuild/modules.txt
Don Mullis (1):
kbuild: move tags from ARCH and include/ ahead of drivers
H. Peter Anvin (2):
cleanfile: a script to clean up stealth whitespace
cleanpatch: a script to clean up stealth whitespace added by a patch
Marco Costalba (1):
kconfig/xconfig: sync main view with search dialog current menu
Matthew Wilcox (1):
kbuild: distinguish between errors and warnings in modpost
Michael Ellerman (1):
kbuild: propagate errors from find in scripts/gen_initramfs_list.sh
Mike Frysinger (1):
menuconfig: dont use obsolete index() function in lxdialog
Randy Dunlap (2):
kbuild: be more explicit on missing .config file
kernel-doc: alphabetically-sorted entries in index.html of 'htmldocs'
Robert P. J. Day (2):
kbuild: clarify the creation of the LOCALVERSION_AUTO string.
kconfig: correct minor typo in Kconfig warning message.
Sam Ravnborg (16):
kbuild: fix section mismatch check for vmlinux
kbuild: whitelist section mismatch in init/main.c
kbuild: fix warnings from .pci_fixup section
kbuild: fix segmentation fault in modpost
kbuild: whitelist logo references from .text to .init.data
kbuild: remove dependency on input.h from file2alias
menuconfig: remember alternate config filename
kbuild: do not emit src version warning for non-modules
kbuild: complain about missing system calls
kbuild: override build timestamp & version
kconfig/menuconfig: do not hardcode '.config'
kbuild: remove kconfig binaries during make mrproper
kbuild: fix make mrproper for Documentation/DocBook/man
kbuild: remove stale comment in modpost.c
kbuild: ignore section mismatch warning for references from .paravirtprobe to .init.text
kconfig: refer to qt3 if we cannot find qt libraries
Uwe Zeisberger (1):
kbuild: add a missing slash in the comments
Uwe kleine-König (1):
kbuild/mkuboot.sh: allow spaces in CROSS_COMPILE
Documentation/DocBook/Makefile | 9 +- Documentation/DocBook/man/Makefile | 3 - Documentation/kbuild/modules.txt | 2 +- Kbuild | 11 ++ Makefile | 15 ++- drivers/mtd/devices/Kconfig | 4 +- drivers/net/Kconfig | 6 +- drivers/net/wireless/Kconfig | 12 +- drivers/scsi/Kconfig | 4 +- drivers/video/Kconfig | 8 +- include/linux/input.h | 4 + include/linux/mod_devicetable.h | 1 + init/Kconfig | 16 ++- init/main.c | 6 +- lib/Kconfig.debug | 3 + net/ipv6/netfilter/Kconfig | 2 +- net/netfilter/Kconfig | 24 ++-- net/tipc/Kconfig | 2 +- scripts/Makefile.modpost | 8 +- scripts/basic/fixdep.c | 2 + scripts/checksyscalls.sh | 118 ++++++++++++++++++++ scripts/cleanfile | 126 ++++++++++++++++++++++ scripts/cleanpatch | 206 ++++++++++++++++++++++++++++++++++++ scripts/gen_initramfs_list.sh | 12 ++- scripts/kconfig/Makefile | 5 +- scripts/kconfig/conf.c | 1 + scripts/kconfig/lkc.h | 1 + scripts/kconfig/lxdialog/dialog.h | 1 + scripts/kconfig/lxdialog/util.c | 9 ++- scripts/kconfig/mconf.c | 43 ++++++-- scripts/kconfig/menu.c | 2 +- scripts/kconfig/qconf.cc | 5 +- scripts/kconfig/qconf.h | 2 +- scripts/mkcompile_h | 27 ++++-- scripts/mkuboot.sh | 2 +- scripts/mod/file2alias.c | 21 ++-- scripts/mod/modpost.c | 141 +++++++++++++++++++------ scripts/mod/modpost.h | 1 + scripts/mod/sumversion.c | 5 +- usr/Kconfig | 2 +- 40 files changed, 735 insertions(+), 137 deletions(-)
PATCH 1/1 kbuild, kconfig + Kconfig updates
Hi Linus.
On top of the below additional three patches has been pushed out:
kconfig: fix mconf segmentation fault
kbuild: enable use of code from a different dir
kconfig: error out if recursive dependencies are found
Please pull from:git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild.git
Diffstat for the NEW patches (see diffstat for the other 35 patches at end of mail)
scripts/Makefile.build | 19 +++++++++---------- scripts/Makefile.host | 14 +++++++------- scripts/kconfig/lex.zconf.c_shipped | 2 +- scripts/kconfig/symbol.c | 13 +++++-------- scripts/kconfig/zconf.l | 2 +- scripts/kconfig/zconf.tab.c_shipped | 6 ++++-- scripts/kconfig/zconf.y | 6 ++++-- 7 files changed, 31 insertions(+), 31 deletions(-)
Patches will be sent to lkml only.
Sam
Quoted 143 lines · Sam Ravnborg
Hi Linus.
Please pull latest kbuild/kconfig and
Kconfigupdates. Most of these have been present in -mm although a bunch of trivial updates has been applied the last week too.Main changes
o Added cleanfile and cleanpatch scripts
Useful to tidy up stuff before submission.
The discussed checkpatch script may be a good third candidate
o section mismatch does now include vmlinux so expect a few new warnings
o Ignore section mismatch warnings in several cases to bring down false positives significantly
o complain about missing system calls
The way to find missing system calls was discussed but in general the current version was apprecated and triggered davem to add a few to sparc64 for example
o It is now possible to override build version and build timestamp usingKBUILD_BUILD_VERSIONandKBUILD_BUILD_TIMESTAMP
o One patch does some trivial fixes in severalKconfigfiles which
caused some 'nosie' in the diffstat.
o Another patch deals with module alias which explain the changes ininput.hPlease pull from
git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild.gitshortlog + diffstat below.
Sam
Alex Landau (1):
kbuild: handle compressed cpio initramfs-esAlexander E. Patrakov (2):
usr/Kconfig: fix typo
kconfig: fix path to modules.txt inKconfighelpAndreas Dilger (1):
kconfig.debug: clarifyCONFIG_DEBUG_INFOhelp textAndy Green (1):
kbuild:scripts/basic/fixdepsegfault on pathological string-o-deathAnton Blanchard (1):
kbuild: small documentation fix inDocumentation/kbuild/modules.txtDon Mullis (1):
kbuild: move tags from ARCH andinclude/ahead of driversH. Peter Anvin (2):
cleanfile: a script to clean up stealth whitespace
cleanpatch: a script to clean up stealth whitespace added by a patchMarco Costalba (1):
kconfig/xconfig: sync main view with search dialog current menuMatthew Wilcox (1):
kbuild: distinguish between errors and warnings in modpostMichael Ellerman (1):
kbuild: propagate errors from find inscripts/gen_initramfs_list.shMike Frysinger (1):
menuconfig: dont use obsoleteindex()function in lxdialogRandy Dunlap (2):
kbuild: be more explicit on missing .config file
kernel-doc: alphabetically-sorted entries in index.html of 'htmldocs'Robert P. J. Day (2):
kbuild: clarify the creation of theLOCALVERSION_AUTOstring.
kconfig: correct minor typo inKconfigwarning message.Sam Ravnborg (16):
kbuild: fix section mismatch check for vmlinux
kbuild: whitelist section mismatch ininit/main.c
kbuild: fix warnings from .pci_fixup section
kbuild: fix segmentation fault in modpost
kbuild: whitelist logo references from .text to .init.data
kbuild: remove dependency oninput.hfrom file2alias
menuconfig: remember alternate config filename
kbuild: do not emit src version warning for non-modules
kbuild: complain about missing system calls
kbuild: override build timestamp & version
kconfig/menuconfig: do not hardcode '.config'
kbuild: remove kconfig binaries during make mrproper
kbuild: fix make mrproper forDocumentation/DocBook/man
kbuild: remove stale comment inmodpost.c
kbuild: ignore section mismatch warning for references from .paravirtprobe to .init.text
kconfig: refer to qt3 if we cannot find qt librariesUwe Zeisberger (1):
kbuild: add a missing slash in the commentsUwe kleine-König (1):
kbuild/mkuboot.sh: allow spaces inCROSS_COMPILEDocumentation/DocBook/Makefile | 9 +- Documentation/DocBook/man/Makefile | 3 - Documentation/kbuild/modules.txt | 2 +- Kbuild | 11 ++ Makefile | 15 ++- drivers/mtd/devices/Kconfig | 4 +- drivers/net/Kconfig | 6 +- drivers/net/wireless/Kconfig | 12 +- drivers/scsi/Kconfig | 4 +- drivers/video/Kconfig | 8 +- include/linux/input.h | 4 + include/linux/mod_devicetable.h | 1 + init/Kconfig | 16 ++- init/main.c | 6 +- lib/Kconfig.debug | 3 + net/ipv6/netfilter/Kconfig | 2 +- net/netfilter/Kconfig | 24 ++-- net/tipc/Kconfig | 2 +- scripts/Makefile.modpost | 8 +- scripts/basic/fixdep.c | 2 + scripts/checksyscalls.sh | 118 ++++++++++++++++++++ scripts/cleanfile | 126 ++++++++++++++++++++++ scripts/cleanpatch | 206 ++++++++++++++++++++++++++++++++++++ scripts/gen_initramfs_list.sh | 12 ++- scripts/kconfig/Makefile | 5 +- scripts/kconfig/conf.c | 1 + scripts/kconfig/lkc.h | 1 + scripts/kconfig/lxdialog/dialog.h | 1 + scripts/kconfig/lxdialog/util.c | 9 ++- scripts/kconfig/mconf.c | 43 ++++++-- scripts/kconfig/menu.c | 2 +- scripts/kconfig/qconf.cc | 5 +- scripts/kconfig/qconf.h | 2 +- scripts/mkcompile_h | 27 ++++-- scripts/mkuboot.sh | 2 +- scripts/mod/file2alias.c | 21 ++-- scripts/mod/modpost.c | 141 +++++++++++++++++++------ scripts/mod/modpost.h | 1 + scripts/mod/sumversion.c | 5 +- usr/Kconfig | 2 +- 40 files changed, 735 insertions(+), 137 deletions(-)-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
kconfig: error out if recursive dependencies are found
Sample:
config FOO
bool "This is foo"
depends on BAR
config BAR
bool "This is bar"
depends on FOO
This will result in following error message:
error: found recursive dependency: FOO -> BAR -> FOO
And will then exit with exit code equal 1 so make will stop. Inspired by patch from: Adrian Bunk <[email protected]>
--- scripts/kconfig/symbol.c | 13 +++++-------- scripts/kconfig/zconf.tab.c_shipped | 6 ++++-- scripts/kconfig/zconf.y | 6 ++++-- 3 files changed, 13 insertions(+), 12 deletions(-)
scripts/kconfig/symbol.c +5 -8
@@ -786,13 +786,15 @@ static struct symbol *sym_check_expr_deps(struct expr *e)return NULL ; } +/* return NULL when dependencies are OK */ struct symbol *sym_check_deps (struct symbol *sym) {struct symbol *sym2;struct property *prop;if (sym->flags &SYMBOL_CHECK ) { -printf ("Warning! Found recursive dependency: %s" , sym->name); +fprintf (stderr,"%s:%d:error: found recursive dependency: %s" , + sym->prop->file->name, sym->prop->lineno, sym->name);return sym; }if (sym->flags &SYMBOL_CHECKED )
@@ -816,13 +818,8 @@ struct symbol *sym_check_deps(struct symbol *sym) goto out; } out: -if (sym2) { -printf (" %s" , sym->name); -if (sym2 == sym) { -printf ("\n" ); - sym2 =NULL ; - } - } +if (sym2) +fprintf (stderr," -> %s%s" , sym->name, sym2 == sym?"\n" :"" ); sym->flags &= ~SYMBOL_CHECK ;return sym2; }
scripts/kconfig/zconf.tab.c_shipped +4 -2
@@ -2132,9 +2132,11 @@ void conf_parse(const char *name) } menu_finalize(&rootmenu); for_all_symbols(i, sym) { - sym_check_deps(sym); + if (sym_check_deps(sym)) + zconfnerrs++; } - + if (zconfnerrs) + exit(1); sym_set_change_count(1); }
scripts/kconfig/zconf.y +4 -2
@@ -501,9 +501,11 @@ void conf_parse(const char *name) } menu_finalize(&rootmenu); for_all_symbols(i, sym) { - sym_check_deps(sym); + if (sym_check_deps(sym)) + zconfnerrs++; } - + if (zconfnerrs) + exit(1); sym_set_change_count(1); }
Signature · 1 line
1.5.1.rc3.20.gaa453
Re: kconfig: error out if recursive dependencies are found
Hi,
scripts/kconfig/symbol.c static struct symbol *sym_check_expr_deps(struct expr *e) · line 799
Quoted 6 lines · Sam Ravnborg
scripts/kconfig/symbol.c +2
-1if (sym->flags &SYMBOL_CHECK ) { -printf ("Warning! Found recursive dependency: %s" , sym->name); +fprintf (stderr,"%s:%d:error: found recursive dependency: %s" , + sym->prop->file->name, sym->prop->lineno, sym->name);return sym; }
If it were that simple to print the location, I had done it already. :) Try this:
config FOO
bool
select BAR
depends on BAR
config BAR
bool
I looked into this before, for simple properties one could just remember the last checked property via a static variable. The problem are the selects which are checked before that loop, here the information from where they were selected is not available anymore (at least not easily).
bye, Roman
Re: kconfig: error out if recursive dependencies are found
Quoted 19 lines · Roman Zippel
Hi,
scripts/kconfig/symbol.c static struct symbol *sym_check_expr_deps(struct expr *e) · line 799
Quoted 6 lines · Sam Ravnborg
scripts/kconfig/symbol.c +2
-1if (sym->flags &SYMBOL_CHECK ) { -printf ("Warning! Found recursive dependency: %s" , sym->name); +fprintf (stderr,"%s:%d:error: found recursive dependency: %s" , + sym->prop->file->name, sym->prop->lineno, sym->name);return sym; }If it were that simple to print the location, I had done it already. :) Try this:
config FOO
bool
select BAR
depends on BAR
Quoted 7 lines
config BAR
boolI looked into this before, for simple properties one could just remember the last checked property via a static variable. The problem are the selects which are checked before that loop, here the information from where they were selected is not available anymore (at least not easily).
We need to point out _one_ of the faulty spots only.
But I see that kconfig records file:line for properties and menu entries but not for symbols.
Any special reason why file:line is omitted for symbols (except size of allocated memory)?
Without looking into details it looks more relevant to have file:line for symbols rather than for prompts / properties..
Sam
Re: kconfig: error out if recursive dependencies are found
Hi,
Quoted 1 line · Sam Ravnborg
We need to point out _one_ of the faulty spots only.
The problem is you print only a random spot (which may not even be right one) of one of the involved symbols.
We could actually print out the whole faulty chain, but it would require a few changes, which might be useful to improve the select handling.
Quoted 7 lines
But I see that kconfig records file:line for properties and menu entries but not for symbols.
Any special reason why file:line is omitted for symbols (except size of allocated memory)?Without looking into details it looks more relevant to have file:line for symbols rather than for prompts / properties..
A symbol can have multiple entries. The "config" line is just the start marker for the symbol information, which is the actual relevant part.
bye, Roman
Re: kconfig: error out if recursive dependencies are found
In reply to Sam RavnborgQuoted 28 lines · Sam Ravnborg
Quoted 19 lines · Roman Zippel
Hi,
scripts/kconfig/symbol.c static struct symbol *sym_check_expr_deps(struct expr *e) · line 799
Quoted 6 lines · Sam Ravnborg
scripts/kconfig/symbol.c +2
-1if (sym->flags &SYMBOL_CHECK ) { -printf ("Warning! Found recursive dependency: %s" , sym->name); +fprintf (stderr,"%s:%d:error: found recursive dependency: %s" , + sym->prop->file->name, sym->prop->lineno, sym->name);return sym; }If it were that simple to print the location, I had done it already. :) Try this:
config FOO
bool
select BAR
depends on BARQuoted 7 lines
config BAR
boolI looked into this before, for simple properties one could just remember the last checked property via a static variable. The problem are the selects which are checked before that loop, here the information from where they were selected is not available anymore (at least not easily).
Quoted 8 lines
We need to point out _one_ of the faulty spots only.
But I see that kconfig records file:line for properties and menu entries but not for symbols.
Any special reason why file:line is omitted for symbols (except size of allocated memory)?Without looking into details it looks more relevant to have file:line for symbols rather than for prompts / properties..
I'm not getting what problem you are trying to solve.
Kconfig has always printed all symbols in the dependency circle, and with this information it was never a problem to locate what went wrong.
The only thing that was missing was that the error often wasn't detected since it scroled away, so we need to error out.
I have no problem with more information being printed, but at least for me it isn't required since grep'ing for it is trivial.
Quoted 1 line
Sam
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seedkbuild: enable use of code from a different dir
In reply to Sam RavnborgTo introduce support for source in one directory but output files in another directory during a non O= build prefix all paths with $(src) repsectively $(obj).
--- scripts/Makefile.build | 19 +++++++++---------- scripts/Makefile.host | 14 +++++++------- 2 files changed, 16 insertions(+), 17 deletions(-)
scripts/Makefile.build +9 -10
@@ -131,13 +131,13 @@ $(multi-objs-y:.o=.lst) : modname = $(modname-multi) quiet_cmd_cc_s_c = CC $(quiet_modtag) $@ cmd_cc_s_c = $(CC) $(c_flags) -fverbose-asm -S -o $@ $< -%.s: %.c FORCE +$(obj)/%.s: $(src)/%.c FORCE $(call if_changed_dep,cc_s_c) quiet_cmd_cc_i_c = CPP $(quiet_modtag) $@ cmd_cc_i_c = $(CPP) $(c_flags) -o $@ $< -%.i: %.c FORCE +$(obj)/%.i: $(src)/%.c FORCE $(call if_changed_dep,cc_i_c) quiet_cmd_cc_symtypes_c = SYM $(quiet_modtag) $@
@@ -146,7 +146,7 @@ cmd_cc_symtypes_c = \ | $(GENKSYMS) -T $@ >/dev/null; \ test -s $@ || rm -f $@ -%.symtypes : %.c FORCE +$(obj)/%.symtypes : $(src)/%.c FORCE $(call if_changed_dep,cc_symtypes_c) # C (.c) files
@@ -198,14 +198,13 @@ define rule_cc_o_c endef # Built-in and composite module parts - -%.o: %.c FORCE +$(obj)/%.o: $(src)/%.c FORCE $(call cmd,force_checksrc) $(call if_changed_rule,cc_o_c) # Single-part modules are special since we need to mark them in $(MODVERDIR) -$(single-used-m): %.o: %.c FORCE +$(single-used-m): $(obj)/%.o: $(src)/%.c FORCE $(call cmd,force_checksrc) $(call if_changed_rule,cc_o_c) @{ echo $(@:.o=.ko); echo $@; } > $(MODVERDIR)/$(@F:.o=.mod)
@@ -215,7 +214,7 @@ quiet_cmd_cc_lst_c = MKLST $@ $(CONFIG_SHELL) $(srctree)/scripts/makelst $*.o \ System.map $(OBJDUMP) > $@ -%.lst: %.c FORCE +$(obj)/%.lst: $(src)/%.c FORCE $(call if_changed_dep,cc_lst_c) # Compile assembler sources (.S)
@@ -229,13 +228,13 @@ $(real-objs-m:.o=.s): modkern_aflags := $(AFLAGS_MODULE) quiet_cmd_as_s_S = CPP $(quiet_modtag) $@ cmd_as_s_S = $(CPP) $(a_flags) -o $@ $< -%.s: %.S FORCE +$(obj)/%.s: $(src)/%.S FORCE $(call if_changed_dep,as_s_S) quiet_cmd_as_o_S = AS $(quiet_modtag) $@ cmd_as_o_S = $(CC) $(a_flags) -c -o $@ $< -%.o: %.S FORCE +$(obj)/%.o: $(src)/%.S FORCE $(call if_changed_dep,as_o_S) targets += $(real-objs-y) $(real-objs-m) $(lib-y)
@@ -246,7 +245,7 @@ targets += $(extra-y) $(MAKECMDGOALS) $(always) quiet_cmd_cpp_lds_S = LDS $@ cmd_cpp_lds_S = $(CPP) $(cpp_flags) -D__ASSEMBLY__ -o $@ $< -%.lds: %.lds.S FORCE +$(obj)/%.lds: $(src)/%.lds.S FORCE $(call if_changed_dep,cpp_lds_S) # Build the compiled-in targets
scripts/Makefile.host +7 -7
@@ -114,7 +114,7 @@ hostcxx_flags = -Wp,-MD,$(depfile) $(__hostcxx_flags) quiet_cmd_host-csingle = HOSTCC $@ cmd_host-csingle = $(HOSTCC) $(hostc_flags) -o $@ $< \ $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F)) -$(host-csingle): %: %.c FORCE +$(host-csingle): $(obj)/%: $(src)/%.c FORCE $(call if_changed_dep,host-csingle) # Link an executable based on list of .o files, all plain c
@@ -123,14 +123,14 @@ quiet_cmd_host-cmulti = HOSTLD $@ cmd_host-cmulti = $(HOSTCC) $(HOSTLDFLAGS) -o $@ \ $(addprefix $(obj)/,$($(@F)-objs)) \ $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F)) -$(host-cmulti): %: $(host-cobjs) $(host-cshlib) FORCE +$(host-cmulti): $(obj)/%: $(host-cobjs) $(host-cshlib) FORCE $(call if_changed,host-cmulti) # Create .o file from a single .c file # host-cobjs -> .o quiet_cmd_host-cobjs = HOSTCC $@ cmd_host-cobjs = $(HOSTCC) $(hostc_flags) -c -o $@ $< -$(host-cobjs): %.o: %.c FORCE +$(host-cobjs): $(obj)/%.o: $(src)/%.c FORCE $(call if_changed_dep,host-cobjs) # Link an executable based on list of .o files, a mixture of .c and .cc
@@ -140,20 +140,20 @@ quiet_cmd_host-cxxmulti = HOSTLD $@ $(foreach o,objs cxxobjs,\ $(addprefix $(obj)/,$($(@F)-$(o)))) \ $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F)) -$(host-cxxmulti): %: $(host-cobjs) $(host-cxxobjs) $(host-cshlib) FORCE +$(host-cxxmulti): $(obj)/%: $(host-cobjs) $(host-cxxobjs) $(host-cshlib) FORCE $(call if_changed,host-cxxmulti) # Create .o file from a single .cc (C++) file quiet_cmd_host-cxxobjs = HOSTCXX $@ cmd_host-cxxobjs = $(HOSTCXX) $(hostcxx_flags) -c -o $@ $< -$(host-cxxobjs): %.o: %.cc FORCE +$(host-cxxobjs): $(obj)/%.o: $(src)/%.cc FORCE $(call if_changed_dep,host-cxxobjs) # Compile .c file, create position independent .o file # host-cshobjs -> .o quiet_cmd_host-cshobjs = HOSTCC -fPIC $@ cmd_host-cshobjs = $(HOSTCC) $(hostc_flags) -fPIC -c -o $@ $< -$(host-cshobjs): %.o: %.c FORCE +$(host-cshobjs): $(obj)/%.o: $(src)/%.c FORCE $(call if_changed_dep,host-cshobjs) # Link a shared library, based on position independent .o files
@@ -162,7 +162,7 @@ quiet_cmd_host-cshlib = HOSTLLD -shared $@ cmd_host-cshlib = $(HOSTCC) $(HOSTLDFLAGS) -shared -o $@ \ $(addprefix $(obj)/,$($(@F:.so=-objs))) \ $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F)) -$(host-cshlib): %: $(host-cshobjs) FORCE +$(host-cshlib): $(obj)/%: $(host-cshobjs) FORCE $(call if_changed,host-cshlib) targets += $(host-csingle) $(host-cmulti) $(host-cobjs)\
Signature · 1 line
1.5.1.rc3.20.gaa453
kconfig: fix mconf segmentation fault
In reply to Sam RavnborgI have found small bug in mconf, when you run it without any argument it will sigsegv.
Without patch:
$ scripts/kconfig/mconf Segmentation fault
With patch:
$ scripts/kconfig/mconf can't find file (null)
--- scripts/kconfig/lex.zconf.c_shipped | 2 +- scripts/kconfig/zconf.l | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
scripts/kconfig/lex.zconf.c_shipped +1 -1
@@ -2264,7 +2264,7 @@ FILE *zconf_fopen(const char *name) FILE *f; f = fopen(name, "r"); - if (!f && name[0] != '/') { + if (!f && name != NULL && name[0] != '/') { env = getenv(SRCTREE); if (env) { sprintf(fullname, "%s/%s", env, name);
scripts/kconfig/zconf.l +1 -1
@@ -265,7 +265,7 @@ FILE *zconf_fopen(const char *name) FILE *f; f = fopen(name, "r"); - if (!f && name[0] != '/') { + if (!f && name != NULL && name[0] != '/') { env = getenv(SRCTREE); if (env) { sprintf(fullname, "%s/%s", env, name);
Signature · 1 line
1.5.1.rc3.20.gaa453