Step4: enhanced shell with bash.
Signed-off-by: Chen Wang <wangchen20@iscas.ac.cn>
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
From 4fa85c85b9a76afd3b19ed75bf17ccd2940f1f55 Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Sun, 16 Feb 2020 16:18:48 +0100
|
||||
Subject: [PATCH] input.h: add missing include on stdio.h
|
||||
|
||||
This will fix the following build failure on uclibc:
|
||||
|
||||
test -n "/usr/lfs/hdd_v1/rc-buildroot-test/scripts/instance-2/output/host/bin/arm-linux-ranlib" && /usr/lfs/hdd_v1/rc-buildroot-test/scripts/instance-2/output/host/bin/arm-linux-ranlib libsh.a
|
||||
In file included from ./exec.def:71:
|
||||
../input.h:76:3: error: unknown type name 'FILE'
|
||||
FILE *file;
|
||||
^~~~
|
||||
|
||||
Fixes:
|
||||
- http://autobuild.buildroot.org/results/bfca306868df54c567215c45c8cdac838d02f567
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
[Upstream status: https://savannah.gnu.org/support/?110196]
|
||||
---
|
||||
input.h | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/input.h b/input.h
|
||||
index 6aef1269..08b0fdea 100644
|
||||
--- a/input.h
|
||||
+++ b/input.h
|
||||
@@ -21,6 +21,8 @@
|
||||
#if !defined (_INPUT_H_)
|
||||
#define _INPUT_H_
|
||||
|
||||
+#include <stdio.h>
|
||||
+
|
||||
#include "stdc.h"
|
||||
|
||||
/* Function pointers can be declared as (Function *)foo. */
|
||||
--
|
||||
2.24.1
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
From 0217fc2816e47ee296472df71d1011f0eb2937e6 Mon Sep 17 00:00:00 2001
|
||||
From: Vincent Fazio <vfazio@gmail.com>
|
||||
Date: Fri, 27 Jan 2023 14:37:26 -0600
|
||||
Subject: [PATCH] parse.y: fix compilation for non-multibyte builds
|
||||
|
||||
Builds configured with --disable-multibyte or when the toolchain does
|
||||
not have WCHAR support would encounter a compile error due to an
|
||||
undeclared reference to shell_input_line_property in shell_getc.
|
||||
|
||||
Add a HANDLE_MULTIBYTE guard to conditionally compile the block that
|
||||
references shell_input_line_property in shell_getc as it's only declared
|
||||
when HANDLE_MULTIBYTE is defined.
|
||||
|
||||
Signed-off-by: Vincent Fazio <vfazio@gmail.com>
|
||||
[Upstream status: https://savannah.gnu.org/patch/index.php?10309]
|
||||
---
|
||||
parse.y | 2 ++
|
||||
y.tab.c | 2 ++
|
||||
2 files changed, 4 insertions(+)
|
||||
|
||||
diff --git a/parse.y b/parse.y
|
||||
index 1d12e639..8f1355c6 100644
|
||||
--- a/parse.y
|
||||
+++ b/parse.y
|
||||
@@ -2640,6 +2640,7 @@ next_alias_char:
|
||||
parser_state |= PST_ENDALIAS;
|
||||
/* We need to do this to make sure last_shell_getc_is_singlebyte returns
|
||||
true, since we are returning a single-byte space. */
|
||||
+#if defined (HANDLE_MULTIBYTE)
|
||||
if (shell_input_line_index == shell_input_line_len && last_shell_getc_is_singlebyte == 0)
|
||||
{
|
||||
#if 0
|
||||
@@ -2653,6 +2654,7 @@ next_alias_char:
|
||||
shell_input_line_property[shell_input_line_index - 1] = 1;
|
||||
#endif
|
||||
}
|
||||
+#endif /* HANDLE_MULTIBYTE */
|
||||
return ' '; /* END_ALIAS */
|
||||
}
|
||||
#endif
|
||||
diff --git a/y.tab.c b/y.tab.c
|
||||
index 50c5845b..799f730f 100644
|
||||
--- a/y.tab.c
|
||||
+++ b/y.tab.c
|
||||
@@ -4955,6 +4955,7 @@ next_alias_char:
|
||||
parser_state |= PST_ENDALIAS;
|
||||
/* We need to do this to make sure last_shell_getc_is_singlebyte returns
|
||||
true, since we are returning a single-byte space. */
|
||||
+#if defined (HANDLE_MULTIBYTE)
|
||||
if (shell_input_line_index == shell_input_line_len && last_shell_getc_is_singlebyte == 0)
|
||||
{
|
||||
#if 0
|
||||
@@ -4968,6 +4969,7 @@ next_alias_char:
|
||||
shell_input_line_property[shell_input_line_index - 1] = 1;
|
||||
#endif
|
||||
}
|
||||
+#endif /* HANDLE_MULTIBYTE */
|
||||
return ' '; /* END_ALIAS */
|
||||
}
|
||||
#endif
|
||||
--
|
||||
2.25.1
|
||||
|
||||
43
package/bash/make.sh
Executable file
43
package/bash/make.sh
Executable file
@@ -0,0 +1,43 @@
|
||||
#!/usr/bin/bash
|
||||
source $(dirname "$0")/../common.sh
|
||||
|
||||
PKGNAME=bash
|
||||
PKGVERSION=5.2.37
|
||||
PKGSOURCE_DIR=bash
|
||||
PKGSOURCE=bash-5.2.37.tar.gz
|
||||
PKGURL=http://mirrors.ustc.edu.cn/gnu/bash/bash-5.2.37.tar.gz
|
||||
|
||||
PKGBUILDNAME=${PKGNAME}
|
||||
PKGBUILD_DIR=${BUILD_DIR}/${PKGBUILDNAME}-${PKGVERSION}
|
||||
|
||||
echo "----> Building ${PKGBUILDNAME} ..."
|
||||
|
||||
stamp_downloaded
|
||||
|
||||
step_start extract
|
||||
mkdir -p ${PKGBUILD_DIR}
|
||||
gzip -d -c ${DL_DIR}/${PKGSOURCE_DIR}/${PKGSOURCE} | tar --strip-components=1 -C ${PKGBUILD_DIR} -xf -
|
||||
chmod -R +rw ${PKGBUILD_DIR}
|
||||
step_end extract
|
||||
|
||||
step_start patch
|
||||
TAR="tar" PATH=${HOST_DIR}/bin:$PATH ${PROJECT_DIR}/support/scripts/apply-patches.sh ${PKGBUILD_DIR} ${PROJECT_DIR}/package/${PKGNAME} \*.patch
|
||||
step_end patch autotools
|
||||
|
||||
step_start configure
|
||||
(cd ${PKGBUILD_DIR} && rm -rf config.cache && eval "${TARGET_CONFIGURE_OPTS} CXX=no ac_cv_lbl_unaligned_fail=yes ac_cv_func_mmap_fixed_mapped=yes ac_cv_func_memcmp_working=yes ac_cv_have_decl_malloc=yes gl_cv_func_malloc_0_nonnull=yes ac_cv_func_malloc_0_nonnull=yes ac_cv_func_calloc_0_nonnull=yes ac_cv_func_realloc_0_nonnull=yes lt_cv_sys_lib_search_path_spec=\"\" ac_cv_c_bigendian=no ac_cv_rl_prefix=\"${STAGING_DIR}\" ac_cv_rl_version=\"8.3\" bash_cv_getcwd_malloc=yes bash_cv_job_control_missing=present bash_cv_sys_named_pipes=present bash_cv_func_sigsetjmp=present bash_cv_printf_a_format=yes CONFIG_SITE=/dev/null ./configure --target=${GNU_TARGET_NAME} --host=${GNU_TARGET_NAME} --build=x86_64-pc-linux-gnu --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --localstatedir=/var --program-prefix=\"\" --disable-gtk-doc --disable-gtk-doc-html --disable-doc --disable-docs --disable-documentation --with-xmlto=no --with-fop=no --disable-dependency-tracking --enable-ipv6 --disable-nls --disable-static --enable-shared --bindir=/bin --with-installed-readline --without-bash-malloc")
|
||||
step_end configure
|
||||
|
||||
step_start build
|
||||
eval "${TARGET_MAKE_ENV} /usr/bin/make -j${MAXNUM_CPUS} -C ${PKGBUILD_DIR}"
|
||||
step_end build
|
||||
|
||||
step_start install-target
|
||||
eval "${TARGET_MAKE_ENV} /usr/bin/make -j${MAXNUM_CPUS} DESTDIR=${TARGET_DIR} install -C ${PKGBUILD_DIR}"
|
||||
rm -f ${TARGET_DIR}/bin/bashbug
|
||||
rm -rf ${TARGET_DIR}/usr/lib/bash
|
||||
step_end install-target
|
||||
|
||||
stamp_installed
|
||||
|
||||
echo "<---- ${PKGBUILDNAME} build complete."
|
||||
Reference in New Issue
Block a user