gcc-build-full revision 1.1 1 1.1 mrg #! /bin/sh
2 1.1 mrg
3 1.1 mrg # Perform a simple build of GCC for a particular language, using several
4 1.1 mrg # environment variables defined by reghunt scripts and config files.
5 1.1 mrg #
6 1.1 mrg # Copyright (C) 2007 Free Software Foundation.
7 1.1 mrg #
8 1.1 mrg # This file is free software; you can redistribute it and/or modify
9 1.1 mrg # it under the terms of the GNU General Public License as published by
10 1.1 mrg # the Free Software Foundation; either version 3 of the License, or
11 1.1 mrg # (at your option) any later version.
12 1.1 mrg #
13 1.1 mrg # This program is distributed in the hope that it will be useful,
14 1.1 mrg # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 1.1 mrg # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 1.1 mrg # GNU General Public License for more details.
17 1.1 mrg #
18 1.1 mrg # For a copy of the GNU General Public License, write the the
19 1.1 mrg # Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 1.1 mrg # Boston, MA 02111-1301, USA.
21 1.1 mrg
22 1.1 mrg abort() {
23 1.1 mrg echo "`date` $1"
24 1.1 mrg exit 1
25 1.1 mrg }
26 1.1 mrg
27 1.1 mrg ID=$1
28 1.1 mrg LOGDIR=${REG_BUILDDIR}/logs/${BUGID}/${ID}
29 1.1 mrg mkdir -p $LOGDIR
30 1.1 mrg
31 1.1 mrg echo "`date` building GCC ($REG_LANGS) for id ${ID}"
32 1.1 mrg
33 1.1 mrg cd $REG_BUILDDIR
34 1.1 mrg rm -rf obj
35 1.1 mrg mkdir obj
36 1.1 mrg cd obj
37 1.1 mrg
38 1.1 mrg echo "REG_CONFOPTS = $REG_CONFOPTS" > ${LOGDIR}/configure.log
39 1.1 mrg echo "REG_PREFIX = $REG_PREFIX" >> ${LOGDIR}/configure.log
40 1.1 mrg echo "REG_LANGS = $REG_LANGS" >> ${LOGDIR}/configure.log
41 1.1 mrg echo >> ${LOGDIR}/configure.log
42 1.1 mrg
43 1.1 mrg ${REG_GCCSRC}/configure \
44 1.1 mrg --prefix=$REG_PREFIX \
45 1.1 mrg $REG_CONFOPTS \
46 1.1 mrg --enable-languages=$REG_LANGS \
47 1.1 mrg >> ${LOGDIR}/configure.log 2>&1 || abort " configure failed"
48 1.1 mrg
49 1.1 mrg make $REG_MAKE_J > ${LOGDIR}/make.log 2>&1 || abort " make failed"
50 1.1 mrg make install > ${LOGDIR}/make.install.log 2>&1 || abort " make install failed"
51 1.1 mrg
52 1.1 mrg exit 0
53