Support for cc -m32

Nathan Whitehorn nwhitehorn at freebsd.org
Thu Jul 29 22:27:18 UTC 2010


On 07/29/10 17:18, Tijl Coosemans wrote:
> Hi,
>
> I've put the initial version of some patches online to support cross
> compilation of 32 bit binaries on amd64. It's modelled after how NetBSD
> does this.
>
> With these patches something like "cc -m32 -o test test.c -pthread -lm"
> generates a program that runs on FreeBSD/i386.
>
> http://people.freebsd.org/~tijl/cc-m32-1.diff
> http://people.freebsd.org/~tijl/cc-m32-2.diff
> http://people.freebsd.org/~tijl/cc-m32-3.diff
>
> *cc-m32-1.diff* : Let ld and cc find 32 bit libraries.
>
> *cc-m32-2.diff* : Install i386 headers on amd64.
>    
Why not use the GCC multilib code for what patch 1 does? There is 
already code in cc_tools/Makefile to handle this for powerpc64 (where cc 
-m32 already works).
-Nathan


More information about the freebsd-arch mailing list