Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: [ANALYSED] kernel object compilation failure unnoticed ?
On Fri, Mar 05, 2010 at 04:54:29PM +0100, Nicolas Joly wrote:
> On Fri, Mar 05, 2010 at 12:31:11AM +0100, Nicolas Joly wrote:
[...]
> I found the problem in latest Makefile.kern.inc revision which adds
> CTF support ... especially with NORMAL_C variable definition.
[...]
> # 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.
Ok. Attached the patch i'm currently testing ... and plan to commit
later today.
--
Nicolas Joly
Biological Software and Databanks.
Institut Pasteur, Paris.
Index: sys/conf/Makefile.kern.inc
===================================================================
RCS file: /cvsroot/src/sys/conf/Makefile.kern.inc,v
retrieving revision 1.126
diff -u -p -r1.126 Makefile.kern.inc
--- sys/conf/Makefile.kern.inc 1 Mar 2010 21:10:14 -0000 1.126
+++ sys/conf/Makefile.kern.inc 5 Mar 2010 19:11:13 -0000
@@ -123,7 +123,7 @@ COPTS.debugsyms.c+= -g
# Add CTF sections for DTrace
.if defined(CTFCONVERT)
COMPILE_CTFCONVERT= ${_MKSHECHO}\
- ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}; \
+ ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \
${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
.else
COMPILE_CTFCONVERT= ${_MKSHECHO}
@@ -131,19 +131,19 @@ COMPILE_CTFCONVERT= ${_MKSHECHO}
# 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}"; \
+NORMAL_C?= @${_MKSHMSG} "compile ${.CURDIR:T}/${.TARGET}" && \
${_MKSHECHO}\
- ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<; \
- ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<; \
+ ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $< && \
+ ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $< && \
${COMPILE_CTFCONVERT}
-NOPROF_C?= @${_MKSHMSG} "compile ${.CURDIR:T}/${.TARGET}"; \
+NOPROF_C?= @${_MKSHMSG} "compile ${.CURDIR:T}/${.TARGET}" && \
${_MKSHECHO}\
- ${CC} ${CFLAGS} ${CPPFLAGS} -c $<; \
- ${CC} ${CFLAGS} ${CPPFLAGS} -c $<; \
+ ${CC} ${CFLAGS} ${CPPFLAGS} -c $< && \
+ ${CC} ${CFLAGS} ${CPPFLAGS} -c $< && \
${COMPILE_CTFCONVERT}
-NORMAL_S?= @${_MKSHMSG} "compile ${.CURDIR:T}/${.TARGET}"; \
+NORMAL_S?= @${_MKSHMSG} "compile ${.CURDIR:T}/${.TARGET}" && \
${_MKSHECHO}\
- ${CC} ${AFLAGS} ${CPPFLAGS} -c $<; \
+ ${CC} ${AFLAGS} ${CPPFLAGS} -c $< && \
${CC} ${AFLAGS} ${CPPFLAGS} -c $<
##
Home |
Main Index |
Thread Index |
Old Index