Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Jul 2002 13:12:45 -0400
From:      Garance A Drosihn <drosih@rpi.edu>
To:        Dag-Erling Smorgrav <des@ofug.org>, Adrian Penisoara <ady@freebsd.ady.ro>
Cc:        freebsd-stable@FreeBSD.ORG, bde@FreeBSD.ORG, obrien@FreeBSD.ORG, dillon@FreeBSD.ORG
Subject:   Re: __FBSDID breaks buildworld upgrading
Message-ID:  <p05111722b948d5ee54eb@[128.113.24.47]>
In-Reply-To: <xzpk7oc6dlz.fsf@flood.ping.uio.no>
References:  <Pine.BSF.4.10.10207031724160.48299-100000@ady.warpnet.ro> <xzpk7oc6dlz.fsf@flood.ping.uio.no>

next in thread | previous in thread | raw e-mail | index | archive | help
At 5:22 PM +0200 7/3/02, Dag-Erling Smorgrav wrote:
>Adrian Penisoara <ady@freebsd.ady.ro> writes:
>>    Can someone fix this behaviour ?
>
>I've added an #ifdef around the __FBSDID line to allow
>bootstrapping from old releases.

I can't help but wonder if this __FBSDID() idea is more trouble
than it's worth.  We're apparently going to go from:

#if !defined(lint)
static const char rcsid[] =
   "$FreeBSD$";
#endif

to:

#include <sys/cdefs.h>
#ifdef __FBSDID
__FBSDID("$FreeBSD$");
#endif

which in turn would get in trouble on some other platforms, if
they don't have <sys/cdefs.h>, or if they DO have it, and they
do not define __FBSDID, and you're one of those strange people
who would like to see RCS-id's in your object files even when
you are not compiling under the latest versions of freebsd.  I
suppose we could take it even further and try:

#include <sys/cdefs.h>
#ifdef __FBSDID
__FBSDID("$FreeBSD$");
#else
static const char rcsid[] =
   "$FreeBSD$";
#endif

But I think maybe we should step back and think if we would be
better off if we just went with:

#if !defined(lint) && !defined(NO__RCSID)
static const char rcsid[] =
   "$FreeBSD$";
#endif

I realize that opens a debate over whether the symbol should be
NO__RCSID or SKIP_RCSID or __SKIP_RCSID or <etc>, but I really
don't think that __FBSDID() is helping us out, particularly when
it comes to moving source-files across platforms.

Now, I imagine we can solve this immediate buildworld problem by
adding some steps to buildworld, or "do things in the right order",
but again why should we bother?  Whatever we do for buildworld will
not help if someone just wants to pick up a single source file from
4.6-stable and compile it on an "ancient" OS such as 4.4-release.
We talk about providing support for older releases of FreeBSD, but
here we are moving to a world where EVERY SINGLE SOURCE FILE in
the systsem will need some kind of futzing around with to compile
it on systems which are just 9 months old (as it looks like __FBSDID
was MFC'ed into -stable on Sept 28, 2001).

Fwiw, I had no real complaints with the whole __FBSDID idea until
after I put one in the lpr sources, and started realizing that all
it was doing for me (personally) was getting in the way...  It did
seem a perfectly reasonable idea to me until I started using it.

   [ Okay, now where did I put my flame-retardant underwear?... ]

I really do not mean this as an insult to anyone, but I think we
are so fascinated with the few real advantages of __FBSDID (such
as getting the RCS-ids into a separate ELF section) that we are
sinking far too much effort into trying to make it work.  Are
the benefits really worth all that effort?

-- 
Garance Alistair Drosehn            =   gad@gilead.netel.rpi.edu
Senior Systems Programmer           or  gad@freebsd.org
Rensselaer Polytechnic Institute    or  drosih@rpi.edu

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?p05111722b948d5ee54eb>