Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add a custom compiler to XCode 3.2

I have a working gcc 4.3.3 toolchain for an ARM Cortex-m3 and would like to integrate it into XCode.

Is there a way to set up XCode (3.2) to use this gcc toolchain instead of the built-in GCC 4.2?

What I've tried so far: I've added a modified copy of the GCC 4.2.xcplugin and changed the name, version and executable path. It shows up in XCode but whenever I set the "C/C++ Compiler Version" to the custom compiler it fails with

Invalid value '4.3.3' for GCC_VERSION

It seems like the valid version numbers are hardcoded somewhere else because even when I remove the original GCC 4.2.xcplugin, the value 4.2 remains valid (but is not visible in the "C/C++ Compiler Version" drop down anymore).

like image 958
rluba Avatar asked Dec 21 '09 17:12

rluba


2 Answers

FYI - I got gcc 4.4 integrated into latest Xcode 3.2.4 including flags - see blog at http://skurganov.blogspot.com/

like image 81
Sergey Avatar answered Oct 05 '22 23:10

Sergey


I'm working on this myself.

Currently, it's looking like you have to inherit a built in compiler ref spec.

Adding a key of:

BasedOn = "com.apple.compilers.gcc.4_2";

Makes the plugin load correctly. However, there's the issue of invalid flags due to the apple specific compiler patches. I'm working on that part right now.

like image 31
jkyle Avatar answered Oct 05 '22 23:10

jkyle