Understand cross compiling

Ian Lance Taylor iant@google.com
Wed Aug 16 15:46:00 GMT 2006


dohanc@optonline.net writes:

> Let me clarify the question you didn't understand. If I was to take
> your 'm68k-elf-gcc-4.1' and renamed it to just 'gcc', I just lost
> the description of what target it was built for. Is there an option
> to tell what target gcc was configured for? ie. gcc --target-name

Not that I know of.  You can get a pretty good guess by simply running
gcc --target-help to see which target specific options are supported.

> Further, is there an option to tell what host it was originally
> configured for? I realize most people would know this information,
> however I have a case where I don't since I have a binary copy of a
> few tools.

Not that I know of.  But if you can run it at all, you must be on the
right host.

I'm sure you know that if you received a binary copy of gcc without
accompanying source code, you are entitled to ask the person who gave
it to you to provide the source code.  That is the condition under
which gcc is distributed.

> I was using an option -DCPU=MC68030 instead of simply -m68030 simply
> because it was in the original make file. For some reason
> -DCPU=MC68030 doesn't complain. It obviously was not creating it for
> my m68k target. This is why my native Suse gcc was not complaining.

The -D option is always supported.  It just defines a preprocessor
symbol, and does not affect code generation.

Ian



More information about the Gcc-help mailing list