My work here is based off of Benoit Papillault's work at http://benoit.papillault.free.fr/sourcemage/ and http://benoit.papillault.free.fr/sourcemage/sorcery.php and http://cvs.benoit.is-a-geek.net/cgi-bin/cvsweb.cgi/sourcemage/src/sorcery-patch/.
The work-in-progress repository is available in the Source Mage GNU/Linux repository under //sgl/sorcery/proj/proj2.
Instead of writing Sorcery to support bi-arch I will jump right into making it support multi-arch (since some chips (e.g. Transmeta) have three or more architectures for each chip)by changing the following information from Benoit's idea:
Benoit had:
CPUNAME="AMD Athlon 64, Athlon 64 FX and Opteron" # -m64 is not needed since it is the default. However, since gcc spell # adds a -m32, this was causing problems. CFLAGS="-march=athlon-xp -mmmx -mfpmath=sse -msse -msse2 -m3dnow" HOST="x86_64-unknown-linux-gnu" FAST="-O2" SMALL="-Os" BI_ARCH="yes" LIB[0]="/lib" SUBARCH[0]="x86_32" SUBLIB[0]="/lib32"
CPUNAME="AMD Athlon 64, Athlon 64 FX and Opteron" CFLAGS="-march=athlon-xp -mmmx -mfpmath=sse -msse -msse2 -m3dnow -m32" HOST="i686-pc-linux-gnu" FAST="-O3" SMALL="-Os"
CPUNAME="AMD Athlon 128 NX" # -m64 is not needed since it is the default. However, since gcc spell # adds a -m32, this was causing problems. CFLAGS="-march=athlon-nx -mmmx -mfpmath=sse -msse -msse2 -m3dnow" HOST="x86_128-unknown-linux-gnu" FAST="-O2" SMALL="-Os" BI_ARCH="yes" LIB[0]="/lib" SUBARCH[0]="x86_64" SUBLIB[0]="/lib64" SUBARCH[1]="x86_32" SUBLIB[1]="/lib32"
CPUNAME="AMD Athlon 64, Athlon 64 FX and Opteron" # -m64 is not needed since it is the default. However, since gcc spell # adds a -m32, this was causing problems. CFLAGS="-march=athlon-xp -mmmx -mfpmath=sse -msse -msse2 -m3dnow" HOST="x86_64-unknown-linux-gnu" FAST="-O2" SMALL="-Os" LIB[0]="/lib" SUBARCH[0]="x86_32" SUBLIB[0]="/lib32"
CPUNAME="AMD Athlon 64, Athlon 64 FX and Opteron" CFLAGS="-march=athlon-xp -mmmx -mfpmath=sse -msse -msse2 -m3dnow -m32" HOST="i686-pc-linux-gnu" FAST="-O3" SMALL="-Os"