Re: [RFC] removing broken includes
I see it crashes very early on ;) can you report: Assertion failed: (isValid()), function getSpellingLoc, file SourceLocation.cpp, line 84. this stuff to the developers? the tool looks pretty useful On Tue, Feb 08, 2011 at 11:58:27AM +, Alexander Best wrote: > On Fri Feb 4 11, Garrett Cooper wrote: > > On Fri, Feb 4, 2011 at 10:53 PM, Roman Divacky wrote: > > > alex, > > > > > > I think you are the kind of person to try out > > > > > > http://code.google.com/p/include-what-you-use/ > > > > > > with fbsd :) > > > > Please be careful with this tool though. There's header pollution > > in them thar c files (refer to the FreeBSD and/or POSIX manpages for > > the source of truth), e.g. time.h vs sys/time.h ! > > HTH, > > here's my first attempt running [1] > > make -k CXX=/usr/local/src/llvm/Debug+Asserts/bin/include-what-you-use > CC=/usr/local/src/llvm/Debug+Asserts/bin/include-what-you-use buildkernel > > cheers. > alex > > [1] > http://people.freebsd.org/~arundel/misc/include-what-you-use-buildkernel-output > > > -Garrett > > -- > a13x > ___ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org" ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: [RFC] removing broken includes
On Fri Feb 4 11, Garrett Cooper wrote: > On Fri, Feb 4, 2011 at 10:53 PM, Roman Divacky wrote: > > alex, > > > > I think you are the kind of person to try out > > > > http://code.google.com/p/include-what-you-use/ > > > > with fbsd :) > > Please be careful with this tool though. There's header pollution > in them thar c files (refer to the FreeBSD and/or POSIX manpages for > the source of truth), e.g. time.h vs sys/time.h ! > HTH, here's my first attempt running [1] make -k CXX=/usr/local/src/llvm/Debug+Asserts/bin/include-what-you-use CC=/usr/local/src/llvm/Debug+Asserts/bin/include-what-you-use buildkernel cheers. alex [1] http://people.freebsd.org/~arundel/misc/include-what-you-use-buildkernel-output > -Garrett -- a13x ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: [RFC] removing broken includes
On Sat Feb 5 11, Giorgos Keramidas wrote: > On Fri, 4 Feb 2011 20:19:48 +, Alexander Best wrote: > >On Fri Feb 4 11, John Baldwin wrote: > >>On Thursday, February 03, 2011 5:12:57 pm 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: > >> > >> The sys/conf/files fix should definitely go in. > > > > as a side note: while checking the tinderbox output i saw a few gas related > > warnings, which complained about VCS IDs being spammed to object files. > > Maybe it's intentional for these objects to _have_ the VCS id in them, > like some of the "@(#)" strings that are passed down to the ELF binary. > > This sort of object data is often used to determine what bits have gone > into the binary, so we should check if they are intentional before > ifdef'ing them all out. > > % Index: sbin/routed/rtquery/rtquery.c > % === > % --- sbin/routed/rtquery/rtquery.c (revision 218217) > % +++ sbin/routed/rtquery/rtquery.c (working copy) > % @@ -49,6 +49,7 @@ > % #include > % #endif > % > % +#if 0 > % #define UNUSED __attribute__((unused)) > % #ifndef __RCSID > % #define __RCSID(_s) static const char rcsid[] UNUSED = _s > % @@ -67,6 +68,7 @@ > % __RCSID("$Revision: 2.26 $"); > % #ident "$Revision: 2.26 $" > % #endif > % +#endif > > We can avoid this by building rtquery.c with -D NO__RCSID. See below > for the same trick about lukemftpd... > > % #ifndef sgi > % #define _HAVE_SIN_LEN > % Index: contrib/lukemftp/src/main.c > % === > % --- contrib/lukemftp/src/main.c (revision 218217) > % +++ contrib/lukemftp/src/main.c (working copy) > % @@ -96,8 +96,10 @@ > % > % #include > % #ifndef lint > % +#if 0 > % __COPYRIGHT("@(#) Copyright (c) 1985, 1989, 1993, 1994\n\ > % The Regents of the University of California. All rights > reserved.\n"); > % +#endif > % #endif /* not lint */ > > This looks 'harmless' to include in the resulting binary, but maybe we > should just define NO_COPYRIGHT while building lukemftp? This will > disable the spamming of the object code with the static string and we > don't have to modify vendor code at all. > > So, how about this instead? i've compared the VCS info in main.c in the freebsd repository with the newest vendor release: FreeBSD: --- #include #ifndef lint __COPYRIGHT("@(#) Copyright (c) 1985, 1989, 1993, 1994\n\ The Regents of the University of California. All rights reserved.\n"); #endif /* not lint */ #ifndef lint #if 0 static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 10/9/94"; #else __RCSID("$NetBSD: main.c,v 1.94 2005/05/13 05:03:49 lukem Exp $"); #endif #endif /* not lint */ VENDOR: -- #if 0 /* tnftp */ #include #ifndef lint __COPYRIGHT("@(#) Copyright (c) 1985, 1989, 1993, 1994\ The Regents of the University of California. All rights reserved.\ Copyright 1996-2008 The NetBSD Foundation, Inc. All rights reserved"); #endif /* not lint */ #ifndef lint #if 0 static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 10/9/94"; #else __RCSID(" NetBSD: main.c,v 1.117 2009/07/13 19:05:41 roy Exp "); #endif #endif /* not lint */ /* * FTP User Program -- Command Interface. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #endif /* tnftp */ ... so it seems having the cvs data in object files isn't essential. however leaving the source files for lukemftp and rtquery the way they are and adding the -D options in order to prevent object spamming is fine for me too. :) > > % diff -r bd0305f6cb2b libexec/lukemftpd/Makefile > % --- a/libexec/lukemftpd/MakefileSat Feb 05 02:39:55 2011 +0100 > % +++ b/libexec/lukemftpd/MakefileSat Feb 05 22:28:12 2011 +0100 > % @@ -13,6 +13,7 @@ SRCS= cmds.c conf.c ftpd.c ftpcmd.y pope > % SRCS+= strsuftoll.c > % > % WFORMAT= 0 > % +CFLAGS+= -DNO_COPYRIGHT > % > % .if ${MK_INET6_SUPPORT} != "no" > % CFLAGS+= -DINET6 > > > also i noticed a lot of these warnings: > > > > usr/subversion-src/lib/libc/i386/string/memcpy.S:7: Warning: ignoring > > incorrect section type for .note.GNU-stack > > > > i think i've seen some recent commits dealing with that new section. > > That looks like something more useful to fix now, rather than later. ...already fixed by kib in r218303 and r218305. cheers. alex -- a13x ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: [RFC] removing broken includes
On Fri, 4 Feb 2011 20:19:48 +, Alexander Best wrote: >On Fri Feb 4 11, John Baldwin wrote: >>On Thursday, February 03, 2011 5:12:57 pm 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: >> >> The sys/conf/files fix should definitely go in. > > as a side note: while checking the tinderbox output i saw a few gas related > warnings, which complained about VCS IDs being spammed to object files. Maybe it's intentional for these objects to _have_ the VCS id in them, like some of the "@(#)" strings that are passed down to the ELF binary. This sort of object data is often used to determine what bits have gone into the binary, so we should check if they are intentional before ifdef'ing them all out. % Index: sbin/routed/rtquery/rtquery.c % === % --- sbin/routed/rtquery/rtquery.c (revision 218217) % +++ sbin/routed/rtquery/rtquery.c (working copy) % @@ -49,6 +49,7 @@ % #include % #endif % % +#if 0 % #define UNUSED __attribute__((unused)) % #ifndef __RCSID % #define __RCSID(_s) static const char rcsid[] UNUSED = _s % @@ -67,6 +68,7 @@ % __RCSID("$Revision: 2.26 $"); % #ident "$Revision: 2.26 $" % #endif % +#endif We can avoid this by building rtquery.c with -D NO__RCSID. See below for the same trick about lukemftpd... % #ifndef sgi % #define _HAVE_SIN_LEN % Index: contrib/lukemftp/src/main.c % === % --- contrib/lukemftp/src/main.c (revision 218217) % +++ contrib/lukemftp/src/main.c (working copy) % @@ -96,8 +96,10 @@ % % #include % #ifndef lint % +#if 0 % __COPYRIGHT("@(#) Copyright (c) 1985, 1989, 1993, 1994\n\ % The Regents of the University of California. All rights reserved.\n"); % +#endif % #endif /* not lint */ This looks 'harmless' to include in the resulting binary, but maybe we should just define NO_COPYRIGHT while building lukemftp? This will disable the spamming of the object code with the static string and we don't have to modify vendor code at all. So, how about this instead? % diff -r bd0305f6cb2b libexec/lukemftpd/Makefile % --- a/libexec/lukemftpd/MakefileSat Feb 05 02:39:55 2011 +0100 % +++ b/libexec/lukemftpd/MakefileSat Feb 05 22:28:12 2011 +0100 % @@ -13,6 +13,7 @@ SRCS= cmds.c conf.c ftpd.c ftpcmd.y pope % SRCS+= strsuftoll.c % % WFORMAT= 0 % +CFLAGS+= -DNO_COPYRIGHT % % .if ${MK_INET6_SUPPORT} != "no" % CFLAGS+= -DINET6 > also i noticed a lot of these warnings: > > usr/subversion-src/lib/libc/i386/string/memcpy.S:7: Warning: ignoring > incorrect section type for .note.GNU-stack > > i think i've seen some recent commits dealing with that new section. That looks like something more useful to fix now, rather than later. ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: [RFC] removing broken includes
On Fri Feb 4 11, John Baldwin wrote: > On Thursday, February 03, 2011 5:12:57 pm 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: > > The sys/conf/files fix should definitely go in. after sys/modules/netgraph/atm/ccatm/Makefile has been fixed, maybe we could extend the warnings at least for the kernel. that way new commits would need to make sure that no broken includes are being added to the src. any thoughts on this patch? cheers. alex ps: -W was renamed to -Werrer. see the gcc(1) manual page. > > -- > John Baldwin -- a13x Index: sys/conf/kern.mk === --- sys/conf/kern.mk(revision 218319) +++ sys/conf/kern.mk(working copy) @@ -3,7 +3,7 @@ # # Warning flags for compiling the kernel and components of the kernel. # -# Note that the newly added -Wcast-qual is responsible for generating +# Note that the newly added -Wcast-qual is responsible for generating # most of the remaining warnings. Warnings introduced with -Wall will # also pop up, but are easier to fix. .if ${CC:T:Micc} == "icc" @@ -12,17 +12,18 @@ .else CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \ -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \ - -Wundef -Wno-pointer-sign -fformat-extensions + -Wundef -Wno-pointer-sign -fformat-extensions \ + -Wmissing-include-dirs .endif # # The following flags are next up for working on: -# -W +# -Wextra # # On the i386, do not align the stack to 16-byte boundaries. Otherwise GCC # 2.95 adds code to the entry and exit point of every function to align the # stack to 16-byte boundaries -- thus wasting approximately 12 bytes of stack -# per function call. While the 16-byte alignment may benefit micro benchmarks, +# per function call. While the 16-byte alignment may benefit micro benchmarks, # it is probably an overall loss as it makes the code bigger (less efficient # use of code cache tag lines) and uses more stack (less efficient use of data # cache tag lines). Explicitly prohibit the use of SSE and other SIMD ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: [RFC] removing broken includes
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 +, 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@ 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) > > @@ -960,7 +960,7 @@ > > dev/e1000/e1000_82571.coptional em | igb \ > > compile-with "${NORMAL_C} -I$S/dev/e1000" > > dev/e1000/e1000_82575.coptional 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) > > @@ -12,6 +12,6 @@ > > 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 > > > ___ > > freebsd-current@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-current > > To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org" -- a13x ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: [RFC] removing broken includes
On Fri, Feb 4, 2011 at 10:53 PM, Roman Divacky wrote: > alex, > > I think you are the kind of person to try out > > http://code.google.com/p/include-what-you-use/ > > with fbsd :) Please be careful with this tool though. There's header pollution in them thar c files (refer to the FreeBSD and/or POSIX manpages for the source of truth), e.g. time.h vs sys/time.h ! HTH, -Garrett ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: [RFC] removing broken includes
alex, I think you are the kind of person to try out http://code.google.com/p/include-what-you-use/ with fbsd :) On Thu, Feb 03, 2011 at 10:12:57PM +, 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@ 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) > @@ -960,7 +960,7 @@ > 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.coptional em | igb \ > compile-with "${NORMAL_C} -I$S/dev/e1000" > dev/e1000/e1000_api.coptional 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) > @@ -12,6 +12,6 @@ > 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 > ___ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org" ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: [RFC] removing broken includes
On Fri Feb 4 11, John Baldwin wrote: > On Thursday, February 03, 2011 5:12:57 pm 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: > > The sys/conf/files fix should definitely go in. as a side note: while checking the tinderbox output i saw a few gas related warnings, which complained about VCS IDs being spammed to object files. the following patch should take care of those cases (at least for archs amd64 and i386). also i noticed a lot of these warnings: usr/subversion-src/lib/libc/i386/string/memcpy.S:7: Warning: ignoring incorrect section type for .note.GNU-stack i think i've seen some recent commits dealing with that new section. cheers. alex > > -- > John Baldwin -- a13x Index: sbin/routed/rtquery/rtquery.c === --- sbin/routed/rtquery/rtquery.c (revision 218217) +++ sbin/routed/rtquery/rtquery.c (working copy) @@ -49,6 +49,7 @@ #include #endif +#if 0 #define UNUSED __attribute__((unused)) #ifndef __RCSID #define __RCSID(_s) static const char rcsid[] UNUSED = _s @@ -67,6 +68,7 @@ __RCSID("$Revision: 2.26 $"); #ident "$Revision: 2.26 $" #endif +#endif #ifndef sgi #define _HAVE_SIN_LEN Index: contrib/lukemftp/src/main.c === --- contrib/lukemftp/src/main.c (revision 218217) +++ contrib/lukemftp/src/main.c (working copy) @@ -96,8 +96,10 @@ #include #ifndef lint +#if 0 __COPYRIGHT("@(#) Copyright (c) 1985, 1989, 1993, 1994\n\ The Regents of the University of California. All rights reserved.\n"); +#endif #endif /* not lint */ #ifndef lint ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: [RFC] removing broken includes
On Fri Feb 4 11, John Baldwin wrote: > On Thursday, February 03, 2011 5:12:57 pm 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: > > The sys/conf/files fix should definitely go in. thanks for the comment. since i don't have src commit rights: please anybody feel free to commit the patch or parts of it. cheers. alex > > -- > John Baldwin -- a13x ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: [RFC] removing broken includes
On Thursday, February 03, 2011 5:12:57 pm 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: The sys/conf/files fix should definitely go in. -- John Baldwin ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: [RFC] removing broken includes
On Thu Feb 3 11, 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@ for the info. with the patch i submitted in the previous message arch=i386 reported no extra broken dirs. i'll put the other archs on hold, until this thread triggers more attention. no point in dedicating more time, if nothing comes out of it. ;) cheers. alex > > 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) > @@ -960,7 +960,7 @@ > 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.coptional em | igb \ > compile-with "${NORMAL_C} -I$S/dev/e1000" > dev/e1000/e1000_api.coptional 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) > @@ -12,6 +12,6 @@ > 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 -- a13x ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
[RFC] removing broken includes
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@ 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) @@ -960,7 +960,7 @@ dev/e1000/e1000_82571.coptional em | igb \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_82575.coptional 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) @@ -12,6 +12,6 @@ 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 ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"