This is the mail archive of the gcc@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]

Re: G++ defining _GNU_SOURCE


> (can't think of an easy way for linux.h to simply "prepend" -D_GNU_SOURCE
> to a previously-defined possibly empty CPLUSPLUS_CPP_DEFINE, rather than
> undef'ing it and fully redefining it.)

You can introduce a SUBTARGET_CPLUSPLUS_CPP_DEFINE, which defailts to empty
in pa.h, and is redefined in linux.h as "-D_GNU_SOURCE" .
You'd have to list SUBTARGET_CPLUSPLUS_CPP_DEFINE in EXTRA_SPECS.

For an example how such a thing is done, look at SUBTARGET_CPP_SPEC
in mips/config directory.  For an example how it is *not* done, look
at SUBTARGET_CPP_PREDEFINES in config/mcore ;-)


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