This is the mail archive of the gcc-patches@gcc.gnu.org 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] Clean up CPP_SPEC for various NetBSD targets


On Thu, May 09, 2002 at 11:37:44AM +0100, Richard Earnshaw wrote:

 > Have you looked at the way the FreeBSD config files handle this sort of 
 > case?

Yah, this type of cleanup is on my List... but...

 > config/netbsd.h
 > 
 > #define NETBSD_CPP_SPEC "%{posix:-D_POSIX_SOURCE}"
 > 
 > #ifndef CPP_SPEC
 > #define CPP_SPEC NETBSD_CPP_SPEC
 > #endif
 > 
 > Then if that is sufficient, nothing more needs to be done.  But if a 
 > target needs something else as well, it can do:
 > 
 > config/targ/netbsd.h
 > 
 > #define SUBTARGET_CPP_SPEC NETBSD_CPP_SPEC

...this isn't quite sufficient -- there are often target-specific
SUBTARTET_CPP_SPEC's as well, and not all targets provide all the
EXTRA_SPECS stuff that's needed to handle this reasonably.

 > Admittedly, this would be all much easier if most of the specs were split 
 > in the top-level to have an OS part and a CPU part -- but doing that would 
 > be quite a lot of work.

Yes, that would be ideal.  I'm not sure it would be too bad ... perhaps
a new CPP_OS_SPEC (which would default to "" if not provided by the
configuration) could be added to parallel CPP_SPEC, and configurations
can migrate towards it?

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>


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