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

How does a compiler, say gcc, version built years ago can still compile for a processor released recently?

$
0
0

Let's say I take a compiler: gcc 4.8. And processor from intel, let's say skylake or some other fancy new family.

checking this question: How to see which flags -march=native will activate?; if I do gcc -march=native -E -v - </dev/null 2>&1 | grep cc1, this will spout out some flags for the host machine, which is the above processor, skylake.

How does gcc know what flags to enable disable... when 4.8 was released before skylake processors were out? What about other newer family of processors?

Consequently, next question is upgrading the compiler to latest necessary for it accurately and optimally compile for target processor which is new?

The question isn't really specific to gcc/intel, I would like to know how others maintain synchronicity between processor and compiler too.


Viewing all articles
Browse latest Browse all 22162

Trending Articles



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