source: scripts/native-scripts/temp-binutils.sh@ 1a625f6

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 1a625f6 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: 3.0 KB
RevLine 
[617118d]1#!/bin/bash
2
3# cross-lfs temporary binutils build
4# ----------------------------------
5# $LastChangedBy$
6# $LastChangedDate$
7# $LastChangedRevision$
8# $HeadURL$
9#
10
11cd ${SRC}
12LOG="binutils-temp.log"
13set_libdirname
14setup_multiarch
15if [ ! "${libedirname}" = "lib" ]; then
16 extra_conf="--libdir=${TGT_TOOLS}/${libdirname}"
17fi
18
19unpack_tarball binutils-${BINUTILS_VER} &&
20
21# Determine whether this binutils requires
22# 'make configure-host' and whether
23# ld search path can be set with --with-lib-path.
24# Returned in ${BINUTILS_CONF_HOST} and
25# ${BINUTILS_WITH_LIB_PATH} respectively
26
27# TODO: check for architecture specific patches in check_binutils
28# ( alpha )
29check_binutils
30
31cd ${SRC}/${PKGDIR}
32
33case ${BINUTILS_VER} in
34 # 20031015 - fix static linking issues during testsuite
35 # with current CVS glibc. kernel 2.5.68+
36 # Will only patch HJL 2.14.90.0.[6-7]
37 2.14.90.0.[6-7] ) apply_patch binutils-2.14.90.0.7-fix-static-link ;;
38
39 # Issue with HJL binutils 2.15.94.0.1 stripping needed information
40 # one manifestation is with stripping TLS info from libc.a
41 2.15.94.0.1 ) apply_patch binutils-2.15.94.0.1-fix-strip-1 ;;
42esac
43
44# TODO: This is not gonna cut it for biarch builds... rethink...
45# UPDATE: Fixed with patch below to genscripts
46test Y == "${BINUTILS_WITH_LIB_PATH}" &&
47 BINUTILS_LIB_PATH="--with-lib-path=/lib:/usr/lib" ||
48 BINUTILS_LIB_PATH=""
49
50case ${BINUTILS_VER} in
51 2.14 )
52 apply_patch binutils-2.14-genscripts-multilib
53 ;;
54 2.14.90.0.8 )
55 apply_patch binutils-2.14.90.0.8-genscripts-multilib
56 ;;
57 2.15.9[0124].0.* | 2.15 )
58 apply_patch binutils-2.15.91.0.1-genscripts-multilib
59 ;;
60 2.16* )
61 apply_patch binutils-2.15.91.0.1-genscripts-multilib
62 ;;
63esac
64
65cd ${SRC}
66
67# Remove pre-existing build directory and recreate
68test -d binutils-${BINUTILS_VER}-temp-build &&
69 rm -rf binutils-${BINUTILS_VER}-temp-build
70
71mkdir binutils-${BINUTILS_VER}-temp-build
72cd binutils-${BINUTILS_VER}-temp-build
73
74max_log_init Binutils ${BINUTILS_VER} temp ${CONFLOGS} ${LOG}
75CC="${CC-gcc} ${ARCH_CFLAGS}" ../${PKGDIR}/configure \
76 --prefix=${TGT_TOOLS} \
77 --host=${TARGET} \
78 --disable-nls ${extra_conf} \
79 --enable-shared \
80 --enable-64-bit-bfd ${BINUTILS_LIB_PATH} \
81 >> ${LOGFILE} 2>&1 &&
82{
83 # Run make configure-host if required
84 test Y != "${BINUTILS_CONF_HOST}" ||
85 {
86 echo -e "\nmake configure-host\n${BRKLN}" >> ${LOGFILE}
87 make configure-host >> ${LOGFILE} 2>&1
88 }
89} &&
90echo " o Configure OK" &&
91
92min_log_init ${BUILDLOGS} &&
93make ${PMFLAGS} LDFLAGS="-s" \
94 >> ${LOGFILE} 2>&1 &&
95echo " o Build OK" || barf
96
97min_log_init ${INSTLOGS} &&
98make install \
99 >> ${LOGFILE} 2>&1 &&
100echo " o All OK" || barf
101
102# Copy over libiberty.h
103cp -p ${SRC}/${PKGDIR}/include/libiberty.h ${TGT_TOOLS}/include/libiberty.h
Note: See TracBrowser for help on using the repository browser.