Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22002

Does GCC support multiple target architectures?

$
0
0

Is it possible to compile a single gcc (frontend) binary which supports multiple target architectures, which I can select in the command-line, like this:

$ gcc --architecture=linux-i386 ...$ gcc --architecture=freebsd-arm ...$ gcc --architecture=darwin-amd64 ...

I know that it's possible build gcc as a cross-compiler, but is it possible to select the target architecture using a command-line flag, without writing a wrapper script which starts different gcc binaries for each architecture?

For i386 and amd64 -m32 and -m64 seem to do the trick, but how do I select ARM etc.? Please note that -march= looked useless to me, I couldn't make it change from i386 to amd64.


Viewing all articles
Browse latest Browse all 22002

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>