mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-10-05 22:59:16 +00:00
Try to get embedded build of llvmCore to pass verification.
Simplify some things in the process. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108382 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
723a05a66f
commit
29c8a782e1
@ -32,7 +32,7 @@ DSTROOT = $(OBJROOT)/../dst
|
|||||||
|
|
||||||
#######################################################################
|
#######################################################################
|
||||||
|
|
||||||
PREFIX = /usr/local
|
PREFIX = /Developer/usr/local
|
||||||
|
|
||||||
# Unless assertions are forced on in the GMAKE command line, disable them.
|
# Unless assertions are forced on in the GMAKE command line, disable them.
|
||||||
ifndef ENABLE_ASSERTIONS
|
ifndef ENABLE_ASSERTIONS
|
||||||
@ -70,7 +70,7 @@ install: $(OBJROOT) $(SYMROOT) $(DSTROOT)
|
|||||||
$(RC_ProjectSourceVersion) $(RC_ProjectSourceSubversion)
|
$(RC_ProjectSourceVersion) $(RC_ProjectSourceSubversion)
|
||||||
|
|
||||||
EmbeddedHosted:
|
EmbeddedHosted:
|
||||||
$(MAKE) ARM_HOSTED_BUILD=yes install
|
$(MAKE) ARM_HOSTED_BUILD=yes PREFIX=/usr install
|
||||||
|
|
||||||
# installhdrs does nothing, because the headers aren't useful until
|
# installhdrs does nothing, because the headers aren't useful until
|
||||||
# the compiler is installed.
|
# the compiler is installed.
|
||||||
|
@ -63,15 +63,6 @@ DIR=`pwd`
|
|||||||
DARWIN_VERS=`uname -r | sed 's/\..*//'`
|
DARWIN_VERS=`uname -r | sed 's/\..*//'`
|
||||||
echo DARWIN_VERS = $DARWIN_VERS
|
echo DARWIN_VERS = $DARWIN_VERS
|
||||||
|
|
||||||
DEVELOPER_DIR="${DEVELOPER_DIR-Developer}"
|
|
||||||
if [ "$ARM_HOSTED_BUILD" = yes ]; then
|
|
||||||
DT_HOME="$DEST_DIR/usr"
|
|
||||||
else
|
|
||||||
DT_HOME="$DEST_DIR/$DEVELOPER_DIR/usr"
|
|
||||||
fi
|
|
||||||
|
|
||||||
DEST_ROOT="/$DEVELOPER_DIR$DEST_ROOT"
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Run the build.
|
# Run the build.
|
||||||
|
|
||||||
@ -131,16 +122,14 @@ elif [ $DARWIN_VERS -gt 9 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$ARM_HOSTED_BUILD" = yes ]; then
|
if [ "$ARM_HOSTED_BUILD" = yes ]; then
|
||||||
configure_prefix=$DT_HOME
|
|
||||||
configure_opts="--enable-targets=arm --host=arm-apple-darwin10 \
|
configure_opts="--enable-targets=arm --host=arm-apple-darwin10 \
|
||||||
--target=arm-apple-darwin10 --build=i686-apple-darwin10"
|
--target=arm-apple-darwin10 --build=i686-apple-darwin10"
|
||||||
else
|
else
|
||||||
configure_prefix=$DT_HOME/local
|
|
||||||
configure_opts="--enable-targets=arm,x86,powerpc,cbe"
|
configure_opts="--enable-targets=arm,x86,powerpc,cbe"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ \! -f Makefile.config ]; then
|
if [ \! -f Makefile.config ]; then
|
||||||
$SRC_DIR/configure --prefix=$configure_prefix $configure_opts \
|
$SRC_DIR/configure --prefix=$DEST_DIR$DEST_ROOT $configure_opts \
|
||||||
--enable-assertions=$LLVM_ASSERTIONS \
|
--enable-assertions=$LLVM_ASSERTIONS \
|
||||||
--enable-optimized=$LLVM_OPTIMIZED \
|
--enable-optimized=$LLVM_OPTIMIZED \
|
||||||
--disable-bindings \
|
--disable-bindings \
|
||||||
@ -254,7 +243,7 @@ if [ "x$LLVM_DEBUG" != "x1" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Copy over the tblgen utility.
|
# Copy over the tblgen utility.
|
||||||
cp `find $DIR -name tblgen` $DT_HOME/local/bin
|
cp `find $DIR -name tblgen` $DEST_DIR$DEST_ROOT/bin
|
||||||
|
|
||||||
# Remove .dir files
|
# Remove .dir files
|
||||||
cd $DEST_DIR$DEST_ROOT
|
cd $DEST_DIR$DEST_ROOT
|
||||||
@ -274,7 +263,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# The Hello dylib is an example of how to build a pass. No need to install it.
|
# The Hello dylib is an example of how to build a pass. No need to install it.
|
||||||
rm $DEST_DIR$DEST_ROOT/lib/libLLVMHello.dylib
|
rm $DEST_DIR$DEST_ROOT/lib/LLVMHello.dylib
|
||||||
|
|
||||||
# Compress manpages
|
# Compress manpages
|
||||||
MDIR=$DEST_DIR$DEST_ROOT/share/man/man1
|
MDIR=$DEST_DIR$DEST_ROOT/share/man/man1
|
||||||
@ -324,12 +313,15 @@ find obj-* -name \*.\[chy\] -o -name \*.cpp -print \
|
|||||||
|
|
||||||
cd $DEST_DIR$DEST_ROOT
|
cd $DEST_DIR$DEST_ROOT
|
||||||
if [ "$INSTALL_LIBLTO" = "yes" ]; then
|
if [ "$INSTALL_LIBLTO" = "yes" ]; then
|
||||||
|
DT_HOME="$DEST_DIR/Developer/usr"
|
||||||
mkdir -p $DT_HOME/lib
|
mkdir -p $DT_HOME/lib
|
||||||
mv lib/libLTO.dylib $DT_HOME/lib/libLTO.dylib
|
mv lib/libLTO.dylib $DT_HOME/lib/libLTO.dylib
|
||||||
|
|
||||||
# Use '-l' to strip i386 modules. N.B. that flag doesn't work with kext or
|
# Use '-l' to strip i386 modules. N.B. that flag doesn't work with kext or
|
||||||
# PPC objects!
|
# PPC objects!
|
||||||
strip -arch all -Sl $DT_HOME/lib/libLTO.dylib
|
strip -arch all -Sl $DT_HOME/lib/libLTO.dylib
|
||||||
|
else
|
||||||
|
rm -f lib/libLTO.dylib
|
||||||
fi
|
fi
|
||||||
rm -f lib/libLTO.a lib/libLTO.la
|
rm -f lib/libLTO.a lib/libLTO.la
|
||||||
|
|
||||||
@ -363,7 +355,7 @@ find $DEST_DIR -name html.tar.gz -exec rm {} \;
|
|||||||
if [ "$INSTALL_LIBLTO" = "yes" ]; then
|
if [ "$INSTALL_LIBLTO" = "yes" ]; then
|
||||||
mkdir -p $DEST_DIR/usr/lib/
|
mkdir -p $DEST_DIR/usr/lib/
|
||||||
cd $DEST_DIR/usr/lib && \
|
cd $DEST_DIR/usr/lib && \
|
||||||
ln -s ../../$DEVELOPER_DIR/usr/lib/libLTO.dylib ./libLTO.dylib
|
ln -s ../../Developer/usr/lib/libLTO.dylib ./libLTO.dylib
|
||||||
fi
|
fi
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
Loading…
Reference in New Issue
Block a user