From 60f107a4841d8a377f65dc7c8b9fc64a902dea35 Mon Sep 17 00:00:00 2001 From: oldham Date: Wed, 8 Nov 2000 19:41:19 +0000 Subject: 2000-11-08 Jeffrey Oldham * gcc_build (bootstrap_gcc): New function. (configure_gcc): Likewise. (build_gcc): Rewritten to use configure and bootstrap. (MAKE_BOOTSTRAP_OPTIONS): Replaced MAKE_OPTIONS. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37323 138bc75d-0d04-0410-961f-82ee72b054a4 --- contrib/ChangeLog | 7 +++++++ contrib/gcc_build | 49 ++++++++++++++++++++++++++++++++++--------------- 2 files changed, 41 insertions(+), 15 deletions(-) (limited to 'contrib') diff --git a/contrib/ChangeLog b/contrib/ChangeLog index d9a984bc455..661e8a9e51f 100644 --- a/contrib/ChangeLog +++ b/contrib/ChangeLog @@ -1,3 +1,10 @@ +2000-11-08 Jeffrey Oldham + + * gcc_build (bootstrap_gcc): New function. + (configure_gcc): Likewise. + (build_gcc): Rewritten to use configure and bootstrap. + (MAKE_BOOTSTRAP_OPTIONS): Replaced MAKE_OPTIONS. + 2000-10-31 Mark Mitchell * gcc_build (MAKE): New variable. diff --git a/contrib/gcc_build b/contrib/gcc_build index ddcbb2f2efa..2989628255c 100755 --- a/contrib/gcc_build +++ b/contrib/gcc_build @@ -61,12 +61,14 @@ usage() { cat <&1 || \ - error "Could not configure GCC" + (eval ${DESTINATION}/configure ${CONFIGURE_OPTIONS} 2>&1 | + tee -a ${LOGFILE}) || \ + error "Could not configure the compiler" +} + +# Bootstrap GCC. Assume configuration has already occurred. + +bootstrap_gcc() { + # Go to the source directory. + changedir ${DESTINATION} + # Go to the object directory. + changedir ${OBJDIR} # Bootstrap the compiler - (eval ${MAKE} ${MAKE_OPTIONS} bootstrap 2>&1 | + (eval ${MAKE} ${MAKE_BOOTSTRAP_OPTIONS} bootstrap 2>&1 | tee -a ${LOGFILE}) || \ - error "Could not build GCC" + error "Could not bootstrap the compiler" } # Test GCC. @@ -223,11 +234,12 @@ CONFIGURE_OPTIONS= # The `make' program. MAKE=${MAKE:-make} # Options to pass to make. -MAKE_OPTIONS= +MAKE_BOOTSTRAP_OPTIONS= # Modes of operation -BUILD=0 +BOOTSTRAP=0 CHECKOUT=0 +CONFIGURE=0 EXPORT=0 INSTALL=0 TEST=0 @@ -242,7 +254,7 @@ while getopts "c:d:m:p:t:u:" ARG; do case $ARG in c) CONFIGURE_OPTIONS="${OPTARG}";; d) DESTINATION="${OPTARG}";; - m) MAKE_OPTIONS="${OPTARG}";; + m) MAKE_BOOTSTRAP_OPTIONS="${OPTARG}";; p) CVS_PROTOCOL="${OPTARG}";; t) CVS_TARGFILE="${OPTARG}";; u) CVS_USERNAME="${OPTARG}";; @@ -254,8 +266,10 @@ shift `expr ${OPTIND} - 1` # Handle the major modes. while [ $# -ne 0 ]; do case $1 in - build) BUILD=1;; + bootstrap) BOOTSTRAP=1;; + build) CONFIGURE=1; BOOTSTRAP=1;; checkout) CHECKOUT=1;; + configure) CONFIGURE=1;; export) EXPORT=1;; install) INSTALL=1;; test) TEST=1;; @@ -282,9 +296,14 @@ elif [ ${UPDATE} -ne 0 ]; then update_gcc fi -# Build the compiler. -if [ ${BUILD} -ne 0 ]; then - build_gcc +# Configure to build the tree. +if [ ${CONFIGURE} -ne 0 ]; then + configure_gcc +fi + +# Bootstrap the compiler. +if [ ${BOOTSTRAP} -ne 0 ]; then + bootstrap_gcc fi # Test the compiler -- cgit v1.2.1