flavour-super-opt.mk 1.1 KB

1234567891011121314151617181920212223
  1. # This flavour enables some extra optimizations, though these options may
  2. # not work everywhere or may not be benefical in all cases.
  3. # Start with generic optimisation flags.
  4. include build/flavour-opt.mk
  5. # Add CPU specific optimization flags:
  6. # march=native is only supported starting from gcc-4.2.x
  7. # comment out this line if you're compiling on an older gcc version
  8. CXXFLAGS+=-march=native -mtune=native
  9. # Use computed goto's to speedup Z80 emulation:
  10. # - Computed goto's are a gcc extension, it's not part of the official c++
  11. # standard. So this will only work if you use gcc as your compiler (it
  12. # won't work with visual c++ for example)
  13. # - This is only beneficial on CPUs with branch prediction for indirect jumps
  14. # and a reasonable amout of cache. For example it is very benefical for a
  15. # intel core2 cpu (10% faster), but not for a ARM920 (a few percent slower)
  16. # - Compiling src/cpu/CPUCore.cc with computed goto's enabled is very demanding
  17. # on the compiler. On older gcc versions it requires upto 1.5GB of memory.
  18. # But even on more recent gcc versions it still requires around 700MB.
  19. CXXFLAGS+=-DUSE_COMPUTED_GOTO