This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch: Use tm_defines to configure default scheduling model on PA
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: dj at redhat dot com (DJ Delorie)
- Cc: gcc-patches at gcc dot gnu dot org, law at redhat dot com, aoliva at redhat dot com
- Date: Wed, 12 Jun 2002 16:01:31 -0400 (EDT)
- Subject: Re: Patch: Use tm_defines to configure default scheduling model on PA
> > I still think it better to put the defines first because the headers
> > may contain secondary defines based on the identifier that you want
> > to redefine.
>
> Consider, for example, this from i386/cygwin.h:
>
> /* For Win32 ABI compatibility */
> #undef DEFAULT_PCC_STRUCT_RETURN
> #define DEFAULT_PCC_STRUCT_RETURN 0
>
> To do this with defines before includes, you'd need to put a #ifdef
> around *every single* define in *every* header file, because you won't
> know which will be overridden by targets.
Yes. However, it's not reasonable to define the entire cygwin configuration
in configure. If configure checked how to define DEFAULT_PCC_STRUCT_RETURN
then I would say it has a place in configure, and that there should be
a way independent of include files to override the default define. I
agree that in some cases putting the defines after the headers is simpler
and avoids the ifdef burden, however you loose some flexibility in what
the headers can do.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)