source: scripts/scripts/native-scripts/native-bash.sh @ de2a4b2

clfs-1.2clfs-2.1clfs-3.0.0-systemdclfs-3.0.0-sysvinitsystemdsysvinit
Last change on this file since de2a4b2 was de2a4b2, checked in by Jim Gifford <clfs@…>, 18 years ago

r2504@server (orig r1243): ryan | 2006-03-10 02:06:31 -0800

r1293@rei: lfs | 2006-03-08 18:43:14 +1100
Add lfs bash-3.1-fixes patch


Submitted By: Archaic (archaic AT linuxfromscratch D0T org)
Date: 2006-02-27
Initial Package Version: 3.1
Upstream Status: From Upstream
Origin: http://ftp.gnu.org/gnu/bash/bash-3.1-patches/
Description: Contains patches 001-011 from upstream (including the fixed 010

patch)



  • Property mode set to 100755
File size: 1.7 KB
Line 
1#!/bin/bash
2
3# cross-lfs native bash build
4# ---------------------------
5# $LastChangedBy$
6# $LastChangedDate$
7# $LastChangedRevision$
8# $HeadURL$
9#
10
11cd ${SRC}
12LOG=bash-native.log
13
14set_libdirname
15setup_multiarch
16
17unpack_tarball bash-${BASH_VER} &&
18cd ${PKGDIR}
19
20# If using gcc-3.4.x, patch some syntax gcc-3.4 doesn't like
21# TODO: Get gcc version from cross-gcc itself
22
23case ${BASH_VER} in
24   2.05b )
25      # Apply published official patches for bash-2.05b
26      apply_patch bash-2.05b-gnu_fixes-2
27      case ${GCC_VER} in
28         3.4* )
29            apply_patch bash-2.05b-gcc34-1
30         ;;
31      esac
32   ;;
33   3.0 )
34      # Reported on bug-bash by Tim Waugh <twaugh@redhat.com>
35      # http://lists.gnu.org/archive/html/bug-bash/2004-09/msg00081.html
36      apply_patch bash-3.0-fixes-1
37      apply_patch bash-3.0-avoid_WCONTINUED-1
38   ;;
39   3.1 )
40      apply_patch bash-3.1-fixes-5
41   ;;
42esac
43
44if [ "${USE_READLINE}" = "Y" ]; then
45   extra_conf="--with-installed-readline"
46else
47   # as was used with 2.05b w/o readline in the way old days
48   extra_conf="--with-curses"
49fi
50
51max_log_init Bash ${BASH_VER} "native (shared)" ${CONFLOGS} ${LOG}
52CC="${CC-gcc} ${ARCH_CFLAGS}" \
53CXX="${CXX-g++} ${ARCH_CFLAGS}" \
54CFLAGS="-O2 -pipe ${TGT_CFLAGS}" \
55CXXFLAGS="-O2 -pipe ${TGT_CFLAGS}" \
56./configure --prefix=/usr --bindir=/bin \
57   --without-bash-malloc ${extra_conf} \
58   >> ${LOGFILE} 2>&1 &&
59echo " o Configure OK" || barf
60
61min_log_init ${BUILDLOGS} &&
62make LDFLAGS="-s" \
63   >> ${LOGFILE} 2>&1 &&
64echo " o Build OK" || barf
65
66min_log_init ${TESTLOGS} &&
67make tests \
68   >>  ${LOGFILE} 2>&1 &&
69echo " o Test OK" || errmsg
70
71min_log_init ${INSTLOGS} &&
72make install \
73   >> ${LOGFILE} 2>&1 &&
74echo " o ALL OK" || barf
75
76# Added symlink for /bin/sh
77ln -sf bash /bin/sh
78
Note: See TracBrowser for help on using the repository browser.