Skip to contentSkip to conversation

xen/Kconfig: Use olddefconfig not silentoldconfig to update .config

RFC PATCH In review Ian Campbell 2 participants 4 messages Jan 15, 2016

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 xen/Kconfig: Use olddefconfig not silentoldconfig to update .config

RFC RFC RFC RFC RFC RFC RFC RFC RFC RFC RFC
BECAUSE THIS BREAKS CLEAN BUILDS WITH:
In file included from <command-line>:0:0:
/local/scratch/ianc/devel/arm/xen.git/xen/include/xen/config.h:10:32: fatal error: generated/autoconf.h: No such file or directory
#include <generated/autoconf.h>

I'm not sure why given the descriptions of olddefconfig and silentoldconfig below.

DO NOT APPLY (OF COURSE!)

RFC RFC RFC RFC RFC RFC RFC RFC RFC RFC RFC

When pulling my git tree over a commit which adds new Kconfig questions the incremental build still stops and asks me the new questions:

+ make -C xen XEN_TARGET_ARCH=arm64 DESTDIR=/tmp/tmprg7d63 debug=y CROSS_COMPILE=aarch64-linux-gnu- -j12 CONFIG_EARLY_PRINTK=fastmodel install
make: Entering directory '/local/scratch/ianc/devel/arm/xen.git/xen'
make -f /local/scratch/ianc/devel/arm/xen.git/xen/tools/kconfig/Makefile.kconfig ARCH=arm64 silentoldconfig make[1]: Entering directory '/local/scratch/ianc/devel/arm/xen.git/xen'
gcc -Wp,-MD,tools/kconfig/.conf.o.d -I/usr/include/ncursesw -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE -c -o tools/kconfig/conf.o tools/kconfig/conf.c
gcc -Wp,-MD,tools/kconfig/.zconf.tab.o.d -I/usr/include/ncursesw -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE -Itools/kconfig -c -o tools/kconfig/zconf.tab.o tools/kconfig/zconf.tab.c
gcc -o tools/kconfig/conf tools/kconfig/conf.o tools/kconfig/zconf.tab.o tools/kconfig/conf -s --silentoldconfig Kconfig
*
* Restart config...
*
*
* Architecture Features
*
Maximum number of physical CPUs (NR_CPUS) [128] (NEW)

This is in contrast to a fully clean build which just gets on with using the defconfig. According to "make -C xen/tools/kconfig/ help" it seems like we want olddefconfig rather than silentoldconfig:

oldconfig - Update current config utilising a provided .config as base
[...]
silentoldconfig - Same as oldconfig, but quietly, additionally update deps
[...]
olddefconfig - Same as silentoldconfig but sets new symbols to their
default value

With this changed it now doesn't ask me any questions on an incremental build when a new question is added.

Note however that AFAICT in no case would this pickup a change to the default of an existing option (how could it know?). I think we can live with this.

Cc Doug Goldstein <[email protected]>
---
 xen/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/Makefile +1 -1
index 3699b20..f8f3bb4 100644
@@ -239,7 +239,7 @@ $(kconfig):
 	$(MAKE) -f $(BASEDIR)/tools/kconfig/Makefile.kconfig ARCH=$(XEN_TARGET_ARCH) $@
 
 include/config/%.conf: include/config/auto.conf.cmd $(KCONFIG_CONFIG)
-	$(Q)$(MAKE) -f $(BASEDIR)/tools/kconfig/Makefile.kconfig ARCH=$(XEN_TARGET_ARCH) silentoldconfig
+	$(Q)$(MAKE) -f $(BASEDIR)/tools/kconfig/Makefile.kconfig ARCH=$(XEN_TARGET_ARCH) olddefconfig
 
 # Allow people to just run `make` as before and not force them to configure
 $(KCONFIG_CONFIG):
Signature · 1 line
2.1.4
#1 lore raw
Quoted 9 lines · Ian Campbell

RFC RFC RFC RFC RFC RFC RFC RFC RFC RFC RFC
BECAUSE THIS BREAKS CLEAN BUILDS WITH:
In file included from <command-line>:0:0:
/local/scratch/ianc/devel/arm/xen.git/xen/include/xen/config.h:10:32:
fatal error: generated/autoconf.h: No such file or directory #include <generated/autoconf.h>

I'm not sure why given the descriptions of olddefconfig and silentoldconfig below.

xen/tools/kconfig/Makefile holds the answer...

    silentoldconfig: $(obj)/conf
    	    $(Q)mkdir -p include/config include/generated
    	    $< $(silent) --$@ $(Kconfig)

vs for olddefconfig (which is in $(simple-targets)):

    $(simple-targets): $(obj)/conf
    	    $< $(silent) --$@ $(Kconfig)

However the (seemingly) obvious answer of:

    diff --git a/xen/Makefile b/xen/Makefile
    index f8f3bb4..2422ba8 100644
    --- a/xen/Makefile
    +++ b/xen/Makefile
    @@ -239,6 +239,7 @@ $(kconfig):
            $(MAKE) -f $(BASEDIR)/tools/kconfig/Makefile.kconfig ARCH=$(XEN_TARGET_ARCH) $@
     
     include/config/%.conf: include/config/auto.conf.cmd $(KCONFIG_CONFIG)
    +       $(Q)mkdir -p include/config include/generated
            $(Q)$(MAKE) -f $(BASEDIR)/tools/kconfig/Makefile.kconfig ARCH=$(XEN_TARGET_ARCH) olddefconfig
     
     # Allow people to just run `make` as before and not force them to configure

Doesn't help, so I suppose there must be an actual semantic difference in $(obj)/conf for these two options.

So I'm not sure what to do now.

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#2 lore raw
Quoted 41 lines · Ian Campbell
Quoted 9 lines · Ian Campbell

RFC RFC RFC RFC RFC RFC RFC RFC RFC RFC RFC
BECAUSE THIS BREAKS CLEAN BUILDS WITH:
In file included from <command-line>:0:0:
/local/scratch/ianc/devel/arm/xen.git/xen/include/xen/config.h:10:32:
fatal error: generated/autoconf.h: No such file or directory #include <generated/autoconf.h>

I'm not sure why given the descriptions of olddefconfig and silentoldconfig below.

xen/tools/kconfig/Makefile holds the answer...

    silentoldconfig: $(obj)/conf
         $(Q)mkdir -p include/config include/generated $< $(silent) --$@ $(Kconfig)

vs for olddefconfig (which is in $(simple-targets)):

    $(simple-targets): $(obj)/conf
         $< $(silent) --$@ $(Kconfig)

However the (seemingly) obvious answer of:

    diff --git a/xen/Makefile b/xen/Makefile
    index f8f3bb4..2422ba8 100644
    --- a/xen/Makefile
    +++ b/xen/Makefile
    @@ -239,6 +239,7 @@ $(kconfig):
            $(MAKE) -f $(BASEDIR)/tools/kconfig/Makefile.kconfig ARCH=$(XEN_TARGET_ARCH) $@

     include/config/%.conf: include/config/auto.conf.cmd $(KCONFIG_CONFIG)
    +       $(Q)mkdir -p include/config include/generated $(Q)$(MAKE) -f $(BASEDIR)/tools/kconfig/Makefile.kconfig ARCH=$(XEN_TARGET_ARCH) olddefconfig

     # Allow people to just run make as before and not force them to configure

Quoted 4 lines

Doesn't help, so I suppose there must be an actual semantic difference in $(obj)/conf for these two options.

So I'm not sure what to do now.

There is indeed a difference on conf.c, only silentoldconfig sets sync_kconfig.

Running olddefconfig and then silentoldconfig seems to work, but ewww...

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#3 lore raw
In reply to Ian Campbell
Quoted 11 lines
Quoted 1 line
Quoted 1 line · On 15.01.16 at 15:48, <[email protected]> wrote:

RFC RFC RFC RFC RFC RFC RFC RFC RFC RFC RFC
BECAUSE THIS BREAKS CLEAN BUILDS WITH:
In file included from <command-line>:0:0:
/local/scratch/ianc/devel/arm/xen.git/xen/include/xen/config.h:10:32: fatal
error: generated/autoconf.h: No such file or directory
#include <generated/autoconf.h>

I'm not sure why given the descriptions of olddefconfig and silentoldconfig below.

Quoted 7 lines

DO NOT APPLY (OF COURSE!)

RFC RFC RFC RFC RFC RFC RFC RFC RFC RFC RFC

When pulling my git tree over a commit which adds new Kconfig questions the incremental build still stops and asks me the new questions:

To be honest so far I was viewing this as intended and desirable behavior. Now that you mention it I can see why the one you'd prefer would also make sense (albeit I'm not sure now which one is the better one).

As to the odd difference in behavior - I have no idea (i.e. would need to try this out and perhaps debug it, but since you're on it I guess I'll leave it to you).

Jan