Here are my notes on how to bootstrap multilib gcc and eglibc packages, starting from a base without any multilib available. I thought I'd post them here in case anybody could benefit from them, or maybe had comments on how to improve the process.
ln -s x86_64-linux-gnu /usr/include/x86_64-linux-gnux32 ln -s x86_64-linux-gnu /usr/include/i386-linux-gnu touch /usr/include/x86_64-linux-gnu/gnu/stubs-{32,x32}.h Start with gcc-4.7: Edit debian/rules2 Add --disable-libitm, --disable-libstdc++-v3 to disabled libs for DEB_STAGE build. Edit debian/control.m4 Remove ifenabled(`libx32gcc', ... condition from libx32gcc1 and libx32gcc-dev entries. DEB_STAGE=stage1 DEB_BUILD_OPTIONS="parallel=? nocheck" dpkg-buildpackage -d -b -uc dpkg -i --force-depends ../*.deb [as gcc-4.7-base isn't built but is still depended on; and also gcc-4.7-multilib still depends on libc6-dev-* which isn't built yet] Next, eglibc: Make sure make 3.81-8.2 is installed, and not 3.82-1 from experimental. Edit /usr/share/perl5/Dpkg/Shlibs.pm and add /libx32 /usr/libx32 to definition of DEFAULT_LIBRARY_PATH. libc_cv_ssp=no DEB_BUILD_OPTIONS="parallel=? nocheck" dpkg-buildpackage -d -b -uc rm /usr/include/x86_64-linux-gnux32 /usr/include/i386-linux-gnu \ /usr/include/x86_64-linux-gnu/gnu/stubs-{32,x32}.h dpkg -i ../{libc6,libc6-dev,libc6-i386,libc6-x32, libc6-dev-i386,libc6-dev-x32,locales,libc-bin,libc-dev-bin, multiarch-support,libc6-dbg}_*.deb apt-get -f install [which will remove bootstrapped gcc-4.7 packages, but they're not needed anymore] Now build gcc-4.8: [For overall bootstrapping of Debian, can't build the Java part yet as: gcc-4.8 Build-Depends on libcairo2-dev cairo Build-Depends on libgl1-mesa-dev mesa Build-Depends on llvm-3.2-dev llvm-toolchain-3.2 Build-Depends on gcc-4.7 So, edit debian/rules.defs and add somewhere "with_java := disabled for bootstrap build" I put it just above the line "ifeq ($(with_java),yes)". ] DEB_BUILD_OPTIONS="parallel=? [nocheck]" dpkg-buildpackage -d -B -uc dpkg -i ../lib32gcc1_*.deb ../libx32gcc1_*.deb ; resolve dependencies ; \ apt-get check && dpkg --configure -a Next, full version of gcc-4.7: # reextract gcc-4.7 source package -- for some reason, the previous build # put libantlr-java into the Build-Depends DEB_BUILD_OPTIONS="parallel=? [nocheck]" dpkg-buildpackage -B -uc dpkg -i ../g++-4.7_*.deb ../g++-4.7-multilib_*.deb ; resolve dependencies ; \ apt-get check && dpkg --configure -a Finally, full build of eglibc (with libssp usage compiled into the appropriate utilities): DEB_BUILD_OPTIONS="parallel=? [nocheck]" dpkg-buildpackage -b -uc -- Daniel Schepler -- To UNSUBSCRIBE, email to debian-gcc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/3157052.KLsfge87uu@frobozz