Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[ANALYSED] kernel object compilation failure unnoticed ?
On Fri, Mar 05, 2010 at 12:31:11AM +0100, Nicolas Joly wrote:
>
> Hi,
>
> I updated my sources while the acpi_button.c file was broken (missing
> semi-column in r1.32, which was fixed soon after).
>
> I then wanted to compile my own kernel, which succeeded. The
> acpi_button.c compilation failed, but the old object remained and
> kernel link was ok.
>
> Do anyone else do see such surprising behaviour, where kernel object
> file compilation failure remains unnoticed ?
I found the problem in latest Makefile.kern.inc revision which adds
CTF support ... especially with NORMAL_C variable definition.
[...]
# Add CTF sections for DTrace
.if defined(CTFCONVERT)
COMPILE_CTFCONVERT= ${_MKSHECHO}\
${CTFCONVERT} ${CTFFLAGS} ${.TARGET}; \
${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
.else
COMPILE_CTFCONVERT= ${_MKSHECHO}
.endif
# compile rules: rules are named ${TYPE}_${SUFFIX} where TYPE is NORMAL or
# NOPROF and SUFFIX is the file suffix, capitalized (e.g. C for a .c file).
NORMAL_C?= @${_MKSHMSG} "compile ${.CURDIR:T}/${.TARGET}"; \
${_MKSHECHO}\
${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<; \
${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<; \
${COMPILE_CTFCONVERT}
[...]
With COMPILE_CTFCONVERT addition, which in my case is a simple echo,
the compilation command exit status is discarded and echo result will
be used instead.
While the `;' could be replaced with `&&' construct; i wonder if there
is a better way to solve this, avoiding awful `a && b && c && d ...'
lines.
Thanks.
--
Nicolas Joly
Biological Software and Databanks.
Institut Pasteur, Paris.
Home |
Main Index |
Thread Index |
Old Index