I was trying to build a "x86_32-linux-gnu" version of gcc (the same as a
x86_64-linux-gnu version, except that the compiler default mode and its
binaries are 32-bit ones).
The essential ingredient was a DRIVER_SELF_SPECS "%{!m32:%{!m64:-m32}}",
%{m32:%<m64}", such that 'gcc -m64 -m32' produces 32-bit binaries.
More details are described in:
ftp://ftpth.mppmu.mpg.de/pub/peb/x86-32/toolchain.ps
It turned out that everything worked fine, except the multilib selection wich
ignored that the switch "m64" was removed by the DRIVER_SELF_SPECS.
This problem was fixed by the attached patch.
--
Summary: multilib selection in gcc driver ignores removal of
switches
Product: gcc
Version: 3.4.5
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: driver
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: peb at mppmu dot mpg dot de
GCC build triplet: i686-linux-gnu
GCC host triplet: i686-linux-gnu
GCC target triplet: i686-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26466