
(Note: I previously recommended the -traditional-cpp option. However, some code doesn't compile with Apple's precompiler, so you must use the -no-cpp-precomp option to get the standard precompiler. The latter one is used by default, because it is faster. One is the standard precompiler (from gcc 2.95.2), the other one is a special precompiler written by Apple, with support for precompiled headers. The preprocessor ( cpp) is available in two versions. The compiler is based on the gcc 2.95.2 suite, with modifications to support the Objective C language and some Darwin quirks. Long story: The compiler tool chain in the Mac OS X Developer Tools is a strange beast. If you get errors related to macros, use the -no-cpp-precomp option. Most packages won't build shared libraries.

Short story: The compiler is a gcc derivate, but installed as cc you may have to patch Makefiles.

For example, Apple ships both BSD make and GNU make, with GNU make installed as the default. Apple is not as strict as other BSDs though, and goes for useful compromises. The user-space tools and libraries shipped with Darwin are mostly of the BSD persuation, as opposed to the GNU tools you get with Linux.

Although Mach originally is a micro-kernel design, the BSD kernel that sits on top of it is monolithic and the two are now so intertwined that they must be regarded as a single monolithic kernel. The BSD heritage still shows, in fact Darwin was recently modernized with code from FreeBSD and NetBSD.ĭarwin's kernel is based on a combination of Mach 3.0, BSD, and proprietary functionality like the object-oriented driver layer IOKit. Lore has it that it was initially forked off 4.4BSD Lite.

Loadable Modulesĭarwin is a Unix-like operating system that evolved from NeXTStep / OpenStep. Both systems will be referred to as Darwin, since Mac OS X is actually a superset of Darwin. Much of the information here applies to both Mac OS X version 10.x.x and "pure" Darwin systems. This document contains hints for porting Unix applications to Darwin and Mac OS X. Porting Unix software to Darwin and Mac OS X Fink Documentation - Porting Unix software to Darwin and Mac OS X
