gcc-build-simple revision 1.1.1.1.4.2 1 1.1.1.1.4.2 yamt #! /bin/sh
2 1.1.1.1.4.2 yamt
3 1.1.1.1.4.2 yamt # Build a GCC compiler, using environment variables defined by several
4 1.1.1.1.4.2 yamt # reghunt scripts and config files.
5 1.1.1.1.4.2 yamt #
6 1.1.1.1.4.2 yamt # This doesn't work for sources earlier than about 2003-02-25.
7 1.1.1.1.4.2 yamt #
8 1.1.1.1.4.2 yamt # Copyright (C) 2007 Free Software Foundation.
9 1.1.1.1.4.2 yamt #
10 1.1.1.1.4.2 yamt # This file is free software; you can redistribute it and/or modify
11 1.1.1.1.4.2 yamt # it under the terms of the GNU General Public License as published by
12 1.1.1.1.4.2 yamt # the Free Software Foundation; either version 3 of the License, or
13 1.1.1.1.4.2 yamt # (at your option) any later version.
14 1.1.1.1.4.2 yamt #
15 1.1.1.1.4.2 yamt # This program is distributed in the hope that it will be useful,
16 1.1.1.1.4.2 yamt # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 1.1.1.1.4.2 yamt # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 1.1.1.1.4.2 yamt # GNU General Public License for more details.
19 1.1.1.1.4.2 yamt #
20 1.1.1.1.4.2 yamt # For a copy of the GNU General Public License, write the the
21 1.1.1.1.4.2 yamt # Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 1.1.1.1.4.2 yamt # Boston, MA 02111-1301, USA.
23 1.1.1.1.4.2 yamt
24 1.1.1.1.4.2 yamt ID="${1}"
25 1.1.1.1.4.2 yamt LOGDIR=${REG_BUILDDIR}/logs/${BUGID}/${ID}
26 1.1.1.1.4.2 yamt mkdir -p $LOGDIR
27 1.1.1.1.4.2 yamt
28 1.1.1.1.4.2 yamt msg() {
29 1.1.1.1.4.2 yamt echo "`date` ${1}"
30 1.1.1.1.4.2 yamt }
31 1.1.1.1.4.2 yamt
32 1.1.1.1.4.2 yamt abort() {
33 1.1.1.1.4.2 yamt msg "${1}"
34 1.1.1.1.4.2 yamt exit 1
35 1.1.1.1.4.2 yamt }
36 1.1.1.1.4.2 yamt
37 1.1.1.1.4.2 yamt msg "building $REG_COMPILER for id $ID"
38 1.1.1.1.4.2 yamt
39 1.1.1.1.4.2 yamt rm -rf $REG_OBJDIR
40 1.1.1.1.4.2 yamt mkdir $REG_OBJDIR
41 1.1.1.1.4.2 yamt cd $REG_OBJDIR
42 1.1.1.1.4.2 yamt
43 1.1.1.1.4.2 yamt #msg "configure"
44 1.1.1.1.4.2 yamt ${REG_GCCSRC}/configure \
45 1.1.1.1.4.2 yamt --prefix=$REG_PREFIX \
46 1.1.1.1.4.2 yamt --enable-languages=$REG_LANGS \
47 1.1.1.1.4.2 yamt $REG_CONFOPTS \
48 1.1.1.1.4.2 yamt > configure.log 2>&1 || abort " configure failed"
49 1.1.1.1.4.2 yamt
50 1.1.1.1.4.2 yamt #msg "make libraries"
51 1.1.1.1.4.2 yamt make all-build-libiberty > ${LOGDIR}/make.all-build-libiberty.log 2>&1 || true
52 1.1.1.1.4.2 yamt make all-libcpp > ${LOGDIR}/make.all-libcpp.log 2>&1 || true
53 1.1.1.1.4.2 yamt make all-libdecnumber > ${LOGDIR}/make.all-libdecnumber.log 2>&1 || true
54 1.1.1.1.4.2 yamt make all-intl > ${LOGDIR}/make.all-intl.log 2>&1 || true
55 1.1.1.1.4.2 yamt make all-libbanshee > ${LOGDIR}/make.all-libbanshee.log 2>&1 || true
56 1.1.1.1.4.2 yamt make configure-gcc > ${LOGDIR}/make.configure-gcc.log 2>&1 || true
57 1.1.1.1.4.2 yamt
58 1.1.1.1.4.2 yamt # hack for 3.3 branch
59 1.1.1.1.4.2 yamt if [ ! -f libiberty/libiberty.a ]; then
60 1.1.1.1.4.2 yamt if [ -d libiberty ]; then
61 1.1.1.1.4.2 yamt # another hack for 3.2!
62 1.1.1.1.4.2 yamt cd libiberty
63 1.1.1.1.4.2 yamt make > ${LOGDIR}/make.libiberty.log 2>&1 || true
64 1.1.1.1.4.2 yamt cd ..
65 1.1.1.1.4.2 yamt else
66 1.1.1.1.4.2 yamt mkdir -p libiberty
67 1.1.1.1.4.2 yamt cd libiberty
68 1.1.1.1.4.2 yamt ln -s ../build-${REG_BLD}/libiberty/libiberty.a .
69 1.1.1.1.4.2 yamt cd ..
70 1.1.1.1.4.2 yamt fi
71 1.1.1.1.4.2 yamt fi
72 1.1.1.1.4.2 yamt
73 1.1.1.1.4.2 yamt cd gcc
74 1.1.1.1.4.2 yamt # REG_COMPILER is cc1, cc1plus, or f951
75 1.1.1.1.4.2 yamt #msg "make $REG_COMPILER"
76 1.1.1.1.4.2 yamt make $REG_MAKE_J $REG_COMPILER > ${LOGDIR}/make.${REG_COMPILER}.log 2>&1 \
77 1.1.1.1.4.2 yamt || abort " make failed"
78 1.1.1.1.4.2 yamt msg "build completed"
79 1.1.1.1.4.2 yamt exit 0
80