Re: [PATCH] modpost: allow modpost to fail on warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2016-02-17 23:25, Filipe Brandenburger wrote:
> Set KBUILD_MODPOST_FAIL_ON_WARNINGS to a non-empty value to make the
> kbuild fail when modpost generates any warnings.
> 
> Tested:
>   Replaced ntp_clear() with ntp_init() in kernel/time/timekeeping.c,
>   which produces a modpost warning since the latter is marked __init.
>   Confirmed that the build failed with a hard error.
> 
>   $ make bzImage modules KBUILD_MODPOST_FAIL_ON_WARNINGS=1
>     CHK     include/config/kernel.release
>     CHK     include/generated/uapi/linux/version.h
>     CHK     include/generated/utsrelease.h
>     CHK     include/generated/bounds.h
>     CHK     include/generated/timeconst.h
>     CHK     include/generated/asm-offsets.h
>     CALL    scripts/checksyscalls.sh
>     CHK     include/generated/compile.h
>     CC      kernel/time/timekeeping.o
>     LD      kernel/time/built-in.o
>     LD      kernel/built-in.o
>     LINK    vmlinux
>     LD      vmlinux.o
>     MODPOST vmlinux.o
>   WARNING: modpost: Found 1 section mismatch(es).
>   To see full details build your kernel with:
>   'make CONFIG_DEBUG_SECTION_MISMATCH=y'
>   scripts/Makefile.modpost:100: recipe for target 'vmlinux.o' failed
>   make[1]: *** [vmlinux.o] Error 2
>   Makefile:936: recipe for target 'vmlinux' failed
>   make: *** [vmlinux] Error 2

This is not a good test case, because we already fail here if
CONFIG_SECTION_MISMATCH_WARN_ONLY=n.

Michal
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux