1 --- gcc-5465-orig/build_gcc 2007-07-20 13:53:27.000000000 -0400
2 +++ gcc-5465/build_gcc 2008-02-26 13:26:49.000000000 -0500
4 CONFIGFLAGS="--disable-checking -enable-werror \
6 --mandir=\${prefix}/share/man \
7 - --enable-languages=c,objc,c++,obj-c++ \
8 + --enable-languages=c,objc,c++,obj-c++,d \
9 --program-transform-name=/^[cg][^.-]*$/s/$/-$MAJ_VERS/ \
10 --with-gxx-include-dir=\${prefix}/include/c++/$LIBSTDCXX_VERSION \
11 --with-slibdir=/usr/lib \
12 - --build=$BUILD-apple-darwin$DARWIN_VERS"
13 + --build=$BUILD-apple-darwin$DARWIN_VERS \
14 + $EXTRA_CONFIG_FLAGS"
16 # Figure out how many make processes to run.
17 SYSCTL=`sysctl -n hw.activecpu`
19 # Unset RC_DEBUG_OPTIONS because it causes the bootstrap to fail.
21 make $MAKEFLAGS $BOOTSTRAP CFLAGS="$CFLAGS" CXXFLAGS="$CFLAGS" || exit 1
22 -make $MAKEFLAGS html CFLAGS="$CFLAGS" CXXFLAGS="$CFLAGS" || exit 1
23 +#make $MAKEFLAGS html CFLAGS="$CFLAGS" CXXFLAGS="$CFLAGS" || exit 1
24 make $MAKEFLAGS DESTDIR=$DIR/dst-$BUILD-$BUILD install-gcc install-target \
25 CFLAGS="$CFLAGS" CXXFLAGS="$CFLAGS" || exit 1
31 -HTMLDIR="/Developer/Documentation/DocSets/com.apple.ADC_Reference_Library.DeveloperTools.docset/Contents/Resources/Documents/documentation/DeveloperTools"
32 -mkdir -p ".$HTMLDIR" || exit 1
33 -cp -Rp $DIR/obj-$BUILD-$BUILD/gcc/HTML/* ".$HTMLDIR/" || exit 1
34 +#HTMLDIR="/Developer/Documentation/DocSets/com.apple.ADC_Reference_Library.DeveloperTools.docset/Contents/Resources/Documents/documentation/DeveloperTools"
35 +#mkdir -p ".$HTMLDIR" || exit 1
36 +#cp -Rp $DIR/obj-$BUILD-$BUILD/gcc/HTML/* ".$HTMLDIR/" || exit 1
39 mkdir -p .$DEST_ROOT/share || exit 1
42 # The native drivers ('native' is different in different architectures).
43 BIN_FILES=`ls $DIR/dst-$BUILD-$BUILD$DEST_ROOT/bin | grep '^[^-]*-[0-9.]*$' \
44 - | grep -v gccbug | grep -v gcov || exit 1`
45 + | grep -v gccbug | grep -v gcov | grep -v gdmd || exit 1`
47 for f in $BIN_FILES ; do
48 lipo -output .$DEST_ROOT/bin/$f -create $DIR/dst-*$DEST_ROOT/bin/$f || exit 1
50 $DIR/dst-*-$t$DEST_ROOT/bin/$t-apple-darwin$DARWIN_VERS-gcc-$VERS || exit 1
51 lipo -output .$DEST_ROOT/bin/$t-apple-darwin$DARWIN_VERS-g++-$VERS -create \
52 $DIR/dst-*-$t$DEST_ROOT/bin/$t-apple-darwin$DARWIN_VERS-g++* || exit 1
53 + lipo -output .$DEST_ROOT/bin/$t-apple-darwin$DARWIN_VERS-gdc-$VERS -create \
54 + $DIR/dst-*-$t$DEST_ROOT/bin/$t-apple-darwin$DARWIN_VERS-gdc* || exit 1
62 +# GDC: Phobos and gdmd
63 +if test -e $DIR/dst-$BUILD-$BUILD$DEST_ROOT/include/d2; then
68 +cp -p $DIR/dst-$BUILD-$BUILD$DEST_ROOT/bin/gdmd-* $DEST_DIR$DEST_ROOT/bin
69 +cp -pR $DIR/dst-$BUILD-$BUILD$DEST_ROOT/include/d$phobos_sfx $DEST_DIR$DEST_ROOT/include \
72 +for t in $TARGETS ; do
73 + if test $t = $BUILD ; then
74 + phobos_lib_dir="$DIR/dst-$BUILD-$t$DEST_ROOT/lib"
76 + cp -pR $DIR/dst-$BUILD-$t$DEST_ROOT/include/d$phobos_sfx/$VERS/$t-apple-darwin$DARWIN_VERS \
77 + $DEST_DIR$DEST_ROOT/include/d$phobos_sfx/$VERS || exit 1
78 + phobos_lib_dir="$DIR/dst-$BUILD-$t$DEST_ROOT/$t-apple-darwin$DARWIN_VERS/lib"
80 + phobos_lib_list="$phobos_lib_list $phobos_lib_dir/libgphobos$phobos_sfx.a"
82 + # Get 64-bit variants
84 + if test "$t" = i686; then
85 + other_libdir="x86_64"
86 + elif test "$t" = powerpc; then
87 + other_libdir="ppc64"
89 + if test -n "$other_libdir"; then
90 + other_phobos="$phobos_lib_dir/$other_libdir/libgphobos$phobos_sfx.a"
91 + if test -r "$other_phobos"; then
92 + phobos_lib_list="$phobos_lib_list $other_phobos"
96 +lipo -output $DEST_DIR$DEST_ROOT/lib/libgphobos$phobos_sfx.a -create $phobos_lib_list || exit 1
98 # Add extra man page symlinks for 'c++' and for arch-specific names.
99 MDIR=$DEST_DIR$DEST_ROOT/share/man/man1
100 ln -f $MDIR/g++-$MAJ_VERS.1 $MDIR/c++-$MAJ_VERS.1 || exit 1
102 -L$DIR/obj-$h-$BUILD/libiberty/ \
103 -L$DIR/obj-$h-$h/libiberty/ \
104 -o $DEST_DIR/$DEST_ROOT/bin/tmp-$h-g++-$MAJ_VERS || exit 1
106 + $DIR/dst-$BUILD-$h$DEST_ROOT/bin/$h-apple-darwin$DARWIN_VERS-gcc-$VERS \
107 + $ORIG_SRC_DIR/driverdriver.c \
108 + -DPDN="\"-apple-darwin$DARWIN_VERS-gdc-$VERS\"" \
109 + -DIL="\"$DEST_ROOT/bin/\"" -I $ORIG_SRC_DIR/include \
110 + -I $ORIG_SRC_DIR/gcc -I $ORIG_SRC_DIR/gcc/config \
111 + -liberty -L$DIR/dst-$BUILD-$h$DEST_ROOT/lib/ \
112 + -L$DIR/dst-$BUILD-$h$DEST_ROOT/$h-apple-darwin$DARWIN_VERS/lib/ \
113 + -L$DIR/obj-$h-$BUILD/libiberty/ \
114 + -L$DIR/obj-$h-$h/libiberty/ \
115 + -o $DEST_DIR/$DEST_ROOT/bin/tmp-$h-gdc-$MAJ_VERS || exit 1
117 # APPLE LOCAL end ARM native compiler support
119 @@ -394,10 +444,24 @@
120 lipo -output $DEST_DIR/$DEST_ROOT/bin/g++-$MAJ_VERS -create \
121 $DEST_DIR/$DEST_ROOT/bin/tmp-*-g++-$MAJ_VERS || exit 1
123 +lipo -output $DEST_DIR/$DEST_ROOT/bin/gdc-$MAJ_VERS -create \
124 + $DEST_DIR/$DEST_ROOT/bin/tmp-*-gdc-$MAJ_VERS || exit 1
126 ln -f $DEST_DIR/$DEST_ROOT/bin/g++-$MAJ_VERS $DEST_DIR/$DEST_ROOT/bin/c++-$MAJ_VERS || exit 1
128 rm $DEST_DIR/$DEST_ROOT/bin/tmp-*-gcc-$MAJ_VERS || exit 1
129 rm $DEST_DIR/$DEST_ROOT/bin/tmp-*-g++-$MAJ_VERS || exit 1
130 +rm $DEST_DIR/$DEST_ROOT/bin/tmp-*-gdc-$MAJ_VERS || exit 1
133 +for h in $HOSTS ; do
134 + $DEST_DIR$DEST_ROOT/bin/$h-apple-darwin$DARWIN_VERS-gdc-$VERS \
135 + $ORIG_SRC_DIR/gcc/d/rdmd.d \
136 + -o $DEST_DIR/$DEST_ROOT/bin/tmp-$h-rdmd || exit 1
138 +lipo -output $DEST_DIR/$DEST_ROOT/bin/rdmd -create \
139 + $DEST_DIR/$DEST_ROOT/bin/tmp-*-rdmd || exit 1
140 +rm $DEST_DIR/$DEST_ROOT/bin/tmp-*-rdmd || exit 1
142 ########################################
143 # Create SYM_DIR with information required for debugging.