[Help] Options to cross compile gcc14
Segher Boessenkool
segher@kernel.crashing.org
Sun Jun 22 21:14:35 GMT 2025
Hi!
On Thu, Jun 12, 2025 at 07:07:09PM +0200, Jose Gomez via Gcc-help wrote:
> Is arm-linux-gnueabihf-gcc not a cross compiler then?, it is in make output
If your host is not arm-linux-gnueabihf, it is a crosscompiler yes. The
definition of cross-compiler is the host and target being different from
each other. Often the architecture is different, but only the OS
different is a cross-compiler as well, or even just a variantn of the OS
makes one.
Usually build=host, but how a compiler is built has nothing to do with
anything really :-) Of course it does matter how you build something if
you want it to work in the end, heh.
Normally you do not want to specify --build=, the autodetect works a
lot better than what you can guess :-) And if you want to run the
compiler on the machine you are building on you do not want to give
--host= either, the default is to use host=build! :-)
For cross-compilers, you obviously do want --target=, and almost
certainly you want some --with-prefix= as well, but not many other
configure flags at all.
Have fun, good luck,
Segher
More information about the Gcc-help
mailing list