Bring arm_mangle_type back, but use it for HF name mangling only.
[llvm-gcc-4.2.git] / README.Apple
blob228cb60fceee5dd85e32d7ac22c72d881b61d3ff
1 APPLE LOCAL file documentation
2 //===----------------------------------------------------------------------===//
4 NOTE: This file contains a description of the non-llvm GCC that llvm-gcc is 
5 based on.  For information on building llvm-gcc for any platform (including
6 Apple), please follow the directions in README.LLVM.
8 //===----------------------------------------------------------------------===//
11 This file describes Apple's version of GCC 4.x modified for Darwin /
12 Mac OS X.  Although Apple's stated policy is to contribute all of its
13 GCC work to the FSF GCC mainstream, at any given moment there will be
14 changes that are permanently unacceptable for FSF GCC, in need of
15 rework before acceptance, or that we simply aren't ready to send in.
16 This version of GCC contains all those changes.
18 In keeping with provision 2a of the GPL, each Apple change is marked
19 with a comment saying "APPLE LOCAL", followed by optional words "begin",
20 "end", or "file", followed by a short phrase describing the change
21 generally ("AltiVec" for instance, if the change is related to AltiVec
22 support).
24 BUILDING, THE APPLE WAY
26 To build things the Apple way, just say (in the source directory)
28         mkdir -p build/obj build/dst build/sym
29         gnumake install RC_OS=macos RC_ARCHS=ppc TARGETS=ppc \
30                 SRCROOT=`pwd` OBJROOT=`pwd`/build/obj \
31                 DSTROOT=`pwd`/build/dst SYMROOT=`pwd`/build/sym
33 This will configure and then do a full bootstrap build, with all the
34 results going into the subdirectory build/ that you created.  The
35 final results will be in the "dest root" directory build/dst, in the
36 form of an image of the installed directory structure.  The drivers
37 and other user-visible tools have a "-4.0" suffixed, so for instance the
38 driver is /usr/bin/gcc-4.0
40 To install the results, become root and do
42         ditto build/dst /
44 Various knobs and switches are available, but even so, the Apple
45 makefile machinery is mainly designed for mass builds of all the
46 projects that make up Darwin and/or Mac OS X, and is thus not as
47 flexible as the standard GCC build process.
49 To build for i386 Darwin, set TARGETS=i386.  To build universal, set
50 RC_ARCHS='i386 ppc' TARGETS='i386 ppc'.  Note that you must have a
51 complete set of universal libraries and i386-targeting cctools for this
52 all to work.
54 You can set the four *ROOT variables to point anywhere, but they must
55 always be absolute pathnames.
57 This way of building may or may not work on non-Macs, and if it
58 doesn't, you're on your own.
60 BUILDING, THE FSF WAY
62 In general, standard GCC procedures work for building this version.
63 We recommend that you build in a separate objdir; create a sibling
64 to the toplevel source dir, call it whatever you want, cd into it,
65 and say "../gcc/configure".  This way you can have more than one
66 build using the same set of sources.
68 If you insist on building in the source directory using "./configure",
69 the GNUmakefile that supports the Apple build process (see above) will
70 shadow your makefile, and you will need to override this behavior by
71 saying "make -f Makefile" (or by moving GNUmakefile out of the way).
73 For instance:
75         mkdir darwin
76         cd darwin
77         ../configure --prefix=/tmp/testplace
78         make bootstrap
79         make install
81 does a full build, plus two generations of self-compilation for
82 GCC proper, then an install.
84 To avoid building every language, use --enable-languages argument to
85 configure.  For instance, '--enable-languages=objc,c++,obj-c++' skips
86 the Fortran and Java compilers.  (The C compiler will always be
87 built.)
89 To build an x86 cross-compiler, add "--target=i386-darwin" to the
90 configure line.  The x86 compiler works, but to make it useful you
91 will need libraries and such from x86 Darwin.