From owner-freebsd-current@FreeBSD.ORG Sun Feb 6 23:41:57 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id AE80B106566C; Sun, 6 Feb 2011 23:41:57 +0000 (UTC) Date: Sun, 6 Feb 2011 23:41:57 +0000 From: Alexander Best To: Giorgos Keramidas Message-ID: <20110206234157.GB94887@freebsd.org> References: <20110203221257.GA76849@freebsd.org> <201102040756.12109.jhb@freebsd.org> <20110204201948.GA27893@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Cc: freebsd-current@freebsd.org Subject: Re: [RFC] removing broken includes X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Feb 2011 23:41:57 -0000 On Sat Feb 5 11, Giorgos Keramidas wrote: > On Fri, 4 Feb 2011 20:19:48 +0000, 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/Makefile Sat Feb 05 02:39:55 2011 +0100 > % +++ b/libexec/lukemftpd/Makefile Sat 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