summaryrefslogtreecommitdiff
path: root/contrib/reghunt/bin/gcc-build-simple
diff options
context:
space:
mode:
authorupstream source tree <ports@midipix.org>2015-03-15 20:14:05 -0400
committerupstream source tree <ports@midipix.org>2015-03-15 20:14:05 -0400
commit554fd8c5195424bdbcabf5de30fdc183aba391bd (patch)
tree976dc5ab7fddf506dadce60ae936f43f58787092 /contrib/reghunt/bin/gcc-build-simple
downloadcbb-gcc-4.6.4-upstream.tar.bz2
cbb-gcc-4.6.4-upstream.tar.xz
obtained gcc-4.6.4.tar.bz2 from upstream website;upstream
verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository.
Diffstat (limited to 'contrib/reghunt/bin/gcc-build-simple')
-rwxr-xr-xcontrib/reghunt/bin/gcc-build-simple79
1 files changed, 79 insertions, 0 deletions
diff --git a/contrib/reghunt/bin/gcc-build-simple b/contrib/reghunt/bin/gcc-build-simple
new file mode 100755
index 000000000..f2d8ea39c
--- /dev/null
+++ b/contrib/reghunt/bin/gcc-build-simple
@@ -0,0 +1,79 @@
+#! /bin/sh
+
+# Build a GCC compiler, using environment variables defined by several
+# reghunt scripts and config files.
+#
+# This doesn't work for sources earlier than about 2003-02-25.
+#
+# Copyright (C) 2007 Free Software Foundation.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# For a copy of the GNU General Public License, write the the
+# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02111-1301, USA.
+
+ID="${1}"
+LOGDIR=${REG_BUILDDIR}/logs/${BUGID}/${ID}
+mkdir -p $LOGDIR
+
+msg() {
+ echo "`date` ${1}"
+}
+
+abort() {
+ msg "${1}"
+ exit 1
+}
+
+msg "building $REG_COMPILER for id $ID"
+
+rm -rf $REG_OBJDIR
+mkdir $REG_OBJDIR
+cd $REG_OBJDIR
+
+#msg "configure"
+${REG_GCCSRC}/configure \
+ --prefix=$REG_PREFIX \
+ --enable-languages=$REG_LANGS \
+ $REG_CONFOPTS \
+ > configure.log 2>&1 || abort " configure failed"
+
+#msg "make libraries"
+make all-build-libiberty > ${LOGDIR}/make.all-build-libiberty.log 2>&1 || true
+make all-libcpp > ${LOGDIR}/make.all-libcpp.log 2>&1 || true
+make all-libdecnumber > ${LOGDIR}/make.all-libdecnumber.log 2>&1 || true
+make all-intl > ${LOGDIR}/make.all-intl.log 2>&1 || true
+make all-libbanshee > ${LOGDIR}/make.all-libbanshee.log 2>&1 || true
+make configure-gcc > ${LOGDIR}/make.configure-gcc.log 2>&1 || true
+
+# hack for 3.3 branch
+if [ ! -f libiberty/libiberty.a ]; then
+ if [ -d libiberty ]; then
+ # another hack for 3.2!
+ cd libiberty
+ make > ${LOGDIR}/make.libiberty.log 2>&1 || true
+ cd ..
+ else
+ mkdir -p libiberty
+ cd libiberty
+ ln -s ../build-${REG_BLD}/libiberty/libiberty.a .
+ cd ..
+ fi
+fi
+
+cd gcc
+# REG_COMPILER is cc1, cc1plus, or f951
+#msg "make $REG_COMPILER"
+make $REG_MAKE_J $REG_COMPILER > ${LOGDIR}/make.${REG_COMPILER}.log 2>&1 \
+ || abort " make failed"
+msg "build completed"
+exit 0