From owner-freebsd-arch@freebsd.org Fri Apr 27 23:45:48 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 02561FB4971 for ; Fri, 27 Apr 2018 23:45:48 +0000 (UTC) (envelope-from mike@karels.net) 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 908E37C97A for ; Fri, 27 Apr 2018 23:45:47 +0000 (UTC) (envelope-from mike@karels.net) Received: by mailman.ysv.freebsd.org (Postfix) id 47125FB4970; Fri, 27 Apr 2018 23:45:47 +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 343D5FB496F for ; Fri, 27 Apr 2018 23:45:47 +0000 (UTC) (envelope-from mike@karels.net) Received: from mail.karels.net (mail.karels.net [216.160.39.52]) by mx1.freebsd.org (Postfix) with ESMTP id A70777C978; Fri, 27 Apr 2018 23:45:46 +0000 (UTC) (envelope-from mike@karels.net) Received: from mail.karels.net (localhost [127.0.0.1]) by mail.karels.net (8.15.2/8.15.2) with ESMTP id w3RNNksd002470; Fri, 27 Apr 2018 18:23:47 -0500 (CDT) (envelope-from mike@karels.net) Message-Id: <201804272323.w3RNNksd002470@mail.karels.net> To: John Baldwin cc: arch@freebsd.org From: Mike Karels Reply-to: mike@karels.net Subject: Re: LIBC_SCCS In-reply-to: Your message of Fri, 27 Apr 2018 15:19:06 -0700. <1711113.VelFtdTVS7@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2468.1524871426.1@mail.karels.net> Date: Fri, 27 Apr 2018 18:23:46 -0500 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: Fri, 27 Apr 2018 23:45:48 -0000 > 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 don't object to this, but I wonder whether anyone will ever want these ancient IDs in libc. They were useful when libc was not a shared library, but (a) libc is shared, and (b) the sccsid is not changing much, at least not for the last 25 years. But "#ifdef LIBC_SCCS" is as good a way as any to turn this into a comment. You picked an interesting example; I wonder when someone last ran a BSD system on an HP 300. IIRC, it was a 68030-based system. Mike