Page 1 of 1
ld on snow leopard
Posted: Sat Aug 29, 2009 2:47 pm
by brodeur235
Trying to setup a dev environment on my mac os... It is darwin after all, so i figured unix tools would not be a problem. Nasm is not. ld apparently is. Here is the situation:
http://forums.macrumors.com/showthread.php?t=775426
If you didn't already see it in that thread, I tried to build binutils right from the source on snow leopard but I got a "darwin target not compatible" (or something of the sort) error.
Help appreciated,
Brodeur235
Re: ld on snow leopard
Posted: Sat Aug 29, 2009 3:17 pm
by NickJohnson
I think OSX/Darwin uses the Mach-O binary format (b/c it is Mach based) instead of ELF. You should build a cross compiler for an ELF target.
Re: ld on snow leopard
Posted: Sat Aug 29, 2009 7:37 pm
by Brynet-Inc
You are attempting to compile a very old version of binutils in that screenshot, you like many others can't seem to read the output of an FTP directory listing.
The latest version is binutils-2.19.1, it may or may not support "Snow Leopard" out of the box.. you'll probably just have to modify the build scripts if it doesn't.
Re: ld on snow leopard
Posted: Sat Aug 29, 2009 9:03 pm
by Firestryke31
IIRC the "ld" that the Apple compiler uses is actually the LLVM-ld for i686-apple-darwin9 (or something like that). I know this because there is practically no other "official" Mach-O capable binutils. For Snow Leopard it might be darwin10 instead of darwin9, and I'm 75% confident that if you decide to build the LLVM suite yourself, i686-pc-darwin9 will work just as well.