[llvm-branch-commits] [llvm-gcc-branch] r72067 - in /llvm-gcc-4.2/branches/Apple/Xcode-3.1.1: build_gcc configure configure.in driverdriver.c gcc/Makefile.in gcc/real.h
Evan Cheng
evan.cheng at apple.com
Mon May 18 16:20:12 PDT 2009
Author: evancheng
Date: Mon May 18 18:19:59 2009
New Revision: 72067
URL: http://llvm.org/viewvc/llvm-project?rev=72067&view=rev
Log:
Makefile changes to get this version of llvmgcc42 built on SnowLeopard.
Modified:
llvm-gcc-4.2/branches/Apple/Xcode-3.1.1/build_gcc
llvm-gcc-4.2/branches/Apple/Xcode-3.1.1/configure
llvm-gcc-4.2/branches/Apple/Xcode-3.1.1/configure.in
llvm-gcc-4.2/branches/Apple/Xcode-3.1.1/driverdriver.c
llvm-gcc-4.2/branches/Apple/Xcode-3.1.1/gcc/Makefile.in
llvm-gcc-4.2/branches/Apple/Xcode-3.1.1/gcc/real.h
Modified: llvm-gcc-4.2/branches/Apple/Xcode-3.1.1/build_gcc
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Xcode-3.1.1/build_gcc?rev=72067&r1=72066&r2=72067&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Xcode-3.1.1/build_gcc (original)
+++ llvm-gcc-4.2/branches/Apple/Xcode-3.1.1/build_gcc Mon May 18 18:19:59 2009
@@ -6,9 +6,7 @@
# -arch arguments are different than configure arguments. We need to
# translate them.
-TRANSLATE_ARCH="sed -e s/ppc/powerpc/ -e s/i386/i686/ -e s/ppc64/powerpc64/"
-TRANSLATE_TARGETS="sed -e s/ppc/powerpc/ -e s/i386/i686/ -e s/x86_64// \
- -e s/powerpc64// -e s/ppc64//"
+TRANSLATE_ARCH="sed -e s/ppc/powerpc/ -e s/i386/i686/ -e s/armv6/arm/"
OMIT_X86_64="sed -e s/x86_64//"
# Build GCC the "Apple way".
@@ -23,7 +21,7 @@
# compilers will generate code for. If the current machine isn't in
# the list, a compiler for it will get built anyway, but won't be
# installed.
-TARGETS=`echo $2 | $TRANSLATE_TARGETS | $OMIT_X86_64`
+TARGETS=`echo $2 | $TRANSLATE_ARCH | $OMIT_X86_64 | sed -e s,\\',,g`
# The GNU makefile target ('bootstrap' by default).
BOOTSTRAP=${BOOTSTRAP-bootstrap}
@@ -31,16 +29,22 @@
bootstrap=--disable-bootstrap
fi
-# The B&I build srcript (~rc/bin/buildit) accepts an '-othercflags'
+# Language front-ends to build. This also affects
+# whether the C++ driver and driver-driver are installed
+LANGUAGES=${LANGUAGES-c,objc,c++,obj-c++}
+
+# The B&I build script (~rc/bin/buildit) accepts an '-othercflags'
# command-line flag, and captures the argument to that flag in
# $RC_NONARCH_CFLAGS (and mysteriously prepends '-pipe' thereto).
# We will allow this to override the default $CFLAGS and $CXXFLAGS.
+# LLVM LOCAL begin
if [ "x$LLVM_DEBUG" == "x" ]; then
CFLAGS="-g -O2 ${RC_NONARCH_CFLAGS/-pipe/}"
else
CFLAGS="-g"
fi
+# LLVM LOCAL end
# This isn't a parameter; it is the architecture of the current machine.
BUILD=`arch | $TRANSLATE_ARCH`
@@ -106,15 +110,71 @@
# This is the libstdc++ version to use.
LIBSTDCXX_VERSION=4.2.1
+# LLVM LOCAL begin
# DO NOT USE $DEST_ROOT to check LIBSTDCXX_VERSION here. Directly use /usr here.
# $DEST_ROOT is /Developer for llvm-gcc
if [ ! -d "/usr/include/c++/$LIBSTDCXX_VERSION" ]; then
LIBSTDCXX_VERSION=4.0.0
fi
+NON_ARM_CONFIGFLAGS="--with-gxx-include-dir=/usr/include/c++/$LIBSTDCXX_VERSION"
+# LLVM LOCAL end
DARWIN_VERS=`uname -r | sed 's/\..*//'`
echo DARWIN_VERS = $DARWIN_VERS
+# APPLE LOCAL begin ARM
+ARM_LIBSTDCXX_VERSION=4.2.1
+ARM_CONFIGFLAGS="--with-gxx-include-dir=/usr/include/c++/$ARM_LIBSTDCXX_VERSION"
+
+ARM_PLATFORM=/Developer/Platforms/iPhoneOS.platform
+ARM_IPHONE_SDK=iPhoneOS${IPHONEOS_DEPLOYMENT_TARGET}.Internal.sdk
+ARM_EXTRA_SDK=/Developer/SDKs/Extra
+
+# Check if the build system is running Leopard or earlier. If the Legacy PDK
+# is not installed, the toolchain in / will not support ARM. Use the iPhone
+# platform directory instead.
+if [ $DARWIN_VERS -le 9 -a ! -d $ARM_EXTRA_SDK ]; then
+ ARM_TOOLROOT=$ARM_PLATFORM
+else
+ ARM_TOOLROOT=/
+fi
+
+# ARM may require a sysroot option.
+ARM_SYSROOT=$ARM_EXTRA_SDK
+# If the default sysroot does not exist, try a different location.
+if [ ! -d $ARM_SYSROOT ]; then
+ ARM_SYSROOT=$ARM_PLATFORM/Developer/SDKs/$ARM_IPHONE_SDK
+fi
+
+# Split the MACOSX_DEPLOYMENT_TARGET into major/minor versions.
+if [ -z "$MACOSX_DEPLOYMENT_TARGET" ]; then
+ # Anything 10.5 or earlier is treated the same below.
+ MACOSX_DEPLOYMENT_MAJOR=10
+ MACOSX_DEPLOYMENT_MINOR=5
+else
+ MACOSX_DEPLOYMENT_MAJOR=`echo $MACOSX_DEPLOYMENT_TARGET | sed 's/\..*//'`
+ MACOSX_DEPLOYMENT_MINOR=`echo $MACOSX_DEPLOYMENT_TARGET | sed 's/[0-9]*\.\([0-9]*\).*/\1/'`
+fi
+if [ $MACOSX_DEPLOYMENT_MAJOR -eq 10 -a \
+ $MACOSX_DEPLOYMENT_MINOR -le 5 ]; then
+ ARM_CONFIGFLAGS="$ARM_CONFIGFLAGS --with-sysroot=\"$ARM_SYSROOT\""
+else
+ ARM_SYSROOT=/
+fi
+
+# If building an ARM target, check that the required directories exist.
+if echo $TARGETS | grep arm; then
+ if [ ! -d $ARM_SYSROOT ]; then
+ echo "Error: cannot find ARM SDK to build ARM target"
+ exit 1
+ fi
+ if [ ! -d $ARM_TOOLROOT ]; then
+ echo "Error: $ARM_TOOLROOT directory is not installed"
+ exit 1
+ fi
+fi
+# APPLE LOCAL end ARM
+
# If the user has CC set in their environment unset it now
unset CC
@@ -129,14 +189,14 @@
mkdir $SRC_DIR || exit 1
ln -s $ORIG_SRC_DIR/* $SRC_DIR/ || exit 1
rm -rf $SRC_DIR/tcl $SRC_DIR/expect $SRC_DIR/dejagnu || exit 1
-
# Also remove libstdc++ since it is built from a separate project.
+# LLVM LOCAL: The following line was commented out; uncomment it.
rm -rf $SRC_DIR/libstdc++-v3 || exit 1
# Clean out old specs files
rm -f /usr/lib/gcc/*/4.0.0/specs
# These are the configure and build flags that are used.
-
+# LLVM LOCAL begin
if [ "x$LLVM_DEBUG" == "x" ]; then
CHECKING_FLAGS="--disable-checking --enable-werror"
else
@@ -146,14 +206,12 @@
CONFIGFLAGS="$CHECKING_FLAGS \
--prefix=$DEST_ROOT \
--mandir=\${prefix}/share/man \
- --enable-languages=c,objc,c++,obj-c++ \
+ --enable-languages=$LANGUAGES \
--program-prefix=llvm- \
--program-transform-name=/^[cg][^.-]*$/s/$/-$MAJ_VERS/ \
- --with-gxx-include-dir=/usr/include/c++/$LIBSTDCXX_VERSION \
--with-slibdir=/usr/lib \
--build=$BUILD-apple-darwin$DARWIN_VERS"
-# LLVM LOCAL begin
if [ "$ENABLE_LLVM" == true ]; then
CONFIGFLAGS="$CONFIGFLAGS --enable-llvm=$LLVMCORE_PATH"
fi
@@ -177,8 +235,21 @@
# The $LOCAL_MAKEFLAGS variable can be used to override $MAKEFLAGS.
MAKEFLAGS=${LOCAL_MAKEFLAGS-"-j $SYSCTL"}
+BUILD_CXX=0
+for lang in `echo $LANGUAGES | sed 's/,/ /g'`; do
+ if [ $lang = "c++" -o $lang = "obj-c++" ]; then
+ BUILD_CXX=1
+ break
+ fi
+done
+
+# Unset this, because GCC uses this variable in its makefiles
+unset LANGUAGES
+
# LLVM LOCAL begin
if [ "$ENABLE_LLVM" == true ]; then
+ # Indicate the llvm-gcc is being built "Apple style".
+ MAKEFLAGS="$MAKEFLAGS BUILD_LLVM_APPLE_STYLE=1"
# Build llvm-gcc in 'dylib mode'.
MAKEFLAGS="$MAKEFLAGS BUILD_LLVM_INTO_A_DYLIB=1"
MAKEFLAGS="$MAKEFLAGS LLVM_VERSION_INFO=$LLVM_SUBMIT_VERSION"
@@ -191,6 +262,7 @@
cd $DIR/obj-$BUILD-$BUILD || exit 1
if [ \! -f Makefile ]; then
$SRC_DIR/configure $bootstrap $CONFIGFLAGS \
+ $NON_ARM_CONFIGFLAGS \
--host=$BUILD-apple-darwin$DARWIN_VERS --target=$BUILD-apple-darwin$DARWIN_VERS || exit 1
fi
# Unset RC_DEBUG_OPTIONS because it causes the bootstrap to fail.
@@ -203,12 +275,12 @@
CFLAGS="$CFLAGS" CXXFLAGS="$CFLAGS" || exit 1
# Add the compiler we just built to the path, giving it appropriate names.
-# LLVM LOCAL Support for non /usr $DEST_ROOT
+# LLVM LOCAL begin Support for non /usr $DEST_ROOT
D=$DIR/dst-$BUILD-$BUILD$DEST_ROOT/bin
ln -f $D/llvm-gcc $D/gcc || exit 1
ln -f $D/gcc $D/$BUILD-apple-darwin$DARWIN_VERS-gcc || exit 1
-# LLVM LOCAL Support for non /usr $DEST_ROOT
PATH=$DIR/dst-$BUILD-$BUILD$DEST_ROOT/bin:$PATH
+# LLVM LOCAL end Support for non /usr $DEST_ROOT
# The cross-tools' build process expects to find certain programs
# under names like 'i386-apple-darwin$DARWIN_VERS-ar'; so make them.
@@ -219,18 +291,34 @@
for prog in ar nm ranlib strip lipo ld ; do
for t in `echo $TARGETS $HOSTS | sort -u`; do
P=$DIR/bin/${t}-apple-darwin$DARWIN_VERS-${prog}
+ # APPLE LOCAL begin toolroot
+ if [ $t = "arm" ]; then
+ toolroot=$ARM_TOOLROOT
+ else
+ toolroot=
+ fi
+ # APPLE LOCAL end toolroot
echo '#!/bin/sh' > $P || exit 1
- echo 'exec /usr/bin/'${prog}' "$@"' >> $P || exit 1
+ # APPLE LOCAL insert toolroot below
+ echo 'exec '${toolroot}'/usr/bin/'${prog}' "$@"' >> $P || exit 1
chmod a+x $P || exit 1
done
done
for t in `echo $1 $2 | sort -u`; do
gt=`echo $t | $TRANSLATE_ARCH`
P=$DIR/bin/${gt}-apple-darwin$DARWIN_VERS-as
+ # APPLE LOCAL begin toolroot
+ if [ $gt = "arm" ]; then
+ toolroot=$ARM_TOOLROOT
+ else
+ toolroot=
+ fi
+ # APPLE LOCAL end toolroot
echo '#!/bin/sh' > $P || exit 1
- echo 'for a; do case $a in -arch) exec /usr/bin/as "$@";; esac; done' >> $P || exit 1
- echo 'exec /usr/bin/as -arch '${t}' "$@"' >> $P || exit 1
+ # APPLE LOCAL insert toolroot below
+ echo 'for a; do case $a in -arch) exec '${toolroot}'/usr/bin/as "$@";; esac; done' >> $P || exit 1
+ echo 'exec '${toolroot}'/usr/bin/as -arch '${t}' "$@"' >> $P || exit 1
chmod a+x $P || exit 1
done
PATH=$DIR/bin:$PATH
@@ -250,16 +338,19 @@
mkdir -p $DIR/obj-$BUILD-$t $DIR/dst-$BUILD-$t || exit 1
cd $DIR/obj-$BUILD-$t || exit 1
if [ \! -f Makefile ]; then
+ # APPLE LOCAL begin ARM ARM_CONFIGFLAGS
$SRC_DIR/configure $CONFIGFLAGS --enable-werror-always \
+ `if [ $t = 'arm' ] ; then echo $ARM_CONFIGFLAGS ; else echo $NON_ARM_CONFIGFLAGS ; fi` \
--program-prefix=$t-apple-darwin$DARWIN_VERS- \
--host=$BUILD-apple-darwin$DARWIN_VERS --target=$t-apple-darwin$DARWIN_VERS || exit 1
+ # APPLE LOCAL end ARM ARM_CONFIGFLAGS
fi
make $MAKEFLAGS all CFLAGS="$CFLAGS" CXXFLAGS="$CFLAGS" || exit 1
make $MAKEFLAGS DESTDIR=$DIR/dst-$BUILD-$t install-gcc install-target \
CFLAGS="$CFLAGS" CXXFLAGS="$CFLAGS" || exit 1
# Add the compiler we just built to the path.
- # LLVM LOCAL Support for non /usr $DEST_ROOT
+ # LLVM LOCAL Support for non /usr $DEST_ROOT
PATH=$DIR/dst-$BUILD-$t/$DEST_ROOT/bin:$PATH
fi
done
@@ -267,7 +358,7 @@
# Rearrange various libraries, for no really good reason.
for t in $CROSS_TARGETS ; do
DT=$DIR/dst-$BUILD-$t
- # LLVM LOCAL begin Support for non /usr $DEST_ROOT
+ # LLVM LOCAL Support for non /usr $DEST_ROOT
D=`echo $DT/$DEST_ROOT/lib/gcc/$t-apple-darwin$DARWIN_VERS/$VERS`
mv $D/static/libgcc.a $D/libgcc_static.a || exit 1
mv $D/kext/libgcc.a $D/libcc_kext.a || exit 1
@@ -293,9 +384,12 @@
fi
if [ \! -f Makefile ]; then
+ # APPLE LOCAL begin ARM ARM_CONFIGFLAGS
$SRC_DIR/configure $CONFIGFLAGS \
+ `if [ $t = 'arm' ] && [ $h != 'arm' ] ; then echo $ARM_CONFIGFLAGS ; else echo $NON_ARM_CONFIGFLAGS ; fi` \
--program-prefix=$pp \
--host=$h-apple-darwin$DARWIN_VERS --target=$t-apple-darwin$DARWIN_VERS || exit 1
+ # APPLE LOCAL end ARM ARM_CONFIGFLAGS
fi
if [ $h = $t ] ; then
make $MAKEFLAGS all CFLAGS="$CFLAGS" CXXFLAGS="$CFLAGS" || exit 1
@@ -319,14 +413,14 @@
# Clean out DEST_DIR in case -noclean was passed to buildit.
rm -rf * || exit 1
-# LLVM LOCAL begin - Don't install HTML docs.
+# LLVM LOCAL begin Don't install HTML docs.
if [ "$ENABLE_LLVM" == false ]; then
# HTML documentation
HTMLDIR="/Developer/Documentation/DocSets/com.apple.ADC_Reference_Library.DeveloperTools.docset/Contents/Resources/Documents/documentation/DeveloperTools"
mkdir -p ".$HTMLDIR" || exit 1
cp -Rp $DIR/obj-$BUILD-$BUILD/gcc/HTML/* ".$HTMLDIR/" || exit 1
fi
-# LLVM LOCAL end - Don't install docs.
+# LLVM LOCAL end Don't install docs.
# Manual pages
mkdir -p .$DEST_ROOT/share || exit 1
@@ -348,22 +442,26 @@
mkdir -p .$DL/$d || exit 1
done
for f in $LIBEXEC_FILES ; do
+ # LLVM LOCAL
if file $DIR/dst-*-$t$DL/$f | grep -q -E 'Mach-O (executable|dynamically linked shared library)' ; then
lipo -output .$DL/$f -create $DIR/dst-*-$t$DL/$f || exit 1
else
cp -p $DIR/dst-$BUILD-$t$DL/$f .$DL/$f || exit 1
fi
done
- # LLVM LOCAL fix broken link
+ # LLVM LOCAL begin fix broken link
ln -s ../../../../../bin/as .$DL/as
ln -s ../../../../../bin/ld .$DL/ld
+ # LLVM LOCAL end fix broken link
done
# bin
# The native drivers ('native' is different in different architectures).
+# LLVM LOCAL begin
mkdir .$DEST_ROOT/bin
cpp_files=`ls $DIR/dst-*$DEST_ROOT/bin/{llvm-cpp,cpp-$MAJ_VERS} 2>/dev/null`
lipo -output .$DEST_ROOT/bin/llvm-cpp-$MAJ_VERS -create $cpp_files || exit 1
+# LLVM LOCAL end
# gcov, which is special only because it gets built multiple times and lipo
# will complain if we try to add two architectures into the same output.
@@ -372,10 +470,10 @@
$DIR/dst-*-$TARG0$DEST_ROOT/bin/*gcov* || exit 1
# The fully-named drivers, which have the same target on every host.
for t in $TARGETS ; do
-# APPLE LOCAL LLVM build_gcc bug with non-/usr $DEST_ROOT
+# LLVM LOCAL build_gcc bug with non-/usr $DEST_ROOT
lipo -output .$DEST_ROOT/bin/$t-apple-darwin$DARWIN_VERS-llvm-gcc-$MAJ_VERS -create \
$DIR/dst-*-$t/$DEST_ROOT/bin/$t-apple-darwin$DARWIN_VERS-gcc-$VERS || exit 1
-# APPLE LOCAL LLVM build_gcc bug with non-/usr $DEST_ROOT
+# LLVM LOCAL build_gcc bug with non-/usr $DEST_ROOT
lipo -output .$DEST_ROOT/bin/$t-apple-darwin$DARWIN_VERS-llvm-g++-$MAJ_VERS -create \
$DIR/dst-*-$t/$DEST_ROOT/bin/$t-apple-darwin$DARWIN_VERS-*g++* || exit 1
done
@@ -383,14 +481,19 @@
# lib
mkdir -p .$DEST_ROOT/lib/gcc || exit 1
for t in $TARGETS ; do
-# APPLE LOCAL LLVM build_gcc bug with non-/usr $DEST_ROOT
+ # LLVM LOCAL build_gcc bug with non-/usr $DEST_ROOT
cp -Rp $DIR/dst-$BUILD-$t/$DEST_ROOT/lib/gcc/$t-apple-darwin$DARWIN_VERS \
.$DEST_ROOT/lib/gcc || exit 1
done
+# APPLE LOCAL begin native compiler support
+# libgomp is not built for ARM
+LIBGOMP_TARGETS=`echo $TARGETS | sed -E -e 's/(^|[[:space:]])arm($|[[:space:]])/ /'`
+LIBGOMP_HOSTS=`echo $HOSTS | $OMIT_X86_64 | sed -E -e 's/(^|[[:space:]])arm($|[[:space:]])/ /'`
+
# And copy libgomp stuff by hand...
-for t in $TARGETS ; do
- for h in $HOSTS ; do
+for t in $LIBGOMP_TARGETS ; do
+ for h in $LIBGOMP_HOSTS ; do
if [ $h = $t ] ; then
cp -p $DIR/dst-$h-$t$DEST_ROOT/lib/libgomp.a \
.$DEST_ROOT/lib/gcc/$t-apple-darwin$DARWIN_VERS/$VERS/ || exit 1
@@ -398,9 +501,9 @@
.$DEST_ROOT/lib/gcc/$t-apple-darwin$DARWIN_VERS/$VERS/ || exit 1
if [ $h = 'powerpc' ] ; then
cp -p $DIR/dst-$h-$t$DEST_ROOT/lib/ppc64/libgomp.a \
- .$DEST_ROOT/lib/gcc/$t-apple-darwin$DARWIN_VERS/$VERS/ppc64/
+ .$DEST_ROOT/lib/gcc/$t-apple-darwin$DARWIN_VERS/$VERS/ppc64/
cp -p $DIR/dst-$h-$t$DEST_ROOT/lib/ppc64/libgomp.spec \
- .$DEST_ROOT/lib/gcc/$t-apple-darwin$DARWIN_VERS/$VERS/ppc64/
+ .$DEST_ROOT/lib/gcc/$t-apple-darwin$DARWIN_VERS/$VERS/ppc64/
elif [ $h = 'i686' ] ; then
cp -p $DIR/dst-$h-$t$DEST_ROOT/lib/x86_64/libgomp.a \
.$DEST_ROOT/lib/gcc/$t-apple-darwin$DARWIN_VERS/$VERS/x86_64/ || exit 1
@@ -410,15 +513,23 @@
fi
done
done
+# APPLE LOCAL end native compiler support
-# FIXME: What is the motivation here ?
+if [ $BUILD_CXX -eq 1 ]; then
for t in $TARGETS ; do
- cp -p /usr/lib/libstdc++.6.dylib \
- .$DEST_ROOT/lib/gcc/$t-apple-darwin$DARWIN_VERS/$VERS/libstdc++.dylib \
- || exit 1
+ if [ "$t" == 'arm' ] ; then
+ cp -p $ARM_SYSROOT/usr/lib/libstdc++.6.dylib \
+ .$DEST_ROOT/lib/gcc/$t-apple-darwin$DARWIN_VERS/$VERS/libstdc++.dylib \
+ || exit 1
+ else
+ cp -p /usr/lib/libstdc++.6.dylib \
+ .$DEST_ROOT/lib/gcc/$t-apple-darwin$DARWIN_VERS/$VERS/libstdc++.dylib \
+ || exit 1
+ fi
# LLVM LOCAL
# strip -x -c .$DEST_ROOT/lib/gcc/$t-apple-darwin$DARWIN_VERS/$VERS/libstdc++.dylib || exit 1
done
+fi
# include
HEADERPATH=$DEST_ROOT/include/gcc/darwin/$MAJ_VERS
@@ -446,16 +557,34 @@
# Add extra man page symlinks for 'c++' and for arch-specific names.
MDIR=$DEST_DIR$DEST_ROOT/share/man/man1
-ln -f $MDIR/llvm-g++.1 $MDIR/llvm-c++.1 || exit 1
+if [ $BUILD_CXX -eq 1 ]; then
+ # LLVM LOCAL
+ ln -f $MDIR/llvm-g++.1 $MDIR/llvm-c++.1 || exit 1
+fi
for t in $TARGETS ; do
+ # LLVM LOCAL begin
ln -f $MDIR/llvm-gcc.1 $MDIR/$t-apple-darwin$DARWIN_VERS-llvm-gcc.1 \
|| exit 1
- ln -f $MDIR/llvm-g++.1 $MDIR/$t-apple-darwin$DARWIN_VERS-llvm-g++.1 \
- || exit 1
+ if [ $BUILD_CXX -eq 1 ]; then
+ ln -f $MDIR/llvm-g++.1 $MDIR/$t-apple-darwin$DARWIN_VERS-llvm-g++.1 \
+ || exit 1
+ fi
+ # LLVM LOCAL end
done
+# LLVM LOCAL begin
+# Compress manpages
+gzip -f $MDIR/*
+mkdir -p $DEST_DIR/Developer/usr/share/man/man1
+cp $ORIG_SRC_DIR/gcc/doc/llvm-gcc.1 $DEST_DIR/Developer/usr/share/man/man1/llvm-gcc.1
+cp $ORIG_SRC_DIR/gcc/doc/llvm-gcc.1 $DEST_DIR/Developer/usr/share/man/man1/llvm-g++.1
+gzip -f $DEST_DIR/Developer/usr/share/man/man1/llvm-gcc.1
+gzip -f $DEST_DIR/Developer/usr/share/man/man1/llvm-g++.1
+# LLVM LOCAL end
+
# Build driver-driver using fully-named drivers
for h in $HOSTS ; do
+ # LLVM LOCAL begin
$h-apple-darwin$DARWIN_VERS-gcc \
$ORIG_SRC_DIR/driverdriver.c \
-DPDN="\"-apple-darwin$DARWIN_VERS-llvm-gcc-$MAJ_VERS\"" \
@@ -466,27 +595,32 @@
-L$DIR/obj-$h-$BUILD/libiberty/ \
-o $DEST_DIR/$DEST_ROOT/bin/tmp-$h-llvm-gcc-$MAJ_VERS || exit 1
- $h-apple-darwin$DARWIN_VERS-gcc \
- $ORIG_SRC_DIR/driverdriver.c \
- -DPDN="\"-apple-darwin$DARWIN_VERS-llvm-g++-$MAJ_VERS\"" \
- -DIL="\"$DEST_ROOT/bin/\"" -I $ORIG_SRC_DIR/include \
- -I $ORIG_SRC_DIR/gcc -I $ORIG_SRC_DIR/gcc/config \
- -liberty -L$DIR/dst-$BUILD-$h$DEST_ROOT/lib/ \
- -L$DIR/dst-$BUILD-$h$DEST_ROOT/$h-apple-darwin$DARWIN_VERS/lib/ \
- -L$DIR/obj-$h-$BUILD/libiberty/ \
- -o $DEST_DIR/$DEST_ROOT/bin/tmp-$h-llvm-g++-$MAJ_VERS || exit 1
+ if [ $BUILD_CXX -eq 1 ]; then
+ $h-apple-darwin$DARWIN_VERS-gcc \
+ $ORIG_SRC_DIR/driverdriver.c \
+ -DPDN="\"-apple-darwin$DARWIN_VERS-llvm-g++-$MAJ_VERS\"" \
+ -DIL="\"$DEST_ROOT/bin/\"" -I $ORIG_SRC_DIR/include \
+ -I $ORIG_SRC_DIR/gcc -I $ORIG_SRC_DIR/gcc/config \
+ -liberty -L$DIR/dst-$BUILD-$h$DEST_ROOT/lib/ \
+ -L$DIR/dst-$BUILD-$h$DEST_ROOT/$h-apple-darwin$DARWIN_VERS/lib/ \
+ -L$DIR/obj-$h-$BUILD/libiberty/ \
+ -o $DEST_DIR/$DEST_ROOT/bin/tmp-$h-llvm-g++-$MAJ_VERS || exit 1
+ fi
+ # LLVM LOCAL end
done
+# LLVM LOCAL begin
lipo -output $DEST_DIR/$DEST_ROOT/bin/llvm-gcc-$MAJ_VERS -create \
$DEST_DIR/$DEST_ROOT/bin/tmp-*-llvm-gcc-$MAJ_VERS || exit 1
-
-lipo -output $DEST_DIR/$DEST_ROOT/bin/llvm-g++-$MAJ_VERS -create \
- $DEST_DIR/$DEST_ROOT/bin/tmp-*-llvm-g++-$MAJ_VERS || exit 1
-
-ln -f $DEST_DIR/$DEST_ROOT/bin/llvm-g++-$MAJ_VERS $DEST_DIR/$DEST_ROOT/bin/llvm-c++-$MAJ_VERS || exit 1
-
rm $DEST_DIR/$DEST_ROOT/bin/tmp-*-llvm-gcc-$MAJ_VERS || exit 1
-rm $DEST_DIR/$DEST_ROOT/bin/tmp-*-llvm-g++-$MAJ_VERS || exit 1
+
+if [ $BUILD_CXX -eq 1 ]; then
+ lipo -output $DEST_DIR/$DEST_ROOT/bin/llvm-g++-$MAJ_VERS -create \
+ $DEST_DIR/$DEST_ROOT/bin/tmp-*-llvm-g++-$MAJ_VERS || exit 1
+ ln -f $DEST_DIR/$DEST_ROOT/bin/llvm-g++-$MAJ_VERS $DEST_DIR/$DEST_ROOT/bin/llvm-c++-$MAJ_VERS || exit 1
+ rm $DEST_DIR/$DEST_ROOT/bin/tmp-*-llvm-g++-$MAJ_VERS || exit 1
+fi
+# LLVM LOCAL end
########################################
# Create SYM_DIR with information required for debugging.
@@ -513,19 +647,23 @@
# Remove debugging information from DEST_DIR.
if [ "x$LLVM_DEBUG" != "x1" ]; then
- find $DEST_DIR -perm -0111 \! -name \*.dylib \! -name fixinc.sh \
- \! -name mkheaders \! -name libstdc++.dylib -type f -print \
+ # LLVM LOCAL begin - don't strip dSYM objects
+ find $DEST_DIR -perm -0111 \! -path '*DWARF*' \! -name \*.dylib \
+ \! -name fixinc.sh \! -name mkheaders \! -name libstdc++.dylib \
+ -type f -print \
| xargs strip || exit 1
- # APPLE LOCAL begin LLVM - Strip with -Sx instead of -SX
- find $DEST_DIR \( -name \*.a -or -name \*.dylib \) \
- \! -name libgcc_s.10.*.dylib -type f -print \
- | xargs strip -SX || exit 1
- # APPLE LOCAL end LLVM - Strip with -Sx instead of -SX
- find $DEST_DIR -name \*.a -type f -print \
+ # LLVM LOCAL begin - Strip with -Sx instead of -SX
+ find $DEST_DIR \! -path '*DWARF*' \( -name \*.a -or -name \*.dylib \) \
+ \! -name libgcc_s.10.*.dylib \! -name libstdc++.dylib -type f \
+ -print \
+ | xargs strip -SX || exit 1
+ # LLVM LOCAL end - Strip with -Sx instead of -SX
+ find $DEST_DIR \! -path '*DWARF*' -name \*.a -type f -print \
| xargs ranlib || exit 1
+ # LLVM LOCAL end - don't strip dSYM objects
fi
-# APPLE LOCAL begin LLVM
+# LLVM LOCAL begin
# Set up the llvm-gcc/llvm-g++ symlinks.
mkdir -p $DEST_DIR$LLVM_BIN_DIR
cd $DEST_DIR$LLVM_BIN_DIR
@@ -536,9 +674,9 @@
ln -s -f ../llvm-gcc-$MAJ_VERS/bin/llvm-g++-$MAJ_VERS llvm-g++ || exit 1
# FIXME: This is a hack to get things working.
-for h in $HOSTS ; do
- ln -s -f ../llvm-gcc-$MAJ_VERS/bin/$h-apple-darwin$DARWIN_VERS-llvm-gcc-$MAJ_VERS $h-apple-darwin$DARWIN_VERS-llvm-gcc-$MAJ_VERS || exit 1
- ln -s -f ../llvm-gcc-$MAJ_VERS/bin/$h-apple-darwin$DARWIN_VERS-llvm-g++-$MAJ_VERS $h-apple-darwin$DARWIN_VERS-llvm-g++-$MAJ_VERS || exit 1
+for t in $TARGETS ; do
+ ln -s -f ../llvm-gcc-$MAJ_VERS/bin/$t-apple-darwin$DARWIN_VERS-llvm-gcc-$MAJ_VERS $t-apple-darwin$DARWIN_VERS-llvm-gcc-$MAJ_VERS || exit 1
+ ln -s -f ../llvm-gcc-$MAJ_VERS/bin/$t-apple-darwin$DARWIN_VERS-llvm-g++-$MAJ_VERS $t-apple-darwin$DARWIN_VERS-llvm-g++-$MAJ_VERS || exit 1
done
# Copy one of the libllvmgcc.dylib's up to libexec/gcc.
@@ -551,7 +689,14 @@
rm libllvmgcc.dylib
ln -s ../../libllvmgcc.dylib
done
-# APPLE LOCAL end LLVM
+
+if [ "x$LLVM_BUILT_ROOTS" == "x" ]; then
+ mkdir -p $DEST_DIR/usr/bin
+ cd $DEST_DIR/usr/bin
+ ln -s /Developer/usr/bin/llvm-gcc-4.2 llvm-gcc-4.2
+ ln -s /Developer/usr/bin/llvm-g++-4.2 llvm-g++-4.2
+fi
+# LLVM LOCAL end
find $DEST_DIR -name \*.dSYM -print | xargs rm -r || exit 1
chgrp -h -R wheel $DEST_DIR
Modified: llvm-gcc-4.2/branches/Apple/Xcode-3.1.1/configure
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Xcode-3.1.1/configure?rev=72067&r1=72066&r2=72067&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Xcode-3.1.1/configure (original)
+++ llvm-gcc-4.2/branches/Apple/Xcode-3.1.1/configure Mon May 18 18:19:59 2009
@@ -1828,6 +1828,11 @@
# APPLE LOCAL begin dynamic-no-pic
i[3456789]86-*-darwin*)
host_makefile_frag="config/mh-x86-darwin"
+ # gcc can default to x86_64 code generation, avoid that
+ if test "${build}" = "${host}"; then
+ CC="${CC-gcc} -m32"
+ CXX="${CXX-g++} -m32"
+ fi
;;
# APPLE LOCAL end dynamic-no-pic
powerpc-*-aix*)
Modified: llvm-gcc-4.2/branches/Apple/Xcode-3.1.1/configure.in
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Xcode-3.1.1/configure.in?rev=72067&r1=72066&r2=72067&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Xcode-3.1.1/configure.in (original)
+++ llvm-gcc-4.2/branches/Apple/Xcode-3.1.1/configure.in Mon May 18 18:19:59 2009
@@ -988,6 +988,11 @@
# APPLE LOCAL begin dynamic-no-pic
i[[3456789]]86-*-darwin*)
host_makefile_frag="config/mh-x86-darwin"
+ # gcc can default to x86_64 code generation, avoid that
+ if test "${build}" = "${host}"; then
+ CC="${CC-gcc} -m32"
+ CXX="${CXX-g++} -m32"
+ fi
;;
# APPLE LOCAL end dynamic-no-pic
powerpc-*-aix*)
Modified: llvm-gcc-4.2/branches/Apple/Xcode-3.1.1/driverdriver.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Xcode-3.1.1/driverdriver.c?rev=72067&r1=72066&r2=72067&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Xcode-3.1.1/driverdriver.c (original)
+++ llvm-gcc-4.2/branches/Apple/Xcode-3.1.1/driverdriver.c Mon May 18 18:19:59 2009
@@ -1,4 +1,5 @@
/* APPLE LOCAL file driver driver */
+
/* Darwin driver program that handles -arch commands and invokes
appropriate compiler driver.
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
@@ -76,6 +77,8 @@
int dash_dynamiclib_seen = 0;
int verbose_flag = 0;
int save_temps_seen = 0;
+int dash_m32_seen = 0;
+int dash_m64_seen = 0;
/* Support at the max 10 arch. at a time. This is historical limit. */
#define MAX_ARCHES 10
@@ -120,6 +123,11 @@
{"ppc", "powerpc"},
{"ppc64", "powerpc"},
{"x86_64", "i686"},
+ {"arm", "arm"},
+ {"armv4t", "arm"},
+ {"armv5", "arm"},
+ {"xscale", "arm"},
+ {"armv6", "arm"},
{NULL, NULL}
};
@@ -185,27 +193,35 @@
static const char *
get_arch_name (const char *name)
{
- const NXArchInfo * a_info;
+ NXArchInfo * a_info;
const NXArchInfo * all_info;
cpu_type_t cputype;
struct arch_config_guess_map *map;
const char *aname;
- if (name)
- {
- /* Find config name based on arch name. */
- aname = NULL;
- map = arch_config_map;
- while (map->arch_name)
- {
- if (!strcmp (map->arch_name, name))
- return name;
- else map++;
- }
- a_info = NXGetArchInfoFromName (name);
+ if (name) {
+ /* Find config name based on arch name. */
+ aname = NULL;
+ map = arch_config_map;
+ while (map->arch_name) {
+ if (!strcmp (map->arch_name, name))
+ return name;
+ else map++;
}
- else
- a_info = NXGetLocalArchInfo ();
+ a_info = (NXArchInfo *) NXGetArchInfoFromName (name);
+ } else {
+ a_info = (NXArchInfo *) NXGetLocalArchInfo();
+ if (a_info) {
+ if (dash_m32_seen) {
+ /* If -m32 is seen then do not change cpu type. */
+ } else if (dash_m64_seen) {
+ /* If -m64 is seen then enable CPU_ARCH_ABI64. */
+ a_info->cputype |= CPU_ARCH_ABI64;
+ } else if (sizeof (long) == 8)
+ /* On x86, by default (name is NULL here) enable 64 bit code. */
+ a_info->cputype |= CPU_ARCH_ABI64;
+ }
+ }
if (!a_info)
fatal ("Invalid arch name : %s", name);
@@ -619,8 +635,8 @@
/* Total number of arguments in separate compiler invocation is :
total number of original arguments - total no input files + one input
- file + "-o" + output file . */
- new_new_argv = (const char **) malloc ((new_argc - num_infiles + 4) * sizeof (const char *));
+ file + "-o" + output file + arch specific options + NULL . */
+ new_new_argv = (const char **) malloc ((new_argc - num_infiles + 5) * sizeof (const char *));
if (!new_new_argv)
abort ();
@@ -634,7 +650,6 @@
for (i = 1; i < new_argc; i++)
{
-
if (ifn && ifn->name && !strcmp (new_argv[i], ifn->name))
{
/* This argument is one of the input file. */
@@ -706,7 +721,9 @@
}
/* Replace -arch <blah> options with appropriate "-mcpu=<blah>" OR
- "-march=<blah>". INDEX is the index in arches[] table. */
+ "-march=<blah>". INDEX is the index in arches[] table. We cannot
+ return more than 1 as do_compile_separately only allocated one
+ extra slot for us. */
static int
add_arch_options (int index, const char **current_argv, int arch_index)
@@ -754,6 +771,16 @@
current_argv[arch_index] = "-march=pentium2";
else if (!strcmp (arches[index], "x86_64"))
current_argv[arch_index] = "-m64";
+ else if (!strcmp (arches[index], "arm"))
+ current_argv[arch_index] = "-march=armv4t";
+ else if (!strcmp (arches[index], "armv4t"))
+ current_argv[arch_index] = "-march=armv4t";
+ else if (!strcmp (arches[index], "armv5"))
+ current_argv[arch_index] = "-march=armv5tej";
+ else if (!strcmp (arches[index], "xscale"))
+ current_argv[arch_index] = "-march=xscale";
+ else if (!strcmp (arches[index], "armv6"))
+ current_argv[arch_index] = "-march=armv6k";
else
count = 0;
@@ -1251,7 +1278,6 @@
char *override_option_str = NULL;
char path_buffer[2*PATH_MAX+1];
int linklen;
- int delete_prefix = 0;
total_argc = argc;
prog_len = 0;
@@ -1307,26 +1333,7 @@
curr_dir = (char *) malloc (sizeof (char) * (prefix_len + 1));
strncpy (curr_dir, argv[0], prefix_len);
curr_dir[prefix_len] = '\0';
- /* LLVM LOCAL begin - These drivers live in /.../usr/llvm-gcc-4.2/bin */
-#if 0
- {
- size_t curr_dir_len = strlen (curr_dir);
- const char *llvm_bin_dir = "/usr/llvm-gcc-4.2/bin/";
- size_t bin_dir_len = strlen (llvm_bin_dir);
-
- if (curr_dir_len <= bin_dir_len ||
- strncmp (&curr_dir[curr_dir_len - bin_dir_len], llvm_bin_dir, bin_dir_len) != 0) {
- driver_exec_prefix =
- make_relative_prefix (argv[0], curr_dir, "/usr/llvm-gcc-4.2/bin/");
- delete_prefix = 1;
- prefix_len = strlen (driver_exec_prefix);
- } else
- driver_exec_prefix = curr_dir;
- }
-#else
- driver_exec_prefix = curr_dir;
-#endif
- /* LLVM LOCAL end - These drivers live in /.../usr/llvm-gcc-4.2/bin */
+ driver_exec_prefix = (argv[0], "/usr/bin", curr_dir);
#ifdef DEBUG
fprintf (stderr,"%s: full progname = %s\n", progname, argv[0]);
@@ -1374,6 +1381,16 @@
new_argv[new_argc++] = argv[i];
dash_capital_m_seen = 1;
}
+ else if (!strcmp (argv[i], "-m32"))
+ {
+ new_argv[new_argc++] = argv[i];
+ dash_m32_seen = 1;
+ }
+ else if (!strcmp (argv[i], "-m64"))
+ {
+ new_argv[new_argc++] = argv[i];
+ dash_m64_seen = 1;
+ }
else if (!strcmp (argv[i], "-dynamiclib"))
{
new_argv[new_argc++] = argv[i];
@@ -1387,7 +1404,7 @@
else if (!strcmp (argv[i], "-o"))
{
if (i + 1 >= argc)
- abort ();
+ fatal ("argument to '-o' is missing");
output_filename = argv[i+1];
i++;
@@ -1508,6 +1525,9 @@
fatal ("no input files");
#endif
+ if (num_arches == 0)
+ add_arch(get_arch_name(NULL));
+
if (num_arches > 1)
{
if (preprocessed_output_request
@@ -1520,22 +1540,15 @@
Invoke appropriate compiler driver. FAT build is not required in this
case. */
- if (num_arches == 0 || num_arches == 1)
+ if (num_arches == 1)
{
int arch_specific_argc;
const char **arch_specific_argv;
- /* If no -arch is specified than use host compiler driver. */
- if (num_arches == 0)
- new_argv[0] = get_driver_name (get_arch_name (NULL));
- else if (num_arches == 1)
- {
- /* Find compiler driver based on -arch <foo> and add approriate
- -m* argument. */
- new_argv[0] = get_driver_name (get_arch_name (arches[0]));
- new_argc = new_argc + add_arch_options (0, new_argv, new_argc);
- }
-
+ /* Find compiler driver based on -arch <foo> and add approriate
+ -m* argument. */
+ new_argv[0] = get_driver_name (get_arch_name (arches[0]));
+ new_argc = new_argc + add_arch_options (0, new_argv, new_argc);
#ifdef DEBUG
printf ("%s: invoking single driver name = %s\n", progname, new_argv[0]);
@@ -1628,11 +1641,5 @@
final_cleanup ();
free (curr_dir);
- /* LLVM LOCAL - begin */
-#if 0
- if (delete_prefix)
- free (driver_exec_prefix);
-#endif
- /* LLVM LOCAL - end */
return greatest_status;
}
Modified: llvm-gcc-4.2/branches/Apple/Xcode-3.1.1/gcc/Makefile.in
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Xcode-3.1.1/gcc/Makefile.in?rev=72067&r1=72066&r2=72067&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Xcode-3.1.1/gcc/Makefile.in (original)
+++ llvm-gcc-4.2/branches/Apple/Xcode-3.1.1/gcc/Makefile.in Mon May 18 18:19:59 2009
@@ -264,6 +264,11 @@
CPPFLAGS += -DLLVM_VERSION_INFO='"$(LLVM_VERSION_INFO)"'
endif
# LLVM LOCAL end
+# APPLE LOCAL begin
+ifdef BUILD_LLVM_APPLE_STYLE
+CPPFLAGS += -DBUILD_LLVM_APPLE_STYLE
+endif
+# APPLE LOCAL end
# These exists to be overridden by the x-* and t-* files, respectively.
X_CFLAGS =
@@ -730,6 +735,8 @@
GCC_INSTALL_NAME := $(shell echo gcc|sed '$(program_transform_name)')
GCC_TARGET_INSTALL_NAME := $(target_noncanonical)-$(shell echo gcc|sed '$(program_transform_name)')
CPP_INSTALL_NAME := $(shell echo cpp|sed '$(program_transform_name)')
+# APPLE LOCAL 6024929
+CPP_TARGET_INSTALL_NAME := $(target_noncanonical)-$(shell echo cpp|sed '$(program_transform_name)')
PROTOIZE_INSTALL_NAME := $(shell echo protoize|sed '$(program_transform_name)')
UNPROTOIZE_INSTALL_NAME := $(shell echo unprotoize|sed '$(program_transform_name)')
GCOV_INSTALL_NAME := $(shell echo gcov|sed '$(program_transform_name)')
@@ -937,7 +944,7 @@
ifneq ($(LLVMOBJDIR),)
# If LLVM is built srcdir != objdir, include the objdir headers for configured
# headers, like DataTypes.h.
-ifneq (($LLVMOBJDIR),$(LLVMSRCDIR))
+ifneq ($(LLVMOBJDIR),$(LLVMSRCDIR))
INCLUDES += -I$(LLVMOBJDIR)/include
endif
@@ -3986,6 +3993,17 @@
install-cpp: installdirs cpp$(exeext)
-rm -f $(DESTDIR)$(bindir)/$(CPP_INSTALL_NAME)$(exeext)
-$(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(DESTDIR)$(bindir)/$(CPP_INSTALL_NAME)$(exeext)
+ # APPLE LOCAL begin 6024929
+ -rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-cpp-$(version)$(exeext)
+ -( cd $(DESTDIR)$(bindir) && \
+ $(LN) $(CPP_INSTALL_NAME)$(exeext) $(target_noncanonical)-cpp-$(version)$(exeext) )
+ -if [ \! -f gcc-cross$(exeext) ] ; then \
+ rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-cpp-tmp$(exeext); \
+ ( cd $(DESTDIR)$(bindir) && \
+ $(LN) $(CPP_INSTALL_NAME)$(exeext) $(target_noncanonical)-cpp-tmp$(exeext) && \
+ mv -f $(target_noncanonical)-cpp-tmp$(exeext) $(CPP_TARGET_INSTALL_NAME)$(exeext) ); \
+ fi
+ # APPLE LOCAL end 6024929
-if [ x$(cpp_install_dir) != x ]; then \
rm -f $(DESTDIR)$(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \
$(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(DESTDIR)$(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \
@@ -4051,10 +4069,14 @@
# Install the driver program as $(target_noncanonical)-gcc,
# $(target_noncanonical)-gcc-$(version)
# and also as either gcc (if native) or $(gcc_tooldir)/bin/gcc.
+
+# LLVM LOCAL begin copy libstdc++.dylib on Darwin
+ifneq (,$(findstring darwin,$(target)))
install-driver: installdirs xgcc$(exeext)
-rm -f $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext)
-$(INSTALL_PROGRAM) xgcc$(exeext) $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext)
-rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-$(version)$(exeext)
+ -cp -p /usr/lib/libstdc++.6.dylib $(DESTDIR)$(libsubdir)/libstdc++.dylib
-( cd $(DESTDIR)$(bindir) && \
$(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_noncanonical)-gcc-$(version)$(exeext) )
-if [ -f gcc-cross$(exeext) ] ; then \
@@ -4068,6 +4090,26 @@
$(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_noncanonical)-gcc-tmp$(exeext) && \
mv -f $(target_noncanonical)-gcc-tmp$(exeext) $(GCC_TARGET_INSTALL_NAME)$(exeext) ); \
fi
+else
+install-driver: installdirs xgcc$(exeext)
+ -rm -f $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext)
+ -$(INSTALL_PROGRAM) xgcc$(exeext) $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext)
+ -rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-$(version)$(exeext)
+ -( cd $(DESTDIR)$(bindir) && \
+ $(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_noncanonical)-gcc-$(version)$(exeext) )
+ -if [ -f gcc-cross$(exeext) ] ; then \
+ if [ -d $(DESTDIR)$(gcc_tooldir)/bin/. ] ; then \
+ rm -f $(DESTDIR)$(gcc_tooldir)/bin/gcc$(exeext); \
+ $(INSTALL_PROGRAM) gcc-cross$(exeext) $(DESTDIR)$(gcc_tooldir)/bin/gcc$(exeext); \
+ else true; fi; \
+ else \
+ rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-tmp$(exeext); \
+ ( cd $(DESTDIR)$(bindir) && \
+ $(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_noncanonical)-gcc-tmp$(exeext) && \
+ mv -f $(target_noncanonical)-gcc-tmp$(exeext) $(GCC_TARGET_INSTALL_NAME)$(exeext) ); \
+ fi
+endif
+# LLVM LOCAL end copy libstdc++.dylib on Darwin
# Install the info files.
# $(INSTALL_DATA) might be a relative pathname, so we can't cd into srcdir
Modified: llvm-gcc-4.2/branches/Apple/Xcode-3.1.1/gcc/real.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Xcode-3.1.1/gcc/real.h?rev=72067&r1=72066&r2=72067&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Xcode-3.1.1/gcc/real.h (original)
+++ llvm-gcc-4.2/branches/Apple/Xcode-3.1.1/gcc/real.h Mon May 18 18:19:59 2009
@@ -75,8 +75,12 @@
+ (REAL_VALUE_TYPE_SIZE%HOST_BITS_PER_WIDE_INT ? 1 : 0)) /* round up */
/* Verify the guess. */
+/* LLVM local begin */
+#ifndef ENABLE_LLVM
extern char test_real_width
[sizeof(REAL_VALUE_TYPE) <= REAL_WIDTH*sizeof(HOST_WIDE_INT) ? 1 : -1];
+#endif
+/* LLVM local end */
/* Calculate the format for CONST_DOUBLE. We need as many slots as
are necessary to overlay a REAL_VALUE_TYPE on them. This could be
More information about the llvm-branch-commits
mailing list