http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55515
Bug #: 55515 Summary: PowerPC EABI: Create a predefined symbol for -mdata=xxx Classification: Unclassified Product: gcc Version: 4.7.2 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: target AssignedTo: unassig...@gcc.gnu.org ReportedBy: rdiezmail-...@yahoo.de I am investigating this issue: http://sourceware.org/ml/newlib/2011/msg00295.html If that link does not work, search the mailing list for "PowerPC EABI issues with newlib". During the investigation, I have missed a way to tell which -mdata=xxx option is being used at the moment. That is, I need a predefined symbol like _PPC_MSDATA=EABI, _PPC_MSDATA_EABI or similar. With such a symbol, it would be easy to #error if the user has specified the wrong compiler flags. Info about where to look in GCC's source code is here: http://gcc.gnu.org/ml/gcc-help/2011-07/msg00079.html If that link does not work, search the mailing list for "How to check at compilation time whether -msdata is set to eabi for PowerPC embedded targets".