PATCH: Support the FreeBSD 5.0 system thread library model

Alexandre Oliva aoliva@redhat.com
Sat May 12 03:16:00 GMT 2001


On May 12, 2001, "David O'Brien" <obrien@FreeBSD.org> wrote:

> On Sat, May 12, 2001 at 02:09:19AM -0300, Alexandre Oliva wrote:
>> On May 12, 2001, "David O'Brien" <obrien@FreeBSD.org> wrote:
>> 
>> > I would really like to not proliferate the number of configuration
>> > headers.  Isn't there *some* way of having `configure' add
>> > -DFBSD=<vers_no> to CFLAGS?
>> 
>> Setting xm_defines in config.gcc should do it.

> Zack also just pointed me at that.
> Just curious why isn't there a tm_defines?

Because, for build and host, xm_defines gets assigned to
build_xm_defines and host_xm_defines, respectively, whereas xm_defines
ends up with the defines for the target.

> Is there anyway to get "#define FBSD_MAJOR 5"?

xm_defines='FBSD_MAJOR=5'

However, I'm not sure having this set for the target machine will have
the desired effect.  It appears to me that these target settings are
only used when building libgcc; when compiling gcc.c, where the specs
are processed, only host and build defines are available.  Besides,
setting xm_defines like this would have the effect of defining
FBSD_MAJOR even if FreeBSD 5 was only the build platform, but the
host or the target were older versions of FreeBSD, so it would break.

I don't see a clean way to get this macro defined properly.  It would
be particularly important to get it defined before including
config/freebsd.h, but xm_defines are #defined after config headers are
defined, so they wouldn't help anyway.

I think you'd be better off introducing a new header file, even if
to define only `FBSD_MAJOR 5' in it.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me



More information about the Gcc-patches mailing list