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.
GNU ld on OS X
Most people use a cross-compiled toolchain for OS development. (There's a section for binutils on that page)
- Colonel Kernel
- Member
- Posts: 1437
- Joined: Tue Oct 17, 2006 6:06 pm
- Location: Vancouver, BC, Canada
- Contact:
That's what I did and it worked for me. Just download the binutils source and follow the instructions on the wiki...urxae wrote:Most people use a cross-compiled toolchain for OS development. (There's a section for binutils on that page)
Top three reasons why my OS project died:
- Too much overtime at work
- Got married
- My brain got stuck in an infinite loop while trying to design the memory manager
- Colonel Kernel
- Member
- Posts: 1437
- Joined: Tue Oct 17, 2006 6:06 pm
- Location: Vancouver, BC, Canada
- Contact:
On a 2.33 GHz Core 2 Duo with 2 GB of RAM, compiling GCC and binutils took maybe 15 minutes altogether, maybe less.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...
Top three reasons why my OS project died:
- Too much overtime at work
- Got married
- My brain got stuck in an infinite loop while trying to design the memory manager
- Brynet-Inc
- Member
- Posts: 2426
- Joined: Tue Oct 17, 2006 9:29 pm
- Libera.chat IRC: brynet
- Location: Canada
- Contact: