Background: I use a G5 (ppc970 cpu) which has to have a 64-bit kernel nowadays (64-bit was always recommended). When I want to test the ppc book, I use linux32 to alter the kernel personality. The only visible results of that are that uname shows ppc instead of ppc64. Interestingly, it is totally capable of running both versions of libc.so.6 in /tools/lib{,64}, and anything else in /tools.
Unfortunately, the glibc configury gets well and truly confused when trying to build 64-bit glibc:
gcc -m64 ../sysdeps/powerpc/powerpc32/libgcc-compat.S -c -I../include -I/building/glibc-build/csu -I/building/glibc-build -I../sysdeps/powerpc/powerpc32/elf -I../sysdeps/powerpc/elf -I../sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu -I../sysdeps/powerpc/powerpc32/fpu -I../nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32 -I../sysdeps/unix/sysv/linux/powerpc/powerpc32 -I../nptl/sysdeps/unix/sysv/linux/powerpc -I../sysdeps/unix/sysv/linux/powerpc -I../sysdeps/ieee754/ldbl-128ibm -I../sysdeps/ieee754/ldbl-opt -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../sysdeps/unix/powerpc -I../nptl/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/powerpc/powerpc32 -I../sysdeps/wordsize-32 -I../sysdeps/powerpc/fpu -I../nptl/sysdeps/powerpc -I../sysdeps/powerpc -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl -I.. -I../libio -I. -D_LIBC_REENTRANT -include ../include/libc-symbols.h -DPIC -DSHARED -DHAVE_DOT_HIDDEN -DHAVE_INITFINI -DASSEMBLER -I/building/glibc-build/csu/. -o /building/glibc-build/csu/libgcc-compat.os -MD -MP -MF /building/glibc-build/csu/libgcc-compat.os.dt -MT /building/glibc-build/csu/libgcc-compat.os
../sysdeps/powerpc/powerpc32/libgcc-compat.S: Assembler messages:
../sysdeps/powerpc/powerpc32/libgcc-compat.S:70: Error: syntax error; found `@' but expected `,'
../sysdeps/powerpc/powerpc32/libgcc-compat.S:70: Error: junk at end of line: `@local'
../sysdeps/powerpc/powerpc32/libgcc-compat.S:77: Error: syntax error; found `@' but expected `,'
../sysdeps/powerpc/powerpc32/libgcc-compat.S:77: Error: junk at end of line: `@local'
[ snip lots more of these ]
make[2]: *** [/building/glibc-build/csu/libgcc-compat.os] Error 1
make[2]: Leaving directory `/building/glibc-2.4/csu'
make[1]: *** [csu/subdir_lib] Error 2
make[1]: Leaving directory `/building/glibc-2.4'
make: *** [all] Error 2
So, for ppc64 I propose to change the book to
uname -a | grep '^Linux.*2\.6\..*ppc64' && echo "ok to chroot" || echo "you must boot"