The AMD64 port of Gentoo Linux is very similar to the x86 version. On this page, I'll describe the differences and other quirks.
The main differences with the x86 version are:
There are two versions of the LiveCD available, with only a stage 1 or with all three stages. They are available on all Gentoo mirrors in experimental/amd64/livecd.
Grub and Lilo just do not build on a pure 64bit environment for now. The current work-around is to use a 32bit pre-compiled static version. It can be installed by doing:
emerge grub-static grub-install <device>
There is currently no GRP available on AMD64. Packages have to be compiled by hand
We have decided to use a few "experimental" packages on amd64: db 4.x and coreutils 5.x. This may cause some applications to fail to compile or to not work. Please file bugs on our bugzilla if this happens.
Sometimes, the LiveCD will not shutdown or reboot properly after "Remounting remaining filesystems readonly". This is a bug that also happens on x86, just reboot the computer the hard way and it should cause no problems.
Many packages which are unmasked on other architectures are still masked on AMD64, this does not mean that they do not work, but that no Gentoo developer has been able to test them on an amd64 machine. Please test them and report those that do work and also those that dont.
Some programs do not work, here is a short list.
The only kernels that have been tested on AMD64 are the vanilla-sources-2.4.21 and development-sources-2.6.0-test2. This does not mean that other kernels will not work, please test and report your successes and failures. I have seen mixed reports with the development series, so you have been warned.
Many Opteron motherboards come with a built-in on-board network chip manufactured by Broadcom. In the x86 livecd, the driver is bcm???? which is the driver provided by broadcom, on the amd64 livecd we chose the "tg3" driver that's in the main kernel source tree.
The name of the CPU is "k8", but you don't need to put it as a -march=k8 since there is only one x86-64 CPU out there anyways. Some versions of GCC will not recognize -march=k8 and will FAIL if it is set. There are also issues with -fPIC, many packages require it to work properly, I would recommend to add it to the global CFLAGS, even if it costs a little performance. The GCC version provided with Gentoo for AMD64 is a pure 64bit compiler, it will not produce 32bit under any circumstance so using -m64 is useless and trying to use it with -m32 will fail.
The mmx, 3dnow, sse and sse2 use flags are useless and are filtered out on amd64, since all amd64 processors support those instruction sets. The are ignored because on many packages they enable assembly optimisation which are 32bit only.
The current Gentoo for AMD64 is a pure 64bit distribution. Legacy 32-bit executables will NOT run (except if they are statically linked. Our current solution to enable them to work is to build a 32bit environment as it is done on IA-64, this is different from SuSe and RedHat which put the 32bit libraries in the main tree.
A rudimentary 32bit environments can be created with a x86 stage (Pentium4 and AthlonXP will work.. or anything lower). It should be untarred into /emul/i686. It can then be entered with the provided switcharch script (this script required linux64 (emerge linux64). And the 32bit system can then be installed/run like a normal system.
If one wishes to use the 32bit apps inside the 64 bit environment, it is possible once the 32bit environment has been set up. It is just a matter of adding the 32bit library directories to the /etc/ld.so.conf of the main system using the following commands:
cp /emul/i686/lib/ld-linux.so.2 /lib echo -n "LDPATH=\"/emul/i686/lib:/emul/i686/usr/lib:/emul/i686/usr/X11R6/lib" > /etc/env.d/15env32bit grep ^/ /emul/i686/etc/ld.so.conf | sed s#^/#:/emul/i686/# >> /etc/env.d/15env32bit echo \" >> /etc/env.d/15env32bit env-updateThis whole procedure should be automated in the future by using some kind of script.
Thanks to Jean-François Richard for the switcharch script.You can reach the author of this document at email@example.com or as Tester_ on irc.freenode.net in the #gentoo-dev, #gentoo-cluster and maybe soon #gentoo-amd64 channels.