source: scripts/funcs/binutils-funcs.sh@ fcf217f

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since fcf217f 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.7 KB
Line 
1#!/bin/bash
2#
3# functions for cross-lfs binutils build
4# -----------------------------------------
5# $LastChangedBy$
6# $LastChangedDate$
7# $LastChangedRevision$
8# $HeadURL$
9#
10
11check_binutils () {
12 # This should be run immediately after unpack_tarballs for binutils
13 # so PKGDIR is set to the right directory
14
15 # Check if this version of binutils requires
16 # 'make configure-host'
17 echo -e "Checking Binutils features...\n${BRKLN}"
18 grep configure-host ${SRC}/${PKGDIR}/Makefile.in > /dev/null 2>&1 &&
19 export BINUTILS_CONF_HOST=Y ||
20 export BINUTILS_CONF_HOST=N
21 echo -e " o Requires 'make configure-host' ........... ${BINUTILS_CONF_HOST}"
22
23 # Do we have --with-lib-path option to ld/configure
24 grep with-lib-path ${SRC}/${PKGDIR}/ld/configure > /dev/null 2>&1 &&
25 export BINUTILS_WITH_LIB_PATH=Y ||
26 export BINUTILS_WITH_LIB_PATH=N
27 echo -e " o Has '--with-lib-path=' configure option .. ${BINUTILS_WITH_LIB_PATH}\n"
28
29 # Modify ld/Makefile.in if necessary
30 grep "GENSCRIPTS = LIB_PATH" ${SRC}/${PKGDIR}/ld/Makefile.in \
31 > /dev/null 2>&1 ||
32 {
33 echo " o adding 'LIB_PATH = \$(LIB_PATH)' to GENSCRIPTS definition"
34 echo " in ld/Makefile.in"
35 echo " ( Passes value of LIB_PATH to genscripts.sh environment"
36 echo -e " for ldscript creation. )\n"
37
38 test -f ${SRC}/${PKGDIR}/ld/Makefile.in-ORIG ||
39 cp ${SRC}/${PKGDIR}/ld/Makefile.in \
40 ${SRC}/${PKGDIR}/ld/Makefile.in-ORIG
41
42 #TODO: fix this sed
43 sed 's@^GENSCRIPTS = @GENSCRIPTS = LIB_PATH=\$\(LIB_PATH\) @g' \
44 ${SRC}/${PKGDIR}/ld/Makefile.in-ORIG \
45 > ${SRC}/${PKGDIR}/ld/Makefile.in
46 }
47}
48
49# Export functions
50export -f check_binutils
51
Note: See TracBrowser for help on using the repository browser.