This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
detecting if cross-compiler (in plugin)?
- From: Basile Starynkevitch <basile at starynkevitch dot net>
- To: gcc at gcc dot gnu dot org
- Date: Wed, 29 Aug 2012 10:59:29 +0200
- Subject: detecting if cross-compiler (in plugin)?
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)
Cheers
--
Basile STARYNKEVITCH http://starynkevitch.net/Basile/
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} ***