What you need to get :
- Dosbox sources (or other)
- tar utility
- gunzip utility
- the latest version of gcc
- make utility or an IDE who can compilling with gcc
- a shell
- a text editor
What you need to know :
- the specifications of your CPU
- what is your gcc version
- if you have a 32 or a native 64 bits operating system
Before starting :
- gcc 3.x.x don't have the ssa optimisation unit so if you use that version, don't add the flag
Code: Select all
-fssa
Code: Select all
-O3
Code: Select all
-O2
- if you use an IDE, you must settle the optimisations in your IDE
- all of this optimisations are theoretically safe but you can try other by yourself
- the pipe flag is just to speed up the compilation
- the CHOST flag is specific to your operating system, take a look to the gcc man page
- if you don't have a 64 bit operating system, you need to use the 32 bits flags
* First you need to unpack the sources with gunzip, tar and you shell
Code: Select all
tar -xvzpf dosbox-0.65.tar.gz
* Now, go into the new directory
Code: Select all
cd dosbox-0.65
* If you use an IDE you need to creat a project, load all files and settle all your options, and make your project
* If you work with a shell you need to export 3 flags, see at the end to the specifications
Code: Select all
export CHOST="my flag"
export CFLAGS="my flag"
export CXXFLAGS="my flag"
Code: Select all
./configure
Code: Select all
cat Makefile
emacs Makefile

- - Pentium III
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -O3 -pipe -fomit-frame-pointer -fmerge-all-constants -ffast-math -funswitch-loops -mmmx -msse -fssa"
CXXFLAGS="${CFLAGS}"
- Mobile Pentium III
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium3m -O3 -pipe -fomit-frame-pointer -fmerge-all-constants -ffast-math -funswitch-loops -mmmx -msse -fssa"
CXXFLAGS="${CFLAGS}"
- Pentium IV
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer -fmerge-all-constants -ffast-math -funswitch-loops -mmmx -msse -msse2 -fssa"
CXXFLAGS="${CFLAGS}"
- Mobile Pentium IV
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium4m -O3 -pipe -fomit-frame-pointer -fmerge-all-constants -ffast-math -funswitch-loops -mmmx -msse -msse2 -fssa"
CXXFLAGS="${CFLAGS}"
- Pentium IV with 32 bits Presscot core
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium4m -O3 -pipe -fomit-frame-pointer -fmerge-all-constants -ffast-math -funswitch-loops -mmmx -msse -msse2 -msse3 -fssa"
CXXFLAGS="${CFLAGS}"
- Pentium IV with 32 bits Prescott core
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=prescott -O3 -pipe -fomit-frame-pointer -fmerge-all-constants -ffast-math -funswitch-loops -mmmx -msse -msse2 -msse3 -fssa"
CXXFLAGS="${CFLAGS}"
- Athlon
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=athlon -O3 -pipe -fomit-frame-pointer -fmerge-all-constants -ffast-math -funswitch-loops -mmmx -m3dnow -fssa"
CXXFLAGS="${CFLAGS}"
- Athlon-tbird
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=athlon-tbird -O3 -pipe -fomit-frame-pointer -fmerge-all-constants -ffast-math -funswitch-loops -mmmx -m3dnow -fssa"
CXXFLAGS="${CFLAGS}"
- Athlon 4
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=athlon-4 -O3 -pipe -fomit-frame-pointer -fmerge-all-constants -ffast-math -funswitch-loops -mmmx -m3dnow -msse -fssa"
CXXFLAGS="${CFLAGS}"
- Athlon XP
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer -fmerge-all-constants -ffast-math -funswitch-loops -mmmx -m3dnow -msse -fssa"
CXXFLAGS="${CFLAGS}"
- Athlon MP
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=athlon-mp -O3 -pipe -fomit-frame-pointer -fmerge-all-constants -ffast-math -funswitch-loops -mmmx -m3dnow -msse -fssa"
CXXFLAGS="${CFLAGS}"
- Pentium IV with 64 bits Prescott core
CHOST="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O3 -pipe -fomit-frame-pointer -fmerge-all-constants -ffast-math -funswitch-loops -mmmx -msse -msse2 -msse3 -fssa"
CXXFLAGS="${CFLAGS}"
- Opteron
CHOST="x86_64-pc-linux-gnu"
CFLAGS="-march=opteron -O3 -pipe -fomit-frame-pointer -fmerge-all-constants -ffast-math -funswitch-loops -mmmx -m3dnow -msse -msse2 -msse3 -fssa"
CXXFLAGS="${CFLAGS}"
- Athlon 64
CHOST="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O3 -pipe -fomit-frame-pointer -fmerge-all-constants -ffast-math -funswitch-loops -mmmx -m3dnow -msse -msse2 -msse3 -fssa"
CXXFLAGS="${CFLAGS}"
- Athlon FX
CHOST="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon-fx -O3 -pipe -fomit-frame-pointer -fmerge-all-constants -ffast-math -funswitch-loops -mmmx -m3dnow -msse -msse2 -msse3 -fssa"
CXXFLAGS="${CFLAGS}"
- G4 7400
CHOST="powerpc-unknown-linux-gnu"
CFLAGS="-mcpu=7400 -O2 -pipe -fsigned-char -maltivec
-mabi=altivec -mpowerpc-gfxopt"
CXXFLAGS="${CFLAGS}"
- G4 7450
CHOST="powerpc-unknown-linux-gnu"
CFLAGS="-mcpu=7450 -O2 -pipe -fsigned-char -maltivec
-mabi=altivec -mpowerpc-gfxopt"
CXXFLAGS="${CFLAGS}"
- G5
CHOST="powerpc64-unknown-linux-gnu"
CFLAGS="-mcpu=G5 -O3 -pipe -fsigned-char -maltivec
-mabi=altivec -mpowerpc-gfxopt"
CXXFLAGS="${CFLAGS}"