source: scripts/host-scripts/host-gcc.sh@ 873009c

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 873009c was 617118d, checked in by Jim Gifford <clfs@…>, 19 years ago

r561@server (orig r559): root | 2005-06-05 02:38:49 -0700
Fixed Directory Structure

  • Property mode set to 100755
File size: 1.3 KB
RevLine 
[617118d]1#!/bin/bash
2
3### GCC ( static ) ###
4
5cd ${SRC}
6
7LOG="gcc-buildhost.log"
8
9unpack_tarball gcc-${GCC_VER}
10
11# 20030427
12# Cannot trust ${GCC_VER} to supply us with the correct
13# gcc version (especially if cvs).
14# Grab it straight from version.c
15cd ${SRC}/${PKGDIR}
16target_gcc_ver=`grep version_string gcc/version.c | \
17 sed 's@.* = "\([0-9.]*\).*@\1@g'`
18
19test -d ${SRC}/gcc-${GCC_VER}-buildhost &&
20 rm -rf ${SRC}/gcc-${GCC_VER}-buildhost
21
22mkdir -p ${SRC}/gcc-${GCC_VER}-buildhost &&
23cd ${SRC}/gcc-${GCC_VER}-buildhost &&
24
25max_log_init Gcc ${GCC_VER} "buildhost (static)" ${CONFLOGS} ${LOG}
26CC="${CC-gcc}" CFLAGS="-O2 -pipe" CXXFLAGS="-O2 -pipe" \
27../${PKGDIR}/configure --prefix=${HST_TOOLS} \
28 --enable-languages=c --enable-__cxa_atexit \
29 --enable-c99 --enable-long-long --enable-threads=posix \
30 --disable-nls --disable-shared \
31 >> ${LOGFILE} 2>&1 &&
32echo " o Configure OK" || barf
33
34min_log_init ${BUILDLOGS} &&
35make ${PMFLAGS} BOOT_LDFLAGS="-s" BOOT_CFLAGS="-O2 -pipe" \
36 STAGE1_CFLAGS="-O2 -pipe" bootstrap \
37 >> ${LOGFILE} 2>&1 &&
38echo " o Build OK" || barf
39
40min_log_init ${TESTLOGS} &&
41make -k check \
42 >> ${LOGFILE} 2>&1 &&
43echo " o Test OK" || errmsg
44
45min_log_init ${INSTLOGS} &&
46make install \
47 >> ${LOGFILE} 2>&1 &&
48echo " o Install OK" || barf
49
50test -L ${HST_TOOLS}/bin/cc || ln -s gcc ${HST_TOOLS}/bin/cc
51
Note: See TracBrowser for help on using the repository browser.