These options are defined for all architectures running the Darwin operating system.
FSF GCC on Darwin does not create ‘fat’ object files; it creates
an object file for the single architecture that GCC was built to
target. Apple’s GCC on Darwin does create ‘fat’ files if multiple
-arch options are used; it does so by running the compiler or
linker multiple times and joining the results together with
The subtype of the file created (like
i686) is determined by the flags that specify the ISA
that GCC is targeting, like
-force_cpusubtype_ALL option can be used to override this.
The Darwin tools vary in their behavior when presented with an ISA
mismatch. The assembler,
as, only permits instructions to
be used that are valid for the subtype of the file it is generating,
so you cannot put 64-bit instructions in a
ppc750 object file.
The linker for shared libraries,
and prints an error if asked to create a shared library with a less
restrictive subtype than its input files (for instance, trying to put
ppc970 object file in a
ppc7400 library). The linker
for executables, ld, quietly gives the executable the most
restrictive subtype of any of its input files.
Add the framework directory
dirto the head of the list of directories to be searched for header files. These directories are interleaved with those specified by
-Ioptions and are scanned in a left-to-right order.
A framework directory is a directory with frameworks in it. A framework is a directory with a
PrivateHeadersdirectory contained directly in it that ends in
.framework. The name of a framework is the name of this directory excluding the
.framework. Headers associated with the framework are found in one of those two directories, with
Headersbeing searched first. A subframework is a framework directory that is in a framework’s
Frameworksdirectory. Includes of subframework headers can only appear in a header of a framework that contains the subframework, or in a sibling subframework header. Two subframeworks are siblings if they occur in the same framework. A subframework should not have the same name as a framework; a warning is issued if this is violated. Currently a subframework cannot have subframeworks; in the future, the mechanism may be extended to support this. The standard frameworks can be found in
/Library/Frameworks. An example include looks like
#include <Framework/header.h>, where
Frameworkdenotes the name of the framework and
header.his found in the
-Fexcept the directory is a treated as a system directory. The main difference between this
-Fis that with
-iframeworkthe compiler does not warn about constructs contained within header files found via
dir. This option is valid only for the C family of languages.
Emit debugging information for symbols that are used. For stabs debugging format, this enables
-feliminate-unused-debug-symbols. This is by default ON.
Emit debugging information for all symbols and types.
The earliest version of MacOS X that this executable will run on is
version. Typical values of
If the compiler was built to use the system’s headers by default, then the default for this option is the system version on which the compiler is running, otherwise the default is to make choices that are compatible with as many systems and code bases as possible.
Enable kernel development mode. The
-fno-rttiwhere applicable. This mode also sets
-mlong-branchfor PowerPC targets.
Override the defaults for
sizeof(bool)==1. By default
4when compiling for Darwin/PowerPC and
1when compiling for Darwin/x86, so this option has no effect on x86.
-mone-byte-boolswitch causes GCC to generate code that is not binary compatible with code generated without that switch. Using this switch may require recompiling all other modules in a program, including system libraries. Use this switch to conform to a non-default data model.
- -mfix-and-continue, -ffix-and-continue, -findirect-data#
Generate code suitable for fast turnaround development, such as to allow GDB to dynamically load
.ofiles into already-running programs.
-ffix-and-continueare provided for backwards compatibility.
Loads all members of static archive libraries. See man ld(1) for more information.
Cause the errors having to do with files that have the wrong architecture to be fatal.
Causes the output file to be marked such that the dynamic linker will bind all undefined references when the file is loaded or launched.
Produce a Mach-o bundle format file. See man ld(1) for more information.
- -bundle_loader executable#
This option specifies the
executablethat will load the build output file being linked. See man ld(1) for more information.
When passed this option, GCC produces a dynamic library instead of an executable when linking, using the Darwin
This causes GCC’s output file to have the
ALLsubtype, instead of one controlled by the
- -allowable_client client_name#
These options are passed to the Darwin linker. The Darwin linker man page describes them in detail.