OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Apr 18, 2024 7:36 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: GCC cross-compiler on mac os
PostPosted: Fri Feb 03, 2012 8:25 pm 
Offline

Joined: Sat May 07, 2011 6:34 am
Posts: 19
The GCC cross-compiler page gives advice about building GCC/binutils on mac os, specifically it says to change the default $(CC) from apple's llvm-gcc to gcc-4.2 in /usr/bin.

However, as of Mac OS 10.7 and Xcode 4.2, Apple doesn't seem to provide a 'regular' version of gcc - instead they provide clang and a version of llvm that may (or may not, I haven't checked) be the same as their own, meaning that it might not support cross compilation.

Has anyone had any luck building a GCC cross compiler on mac os with the new tools? I've been having a look at using LLVM to compile my kernel instead of GCC, but so far it's looking a bit messy.

If anyone's found a good toolchain for kernel dev on mac, that might be worth putting on the wiki...


Top
 Profile  
 
 Post subject: Re: GCC cross-compiler on mac os
PostPosted: Sat Feb 04, 2012 6:47 am 
Offline
Member
Member
User avatar

Joined: Tue Feb 08, 2011 1:58 pm
Posts: 496
alaroldai wrote:
However, as of Mac OS 10.7 and Xcode 4.2, Apple doesn't seem to provide a 'regular' version of gcc

They provide it, it's just not installed by default. You can find the .mpkg on the 2nd DVD of your install DVD set in a subdirectory called Optional.
Code:
imac:~ turdus$ gcc --version
i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5646)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 29 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group