Other compilers

From DOSBoxWiki
Revision as of 21:07, 26 June 2008 by 130.161.82.192 (talk) (New)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

GCC is a reliable and standards compiler and is free software too. However, it does not always generate the best code. Dosbox user might want to use different compilers.

Pathscale

The Pathscale compiler (http://www.pathscale.com) is a compiler that comes under GPL license. While technically free software, it is not free of charge. It has very advanced loop vectorizers to make use of SSE instructions, and makes good use of prefetch instructions to improve effective memory bandwidth. It allows great speed gains on the video and audio processing parts of Dosbox.

Compiling dosbox with maximum optimizations (-Ofast) does not work, it results in an error during linker. The cause of this is the interprocedural analysis option (-ipa), which is activated with -Ofast. Therefore we manually enable all optimizations activated by -Ofast, except -ipa. This is: -O3 -OPT:Ofast -fno-math-errno -ffast-math

This, to compile Dosbox using Pathscale, you can use:

./configure CC=pathcc CXX=pathCC CFLAGS="-O3 -OPT:Ofast -fno-math-errno -ffast-math" CXXFLAGS="-O3 -OPT:Ofast -fno-math-errno -ffast-math"
make
make install

When the above has finished, you can enjoy a nice performance improvement in Dosbox.