bin/139146 still not right in FreeBSD 8.2 (-m32 on amd64)?

Dimitry Andric dim at FreeBSD.org
Mon Mar 14 23:16:49 UTC 2011


On 2011-03-09 21:15, Thomas David Rivers wrote:
> Just installed a fresh 8.2-stable on a brand-spanking-new 64-bit
> machine...
>
> But, when I try to build 32-bit programs I get problems linking,
> and I stumbled onto PR bin/139146.
...
> /usr/bin/ld: skipping incompatible /usr/lib/libgcc.a when searching for -lgcc
> /usr/bin/ld: skipping incompatible /usr/lib/libgcc.a when searching for -lgcc
> /usr/bin/ld: cannot find -lgcc

I committed a fix for this in r219648, so at least:
- gcc -m32 uses the correct library path to find crt startup objects
- ld uses the correct library path to find libraries
- simple 'hello world' type programs link and run

However, this does *not* solve the problem completely, as the system
headers in /usr/include/machine will still be amd64 specific.  This
can result in various kinds of brokenness.  Please be careful.

If you want to reliably build i386 executables, you should still use a
native i386 installation.


More information about the freebsd-stable mailing list