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: Support Xilinx PowerPC target boards


On Tue, 18 Nov 2008, Michael Meissner wrote:

> Rather than defining the defines in CPP_OS_DEFAULT_SPEC, it would be better to
> define these in TARGET_OS_CPP_BUILTINS or TARGET_OS_SYSV_CPP_BUILTINS.  This
> way, if the user uses the -std=<xxx> call, it will only define __FOO__, and if
> the user doesn't use -std=<xxx>, it will define FOO and __FOO__.  Hopefully
> Xilinx can change their header files to use either FOO or __FOO__ being
> defined.

While it's true that this method is better, it only does what you describe 
if you use builtin_define_std (which is of course easier than 
%{!ansi:%{!std=c*:%{!std=i*:-D...}}}).  If you use builtin_define then you 
can still write code that unconditionally defines a macro in the user's 
namespace.

-- 
Joseph S. Myers
joseph@codesourcery.com


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