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