Re: [RFC] removing broken includes

From: Alexander Best <arundel_at_freebsd.org>
Date: Sat, 5 Feb 2011 12:48:26 +0000
On Sat Feb  5 11, Roman Divacky wrote:
> alex,
> 
> I think you are the kind of person to try out
> 
> http://code.google.com/p/include-what-you-use/

thanks. this is the first time i hear of this project. i'll try to get it up
and running.

> 
> with fbsd :) 
> 
> On Thu, Feb 03, 2011 at 10:12:57PM +0000, Alexander Best wrote:
> > hi everybody,
> > 
> > i've started to check the source for broken includes, such as the one fixed in
> > r218189. so far i've run through arch=amd64 and found only two broken includes,
> > which should be fixed by the attached patch. the commands i'm using are:
> > 
> > for target=buildkernel:
> > make SRCCONF=/dev/null __MAKE_CONF=/dev/null NO_WARNS= CWARNFLAGS="-w -Werror -Wmissing-include-dirs" buildkernel
> > 
> > for target=buildworld:[*]
> > make SRCCONF=/dev/null __MAKE_CONF=/dev/null WITHOUT_CDDL=true NO_WARNS= CWARNFLAGS="-w -Wmissing-include-dirs" buildworld
> > 
> > next up are the other archs. also i'll try to run both buildworld and
> > installworld with "CC=clang -v" and "CXX=clang++ -v". although clang turns
> > -Wmissing-include-dirs into a noop, using the -v flag one can still detect
> > broken (and even duplicate) includes. thanks to pluknet_at_ for the info.
> > 
> > cheers.
> > alex
> > 
> > [*] the reason i'm setting WITHOUT_CDDL=true is that my installed world was
> > compiled with that option. trying to buildworld with CDDL support thus fails.
> > also at first i was trying to use the same command for buildworld, as i used
> > for buildkernel. however it seems CWARNFLAGS gets set in some places, so gcc(1)
> > will also treat non -Wmissing-include-dirs warnings as errors.
> > 
> > -- 
> > a13x
> 
> > Index: sys/conf/files
> > ===================================================================
> > --- sys/conf/files	(revision 218217)
> > +++ sys/conf/files	(working copy)
> > _at__at_ -960,7 +960,7 _at__at_
> >  dev/e1000/e1000_82571.c		optional em | igb \
> >  	compile-with "${NORMAL_C} -I$S/dev/e1000"
> >  dev/e1000/e1000_82575.c		optional em | igb \
> > -	 compile-with "${NORMAL_C} -I$S/dev/igb"
> > +	compile-with "${NORMAL_C} -I$S/dev/e1000"
> >  dev/e1000/e1000_ich8lan.c	optional em | igb \
> >  	compile-with "${NORMAL_C} -I$S/dev/e1000"
> >  dev/e1000/e1000_api.c		optional em | igb \
> > Index: sys/modules/netgraph/atm/ccatm/Makefile
> > ===================================================================
> > --- sys/modules/netgraph/atm/ccatm/Makefile	(revision 218217)
> > +++ sys/modules/netgraph/atm/ccatm/Makefile	(working copy)
> > _at__at_ -12,6 +12,6 _at__at_
> >  SRCS=	ng_ccatm.c cc_conn.c cc_data.c cc_dump.c cc_port.c cc_sig.c	\
> >  	cc_user.c unisap.c
> >  
> > -CFLAGS+= -I${LIBBASE} -I${LIBBASE}/netnatm/ccatm -DCCATM_DEBUG
> > +CFLAGS+= -I${LIBBASE} -DCCATM_DEBUG
> >  
> >  .include <bsd.kmod.mk>
> 
> > _______________________________________________
> > freebsd-current_at_freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-current
> > To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org"

-- 
a13x
Received on Sat Feb 05 2011 - 11:48:26 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:11 UTC