[PATCH] Makefile.in: Make for loop failures fatal

2020-06-27 Thread Jessica Clarke
Without set -e, these for loops will exit with code 0 and so make will regard the recipes as being successful. --- Makefile.in | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile.in b/Makefile.in index ee471583..a12ed426 100644 --- a/Makefile.in +++ b/Makefile.i

[PATCH 1/3] aclocal.m4: Fix BASH_FUNC_STRSIGNAL when compiling for FreeBSD/RISC-V

2020-06-27 Thread Jessica Clarke
POSIX defines strsignal(3) as being in string.h, not signal.h. We leave the test as also checking signal.h for compatibility with any legacy non-conforming systems. --- aclocal.m4 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aclocal.m4 b/aclocal.m4 index 1413267f..c4a54f27

[PATCH 2/3] aclocal.m4: Fix BASH_FUNC_SBRK when cross-compiling for FreeBSD/RISC-V

2020-06-27 Thread Jessica Clarke
FreeBSD unconditionally provides a prototype for sbrk(2), but on recent ports (AArch64 and RISC-V) it does not provide the deprecated symbol. This means that, when cross-compiling, we currently only get to use AC_CHECK_FUNCS_ONCE, and so believe sbrk(2) to be available. Instead, use AC_TRY_LINK so

[PATCH 3/3] configure.ac: Disable Bash malloc on FreeBSD/arm64 and FreeBSD/RISC-V

2020-06-27 Thread Jessica Clarke
These recent ports do not provide sbrk(2) and so the Bash version of malloc cannot be used. --- configure.ac | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configure.ac b/configure.ac index 52b4cdbd..dd8d9003 100644 --- a/configure.ac +++ b/configure.ac @@ -88,6 +88,9 @@ sparc-linux*) opt_

[PATCH] unwind_prot.c: Avoid buffer overflow

2020-06-27 Thread Jessica Clarke
In unwind_protect_mem_internal, we must make sure to allocate at least a full UNWIND_ELT, even if the required size for desired_setting is less than the remaining padding in UNWIND_ELT. Otherwise when we come to memset it with 0xdf in unwind_frame_discard_internal we will overflow the allocation.

[PATCH 0/3] Fix cross-compiling for FreeBSD/RISC-V

2020-06-27 Thread Jessica Clarke
This patch series includes the necessary changes for bash to cross-compile for FreeBSD/RISC-V, and likely also FreeBSD/arm64, though I have not tested that. Jessica Clarke (3): aclocal.m4: Fix BASH_FUNC_STRSIGNAL when compiling for FreeBSD/RISC-V aclocal.m4: Fix BASH_FUNC_SBRK when cross-compi

[PATCH] Makefile.in: Fix out-of-tree build

2020-06-27 Thread Jessica Clarke
y.tab.h is present in the source directory, not generated in the build directory. --- Makefile.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.in b/Makefile.in index 5fcb44b0..ee471583 100644 --- a/Makefile.in +++ b/Makefile.in @@ -459,7 +459,7 @@ INSTALLED_HEAD

[PATCH] finfo.c: Fix -Wformat warnings

2020-06-27 Thread Jessica Clarke
We must cast these to unsigned long like the surrounding code. --- examples/loadables/finfo.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/loadables/finfo.c b/examples/loadables/finfo.c index 4273aa59..92e98008 100644 --- a/examples/loadables/finfo.c +++ b/exa