1 | #!/bin/bash |
---|
2 | |
---|
3 | ### BINUTILS ### |
---|
4 | |
---|
5 | cd ${SRC} |
---|
6 | LOG="binutils-buildhost.log" |
---|
7 | |
---|
8 | unpack_tarball binutils-${NATIVE_BINUTILS_VER} && |
---|
9 | |
---|
10 | # Determine whether this binutils requires |
---|
11 | # 'make configure-host' and whether |
---|
12 | # ld search path can be set with --with-lib-path. |
---|
13 | # Returned in ${BINUTILS_CONF_HOST} and |
---|
14 | # ${BINUTILS_WITH_LIB_PATH} respectively |
---|
15 | |
---|
16 | # TODO: check for architecture specific patches in check_binutils |
---|
17 | # ( alpha ) |
---|
18 | check_binutils |
---|
19 | |
---|
20 | cd ${SRC}/${PKGDIR} |
---|
21 | |
---|
22 | # 20031015 - fix static linking issues during testsuite |
---|
23 | # with current CVS glibc. kernel 2.5.68+ |
---|
24 | # Will only patch HJL 2.14.90.0.[6-7] |
---|
25 | |
---|
26 | case ${NATIVE_BINUTILS_VER} in |
---|
27 | 2.14.90.0.[6-7] ) |
---|
28 | apply_patch binutils-2.14.90.0.7-fix-static-link |
---|
29 | ;; |
---|
30 | esac |
---|
31 | |
---|
32 | cd ${SRC} |
---|
33 | |
---|
34 | # Remove pre-existing build directory and recreate |
---|
35 | test -d binutils-${NATIVE_BINUTILS_VER}-buildhost-build && |
---|
36 | rm -rf binutils-${NATIVE_BINUTILS_VER}-buildhost-build |
---|
37 | |
---|
38 | mkdir binutils-${NATIVE_BINUTILS_VER}-buildhost-build |
---|
39 | cd binutils-${NATIVE_BINUTILS_VER}-buildhost-build |
---|
40 | |
---|
41 | max_log_init Binutils ${NATIVE_BINUTILS_VER} target ${CONFLOGS} ${LOG} |
---|
42 | CC="${CC-gcc}" ../${PKGDIR}/configure \ |
---|
43 | --prefix=${HST_TOOLS} \ |
---|
44 | --disable-nls \ |
---|
45 | --enable-shared \ |
---|
46 | --enable-64-bit-bfd \ |
---|
47 | >> ${LOGFILE} 2>&1 && |
---|
48 | { |
---|
49 | # Run make configure-host if required |
---|
50 | test Y != "${BINUTILS_CONF_HOST}" || |
---|
51 | { |
---|
52 | echo -e "\nmake configure-host\n${BRKLN}" >> ${LOGFILE} |
---|
53 | make configure-host >> ${LOGFILE} 2>&1 |
---|
54 | } |
---|
55 | } && |
---|
56 | echo " o Configure OK" && |
---|
57 | |
---|
58 | min_log_init ${BUILDLOGS} && |
---|
59 | make ${PMFLAGS} \ |
---|
60 | >> ${LOGFILE} 2>&1 && |
---|
61 | echo " o Build OK" || barf |
---|
62 | |
---|
63 | min_log_init ${TESTLOGS} && |
---|
64 | make -k check \ |
---|
65 | >> ${LOGFILE} 2>&1 && |
---|
66 | echo " o Test OK" || errmsg |
---|
67 | |
---|
68 | min_log_init ${INSTLOGS} && |
---|
69 | make install \ |
---|
70 | >> ${LOGFILE} 2>&1 && |
---|
71 | echo " o All OK" || barf |
---|
72 | |
---|