image
image

Go Back   macosx.com > Design, Media, Programming & Scripting > Software Programming & Web Scripting

Reply
 
Thread Tools
  #1  
Old August 6th, 2004, 01:11 PM
Official Volunteer
 
Join Date: Oct 2000
Location: UAF, Fairbanks, AK
Posts: 409
Thanks: 0
Thanked 0 Times in 0 Posts
macavenger is on a distinguished road
Question Changing Xcode compiler

Is there a way to change what compiler Xcode uses (other than between GCC 3.1 or 3.3)? I work with writing code for the motorola 68HC1x, and would like to be able to write and assemble/compile the code using Xcode. Currently I write the code in Xcode (since it has nice code formating features, such as automatic tabing), but then have to exit Xcode and use a command line tool to assemble the code. I would like to be able to simply click the build button and have it call said command, although obviously it would not be able to run the assembled code. Thanks.
__________________
iMac 17" FP 800MHZ/1024MB/75GB/SuperDrive/OS X 10.4.x
PowerMac G4 450 DP/256MB/30GB/OS X 10.4.x
Olympus C-5500 5.0 MP/5x Optical zoom Digital Camera
Reply With Quote
  #2  
Old August 15th, 2004, 09:53 PM
Krevinek's Avatar
Evil PPC Tweaker
 
Join Date: Oct 2001
Posts: 645
Thanks: 0
Thanked 0 Times in 0 Posts
Krevinek will become famous soon enough
You have to do a bit of custom work to do this, but it can be done. In fact, I did something very much like this for TIGCC, which is a custom GCC compiler aimed at producing software for the 68k TI calculators (89, 92+, Voyage). The trick is that you have to create an external target and write up a script which does the actual compile through your command-line tools. If you don't, then the linking will go through the native ld, and mess things up good.

If you like, I can send you the script I use along with the target template, or you can download TIGCC from www.ticalc.org and look through it yourself. The script I install is located at /usr/local/tigcc/bin/tixcode, while the templates are in the normal /Library/Application Support/Apple/Developer Tools/ directory after the install.

Be warned that my script isn't complete, as it doesn't handle cleaning of targets yet, and doesn't grab listings of files from XCode (which never passes them, so I just compile all the files in the directory into the object file, a bad practice, but I am looking into alternatives).
__________________
iMac G5 2.0Ghz (10.4.x, Main System)
MacBook 1.83Ghz (...Feburary)
"Sometimes I drive to run from all my demons \ Sometimes I drive so I can be alone \ Sometimes I drive to see the world in different light \ Sometimes I drive for no reason at all" - Assemblage 23, Drive
Reply With Quote
  #3  
Old August 20th, 2004, 02:23 PM
Official Volunteer
 
Join Date: Oct 2000
Location: UAF, Fairbanks, AK
Posts: 409
Thanks: 0
Thanked 0 Times in 0 Posts
macavenger is on a distinguished road
Thanks for you response. I would be very interested in seeing your script and target template. Although I have used Xcode a fair amount, I have done very little work with targets, and most of that was pre-Xcode developer tools.
__________________
iMac 17" FP 800MHZ/1024MB/75GB/SuperDrive/OS X 10.4.x
PowerMac G4 450 DP/256MB/30GB/OS X 10.4.x
Olympus C-5500 5.0 MP/5x Optical zoom Digital Camera
Reply With Quote
  #4  
Old August 24th, 2004, 02:29 PM
Krevinek's Avatar
Evil PPC Tweaker
 
Join Date: Oct 2001
Posts: 645
Thanks: 0
Thanked 0 Times in 0 Posts
Krevinek will become famous soon enough
Well, I packaged the XCode targets, and the build script into a zip file and posted it onto my webspace.

http://home.comcast.net/~krevnik/fil..._Mac_XCode.zip

There isn't much in the way of comments, so gather a list of questions and ask, and I will respond as quickly as I can with my busy schedule. Sorry for the delay.
__________________
iMac G5 2.0Ghz (10.4.x, Main System)
MacBook 1.83Ghz (...Feburary)
"Sometimes I drive to run from all my demons \ Sometimes I drive so I can be alone \ Sometimes I drive to see the world in different light \ Sometimes I drive for no reason at all" - Assemblage 23, Drive
Reply With Quote
  #5  
Old August 30th, 2004, 02:23 PM
Official Volunteer
 
Join Date: Oct 2000
Location: UAF, Fairbanks, AK
Posts: 409
Thanks: 0
Thanked 0 Times in 0 Posts
macavenger is on a distinguished road
Thanks. I've downloaded the files, but it might be a little while before I get a chance to really look at them. All depends on what my class schedule ends up like over the next few weeks.
__________________
iMac 17" FP 800MHZ/1024MB/75GB/SuperDrive/OS X 10.4.x
PowerMac G4 450 DP/256MB/30GB/OS X 10.4.x
Olympus C-5500 5.0 MP/5x Optical zoom Digital Camera
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -5. The time now is 11:30 AM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.