This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] GNU/k*BSD support (with ChangeLog) for gcc

On Thu, Mar 18, 2004 at 09:16:16PM -0600, Loren James Rittle wrote:
> Then, I must reject that thunk of your patch.  Main reason:
> As posted, your patch has __FreeBSD_kernel__ just mirroring
> __FreeBSD__ .  I.e. it does nothing extra for you; at least, not the
> stated intention.

__FreeBSD__ and __FreeBSD_kernel__ are not equivalent. One refers to FreeBSD,
the other refers to a particular component of FreeBSD that is also used on
other systems.

> Before you try: No patch which disables __FreeBSD__ from appearing on
> FreeBSD will likely be accepted

My patch doesn't disable any macro on FreeBSD. See:

--- gcc.old/gcc/config/freebsd-spec.h	2004-02-04 21:00:52.000000000 +0100
+++ gcc/gcc/config/freebsd-spec.h	2004-03-13 23:03:41.000000000 +0100
@@ -61,6 +61,7 @@
 	  builtin_define ("__FreeBSD__=3");			       	\
 	else								\
 	  builtin_define ("__FreeBSD__");			       	\
+	builtin_define ("__FreeBSD_kernel__");			       	\
 	builtin_define_std ("unix");					\
 	builtin_define ("__KPRINTF_ATTRIBUTE__");		       	\
 	builtin_assert ("system=unix");					\

> In usage I've seen, that symbol implies little about
> libc.

My impression is that __FreeBSD__ is meant to imply at least all essential
components of a FreeBSD system, and that includes a C library.

If you want to focus on practical usage, though, I can show you programs
that use __FreeBSD__ to check for FreeBSD components like libc or other
userland utilities.

> Doesn't glibc already define extra symbols in its own headers?

Yes, but these symbols tell us nothing about the underlying kernel.

I hope you reconsider inclusion of that hunk in my patch. Thanks.

Robert Millan

"[..] but the delight and pride of Aule is in the deed of making, and in the
thing made, and neither in possession nor in his own mastery; wherefore he
gives and hoards not, and is free from care, passing ever on to some new work."

 -- J.R.R.T., Ainulindale (Silmarillion)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]