- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I struggle to see the exact division between the compiler options -march, -m, -arch and -x
What I got so far: using -x will generate code that only runs on Intel CPUs. E.g. using -xCORE-AVX2 will produce code that does not run on non-Intel CPUs, regardless of the instruction sets these CPUs claim to be capable of. Am I right so far?
Now for -m and -march, I got them to produce code that runs on nun-Intel CPUs. But where exactly do these two options differ? Is it only a different set of supported instruction sets? For example, I can't find an equivalent option for -mavx in the list of -march arguments. Vice-versa, I find no equivalent for -march=core-avx2 in the list of -m arguments.
I guess this boils down to 2 questions from my side:
1) What exactly is the difference between -m and -march and -arch?
2) Since both -m and -march produce code that runs on non-Intel CPUs, can I be sure that the instruction set will actually be used?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The above link does not resolve, and is as bad of a solution as "DM'd you the fix".
Can someone post an actual answer?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page