detecting if cross-compiler (in plugin)?

Basile Starynkevitch
Wed Aug 29 08:57:00 GMT 2012

Hello All,

What is the simplest way, for a plugin (and also for a GCC branch), 
to detect if the compiler is straight or not (i.e. cross, that is 
target & host are different, or even canadian-cross).

I was thinking of some macro in auto-host.h or other header.

(MELT is, during its building procedure, testing itself by running 
a simple MELT pass on the MELT runtime. Obviously this step makes 
no sense for cross compilers, hence the question)

email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***

More information about the Gcc mailing list