Opened 11 years ago

Closed 10 years ago

#1053 closed defect (fixed)

Support newer Xcode versions on Mac

Reported by: felix winkelmann Owned by:
Priority: major Milestone: someday
Component: build system Version: 4.8.x
Keywords: Cc:
Estimated difficulty:

Description

in Xcode 4 and 5 the development tools are now all located under the Applications/Xcode.app directory (by default). It should be possible to check this and setup all paths automatically without requiring the user to modify the PATH.

Note that the paths changed between Xcode 4 and 5 (of course).

Additionally -isysroot options have to be set when running the compiler. This is particularly important when you want to build for iOS (either the simulator or the device).

Attached are two patches that extend the build-system and some scripts that try to figure out the correct location of Xcode. Note that this hasn't been adapted to Xcode 5 yet (but I can assist if someone is interested).

Attachments (2)

0001-Add-set-of-extra-options-for-compiler-linker-and-ass.patch (12.8 KB) - added by felix winkelmann 11 years ago.
0002-Detect-Xcode-sdk-and-toolchain-correctly-for-newer-x.patch (6.5 KB) - added by felix winkelmann 11 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 11 years ago by sjamaan

Why doesn't the patch simply append to C_COMPILER_OPIONS?

This EXTRA_OPTIONS sounds a bit crufty, and it isn't there on all platforms; the patch only adds it to the osx and the mingw makefile (the latter doesn't seem to use it)

comment:2 in reply to:  1 Changed 11 years ago by felix winkelmann

Replying to sjamaan:

Why doesn't the patch simply append to C_COMPILER_OPIONS?

This EXTRA_OPTIONS sounds a bit crufty, and it isn't there on all platforms; the patch only adds it to the osx and the mingw makefile (the latter doesn't seem to use it)

The patch is probably insufficient, it is just a first attempt. C_COMPILER_OPTIONS doesn't propagate everywhere, I think in particular not to the options stored in chicken-config.h.
Also, to allow customization of compiler options when building, it is currently necessary to override C_COMPILER_OPTIMIZATION_OPTIONS, possibly nuking those options that are enabled by default (and which we know, work). The build should provide an initially empty setting for user-defined compilation options.

comment:3 Changed 10 years ago by sjamaan

Resolution: fixed
Status: newclosed

Implemented a while ago, by c6a6a26225620b566f8bc487cc4180de55555a2a

Note: See TracTickets for help on using tickets.