On 06/15/10 21:25, Michael Nhan wrote:
Hi,
You are trying to build 32bit application on a 64bit osx. You will need
to tell both the compiler and the linker that you want to build 32bit
apps. Gcc is easy enough with the -m32 flag. ld is a little trickier. On
linux, I have to link using "ld -melf_i386" instead of plain ld. Run ld
-V to see what emulation modes are available to you. I don't have a
64bit macosx to help you. Building 32bit perl on a 64bit os will require
you to change the make file to build with gcc -m32 and get the ld to
link with the proper parameter. You may have to temporarily move ld to
ld.bin and make a script that calls ld.bin -melf_i386 (or whatever fits
your neeed) as ld so it links properly if you can't get the makefile do
you what you want.
As I said, for people who don't have the experience with the
compiler toolchain, it could be safer to use a "build from source
packaging environment" like pkgsrc or gentoo-arch.
The can be configured to the OSABI to be used and build all
packages against this ABI.
I know that pkgsrc is supporting MacOS X 10.6 in 32-bit mode, too,
because some of our pkgsrc committers have target (not build) machines
running 32-bit only and they build 32-bit packages to their requirements
on 64-bit osx hosts.
Sorry for repeating this again - but I think using such a pkg system
would be the best way for questions like OP.
Jens