ld on snow leopard

Programming, for all ages and all languages.
Post Reply
brodeur235
Member
Member
Posts: 86
Joined: Sat Jun 06, 2009 11:55 am

ld on snow leopard

Post 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
User avatar
NickJohnson
Member
Member
Posts: 1249
Joined: Tue Mar 24, 2009 8:11 pm
Location: Sunnyvale, California

Re: ld on snow leopard

Post 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.
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Re: ld on snow leopard

Post 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.
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
User avatar
Firestryke31
Member
Member
Posts: 550
Joined: Sat Nov 29, 2008 1:07 pm
Location: Throw a dart at central Texas
Contact:

Re: ld on snow leopard

Post 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.
Owner of Fawkes Software.
Wierd Al wrote: You think your Commodore 64 is really neato,
What kind of chip you got in there, a Dorito?
Post Reply