From owner-freebsd-arch@freebsd.org Mon Apr 30 16:36:07 2018 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 531C3FB00FB for ; Mon, 30 Apr 2018 16:36:07 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id E345A6AAED for ; Mon, 30 Apr 2018 16:36:06 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id A71E4FB00F9; Mon, 30 Apr 2018 16:36:06 +0000 (UTC) Delivered-To: arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94F38FB00F8 for ; Mon, 30 Apr 2018 16:36:06 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from smtp.freebsd.org (unknown [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 472D96AAD5; Mon, 30 Apr 2018 16:36:06 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (ralph.baldwin.cx [66.234.199.215]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 21BEA21FC8; Mon, 30 Apr 2018 16:36:06 +0000 (UTC) (envelope-from jhb@freebsd.org) From: John Baldwin To: Warner Losh Cc: "freebsd-arch@freebsd.org" Subject: Re: LIBC_SCCS Date: Mon, 30 Apr 2018 08:28:24 -0700 Message-ID: <10594521.E4XjG3cQAG@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: References: <1711113.VelFtdTVS7@ralph.baldwin.cx> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2018 16:36:07 -0000 On Friday, April 27, 2018 05:36:56 PM Warner Losh wrote: > On Fri, Apr 27, 2018 at 4:19 PM, John Baldwin wrote: > > > I suspect no one cares, but for whatever reason our current handling of the > > LIBC_SCCS macro in some of our libraries annoys me. In theory it seems > > like > > LIBC_SCCS's purpose is to control whether or not old SCCS IDs from Berkeley > > are included in libc's sources when libc is built. (Similar to how macros > > control the behavior of __FBSDID().) However, we use an odd construct in > > the tree. First, we define LIBC_SCCS by default in the CFLAGS of various > > libraries (libkvm, libutil, libthr, libc, etc.) which in theory would > > enable > > the IDs, but then we explicitly wrap them in #if 0, e.g.: > > > > #if defined(LIBC_SCCS) && !defined(lint) > > #if 0 > > static char sccsid[] = "@(#)kvm_hp300.c 8.1 (Berkeley) 6/4/93"; > > #endif > > #endif /* LIBC_SCCS and not lint */ > > > > I'd rather that we make LIBC_SCCS actually work by removing the #if 0 (and > > perhaps the lint baggage) but then remove it from the default CFLAGS to > > preserve the existing behavior by default. Does anyone else care if I do > > this? > > > > I'm cool with it. Why not do __SCCS_ID( "@(#)kvm_hp300.c 8.1 (Berkeley) > 6/4/93");? I probably would use that, though perhaps still wrapped in the #ifdef so we don't enable them by default as __SCCS_ID is enabled by default. Alternatively we could drop LIBC_SCCS entirely and define NO__SCCSID by default for the affected libraries? > I don't know if we need a separate #ifdef for each SCCS_ID subtree in our > build. Either it's there, or it's not. Default: not. It would also let us > put them in separate sections ala our freebsd id macros. > > I'm slightly against removing it altogether, though I can see a good case > for it. I have a visceral reaction that puts me in the 'against complete > removal' camp, but only just. I probably lean towards not outright removing them, but I don't feel too strongly. -- John Baldwin