Page 1 of 1

GNU ld on OS X

Posted: Thu Mar 15, 2007 2:18 pm
by ehird
Going through "BareBones", I saw I needed binutils. So, I installed it via MacPorts.

But it doesn't include gas or gld. I used the nasm version of the loader, but what about the ld script? "ld" on OS X is a Mach-O OS X binary thing, that works totally different.

I'm not sure why the package doesn't include them, actually.

Posted: Thu Mar 15, 2007 2:29 pm
by urxae
Most people use a cross-compiled toolchain for OS development. (There's a section for binutils on that page)

Posted: Thu Mar 15, 2007 2:42 pm
by ehird
Yes, sounds like a good idea. Though, a question - on a 2.16ghz core 2 duo cpu with 1gb of ram, will the gcc compile be a slow one? I imagine it'll take some time, but hopefully not too long...

Posted: Thu Mar 15, 2007 2:43 pm
by Colonel Kernel
urxae wrote:Most people use a cross-compiled toolchain for OS development. (There's a section for binutils on that page)
That's what I did and it worked for me. Just download the binutils source and follow the instructions on the wiki...

Posted: Thu Mar 15, 2007 2:44 pm
by Colonel Kernel
ehird wrote:Yes, sounds like a good idea. Though, a question - on a 2.16ghz core 2 duo cpu with 1gb of ram, will the gcc compile be a slow one? I imagine it'll take some time, but hopefully not too long...
On a 2.33 GHz Core 2 Duo with 2 GB of RAM, compiling GCC and binutils took maybe 15 minutes altogether, maybe less.

Posted: Thu Mar 15, 2007 2:52 pm
by ehird
Oh cool. I'll go do that then.

Posted: Thu Mar 15, 2007 3:56 pm
by Brynet-Inc
ehird wrote:Yes, sounds like a good idea. Though, a question - on a 2.16ghz core 2 duo cpu with 1gb of ram, will the gcc compile be a slow one? I imagine it'll take some time, but hopefully not too long...
hehe, I've done it on a P2 @ 400mhz and it doesn't take a "very" long time.. have patience.. 8)

Posted: Thu Mar 15, 2007 4:03 pm
by ehird
Yeah, it finished really quickly and works.

Now I'm trying to get a bootable floppy, just to make me feel as if i'm way further than I am ;)