• Kai Germaschewski's avatar
    kbuild: Generate modversions only for selected objects · d84e208a
    Kai Germaschewski authored
    Up to now, we generated module versions for all objects which
    were listed in $(export-objs).
    
    This had one advantage: A changed .config will not affect which
    .ver files are built, thus saving recompiles.
    
    However, it is fundamentally broken. To build .ver files, we preprocess
    the exporting sources - and the result can obviously depend on
    the current .config. Even worse, some files generate errors when
    preprocessed with the wrong .config - it doesn't matter a lot that
    drivers/sbus/* will generate errors on x86, since it won't be used anyway,
    but e.g. kernel/suspend.c cannot be preprocessed unless 
    CONFIG_SOFTWARE_SUSPEND is set. - Up to now, we just silently ignore
    these errors.
    
    Actually, the whole point behind CONFIG_MODVERSIONS is to make sure
    we don't insert modules into a kernel which was configured differently,
    and as such the generation of symbols can only work when .config is
    known.
    
    So we now only generate symbols for objects which will actually be
    compiled - which means less work, and enforce the kernel to be configured
    before "make dep".
    d84e208a
Makefile 20.6 KB