On 20 March 2018 at 16:20, Michael Brunnbauer wrote: > > hi all, > > I'm trying to build gcc 7.3 on an x86 32 bit system with support for 32 > and 64 bit binaries I don't know if that's even possible, other than by building a cross-compiler with --target=x86_64-pc-linux-gnu. Maybe it is. > and get linking problems with mpc/mpfr/gmp during the > bootstrap process, e.g.: > > ld: skipping incompatible /usr/lib/libgmp.so when searching for -lgmp > ld: skipping incompatible /usr/lib/libgmp.a when searching for -lgmp > > I first had gmp-5.0.1/mpc-0.8.1/mpfr-2.4.2 and switched to gmp-6.1.2/mpc-1.1.0/ > mpfr-4.0.1 without success. The version is probably not the problem because > this is ld complaining - as if libgmp had the wrong architecture. Yes, that's what the error usually means. > Do I need > the libraries in a 64 bit version also for a proper bootstrap? Probably "instead" not "also". Have you tried the following the instructions at https://gcc.gnu.org/wiki/InstallingGCC and using the contrib/download_prerequisites script so that gmp/mpfr/mpc are built as part of the build process? GCC should build them with whatever architecture is needed.