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]

Re: PATCH: Support the FreeBSD 5.0 system thread library model

On May 12, 2001, "David O'Brien" <> wrote:

> On Sat, May 12, 2001 at 02:09:19AM -0300, Alexandre Oliva wrote:
>> On May 12, 2001, "David O'Brien" <> 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"?


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
Red Hat GCC Developer                  aoliva@{,}
CS PhD student at IC-Unicamp        oliva@{,}
Free Software Evangelist    *Please* write to mailing lists, not to me

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