Thread (2 messages) 2 messages, 2 authors, 2016-02-18

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

From: Michal Marek <hidden>
Date: 2016-02-18 10:36:36

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help