This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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: How to find out if a given gcc is a cross compiler?


Nathan Kidd wrote:
Toralf Lund wrote:
I'm looking a nice and simple way to find out if a given gcc command actually specifies a cross compiler, or if I'm cross compiling when using it, if you like. Does anyone know a simple way to find out? I suppose I can compare the target type as output from -dumpmachine with the current host type, but is there a single, reliable way of finding that, and getting the value in the same format as the target? Or should that be "build" machine instead of "host"? I never seem to learn which is which, but the point remains: I'm not sure I know a good way to find it.

Try: gcc -dumpspecs | grep -A 1 cross_compile
Ah. Haven't noticed that piece of information before. Thanks.

- Toralf


-- For unsubscribe information see http://sourceware.org/lists.html#faq


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