aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/bash/bash-3.2.57
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/bash/bash-3.2.57')
-rw-r--r--meta/recipes-extended/bash/bash-3.2.57/build-tests.patch44
-rw-r--r--meta/recipes-extended/bash/bash-3.2.57/dont-include-target-CFLAGS-in-host-LDFLAGS.patch33
-rw-r--r--meta/recipes-extended/bash/bash-3.2.57/mkbuiltins_have_stringize.patch29
-rw-r--r--meta/recipes-extended/bash/bash-3.2.57/run-ptest2
-rw-r--r--meta/recipes-extended/bash/bash-3.2.57/string-format.patch21
-rw-r--r--meta/recipes-extended/bash/bash-3.2.57/test-output.patch25
6 files changed, 154 insertions, 0 deletions
diff --git a/meta/recipes-extended/bash/bash-3.2.57/build-tests.patch b/meta/recipes-extended/bash/bash-3.2.57/build-tests.patch
new file mode 100644
index 0000000000..e63457cf2b
--- /dev/null
+++ b/meta/recipes-extended/bash/bash-3.2.57/build-tests.patch
@@ -0,0 +1,44 @@
+Add 'ptest' target to Makefile, to run tests without checking dependencies.
+
+Signed-off-by: Anders Roxell <anders.roxell@enea.com>
+Upstream-Status: Pending
+---
+diff -dNaur bash-3.2.48/Makefile.in.orig bash-3.2.48/Makefile.in
+--- bash-3.2.48/Makefile.in.orig 2006-08-17 23:03:35.000000000 +0500
++++ bash-3.2.48/Makefile.in 2013-07-02 20:20:07.512709327 +0500
+@@ -803,17 +803,31 @@
+ fi
+
+ recho$(EXEEXT): $(SUPPORT_SRC)recho.c
+- @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)recho.c ${LIBS_FOR_BUILD}
++ @$(CC) $(CCFLAGS) $(LDFLAGS) -o $@ $<
+
+ zecho$(EXEEXT): $(SUPPORT_SRC)zecho.c
+- @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)zecho.c ${LIBS_FOR_BUILD}
++ @$(CC) $(CCFLAGS) $(LDFLAGS) -o $@ $<
+
+ printenv$(EXEEXT): $(SUPPORT_SRC)printenv.c
+- @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)printenv.c ${LIBS_FOR_BUILD}
++ @$(CC) $(CCFLAGS) $(LDFLAGS) -o $@ $<
+
+-test tests check: force $(Program) $(TESTS_SUPPORT)
++test tests check:
++ @$(MAKE) install-test
++ @$(MAKE) runtest
++
++install-test: buildtest
++ifeq ($(origin INSTALL_TEST_DIR), undefined)
+ @-test -d tests || mkdir tests
+ @cp $(TESTS_SUPPORT) tests
++else
++ @-test -d $(INSTALL_TEST_DIR) || mkdir -p $(INSTALL_TEST_DIR)
++ @cp -r $(srcdir)/tests/* $(INSTALL_TEST_DIR)/
++ @cp $(TESTS_SUPPORT) $(INSTALL_TEST_DIR)
++endif
++
++buildtest: force $(Program) $(TESTS_SUPPORT)
++
++runtest:
+ @( cd $(srcdir)/tests && \
+ PATH=$(BUILD_DIR)/tests:$$PATH THIS_SH=$(THIS_SH) $(SHELL) ${TESTSCRIPT} )
+
diff --git a/meta/recipes-extended/bash/bash-3.2.57/dont-include-target-CFLAGS-in-host-LDFLAGS.patch b/meta/recipes-extended/bash/bash-3.2.57/dont-include-target-CFLAGS-in-host-LDFLAGS.patch
new file mode 100644
index 0000000000..ee756dc9e3
--- /dev/null
+++ b/meta/recipes-extended/bash/bash-3.2.57/dont-include-target-CFLAGS-in-host-LDFLAGS.patch
@@ -0,0 +1,33 @@
+From 933bd886af49667e88e2385409449ab598813dab Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Wed, 15 Jul 2015 00:54:33 -0700
+Subject: [PATCH] dont include target CFLAGS in host LDFLAGS
+
+Building the host tool 'mkbuiltins' will fail if the target CFLAGS
+contains an option which isn't supported by the host's gcc. To prevent
+the issue, define LDFLAGS_FOR_BUILD based on CFLAGS_FOR_BUILD instead
+of CFLAGS.
+
+Upstream-Status: Inappropriate [required for bash 3.2.57 (GPLv2) recipe only]
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ builtins/Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/builtins/Makefile.in b/builtins/Makefile.in
+index e027f7a..ebfddf3 100644
+--- a/builtins/Makefile.in
++++ b/builtins/Makefile.in
+@@ -63,7 +63,7 @@ LOCAL_DEFS = @LOCAL_DEFS@
+
+ LIBS = @LIBS@
+ LDFLAGS = @LDFLAGS@ $(LOCAL_LDFLAGS) $(CFLAGS)
+-LDFLAGS_FOR_BUILD = $(LDFLAGS)
++LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ $(LOCAL_LDFLAGS) $(CFLAGS_FOR_BUILD)
+ LOCAL_LDFLAGS = @LOCAL_LDFLAGS@
+ #LIBS_FOR_BUILD = @LIBS_FOR_BUILD@
+ LIBS_FOR_BUILD = $(LIBS)
+--
+1.9.1
+
diff --git a/meta/recipes-extended/bash/bash-3.2.57/mkbuiltins_have_stringize.patch b/meta/recipes-extended/bash/bash-3.2.57/mkbuiltins_have_stringize.patch
new file mode 100644
index 0000000000..c4229a7ed9
--- /dev/null
+++ b/meta/recipes-extended/bash/bash-3.2.57/mkbuiltins_have_stringize.patch
@@ -0,0 +1,29 @@
+On hosts with FORTIFY_SOURCES, stringize support is required, as it's used by
+the macros to wrap functions (e.g. read and open in unistd.h). Those wrappers
+use the STRING() macro from unistd.h. A header in the bash sources overrides
+the unistd.h macro to 'x' when HAVE_STRINGIZE is not defined, causing the
+wrappers to generate calls to 'xread' and 'xopen', which do not exist,
+resulting in a failure to link.
+
+Assume we have stringize support when cross-compiling, which works around the
+issue.
+
+It may be best for upstream to either give up on supporting compilers without
+stringize support, or to not define STRING() at all when FORTIFY_SOURCES is
+defined, letting the unistd.h one be used, instead.
+
+Upstream-Status: Pending
+
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+--- bash-4.2.orig/builtins/mkbuiltins.c
++++ bash-4.2/builtins/mkbuiltins.c
+@@ -28,6 +28,7 @@
+ # define HAVE_STDLIB_H
+
+ # define HAVE_RENAME
++# define HAVE_STRINGIZE
+ #endif /* CROSS_COMPILING */
+
+ #if defined (HAVE_UNISTD_H)
diff --git a/meta/recipes-extended/bash/bash-3.2.57/run-ptest b/meta/recipes-extended/bash/bash-3.2.57/run-ptest
new file mode 100644
index 0000000000..8dd3b9981d
--- /dev/null
+++ b/meta/recipes-extended/bash/bash-3.2.57/run-ptest
@@ -0,0 +1,2 @@
+#!/bin/sh
+make -k THIS_SH=/bin/bash BUILD_DIR=. runtest
diff --git a/meta/recipes-extended/bash/bash-3.2.57/string-format.patch b/meta/recipes-extended/bash/bash-3.2.57/string-format.patch
new file mode 100644
index 0000000000..eda39649d9
--- /dev/null
+++ b/meta/recipes-extended/bash/bash-3.2.57/string-format.patch
@@ -0,0 +1,21 @@
+Fix a string format warning when using security flags:
+
+| ../bash-3.2.48/print_cmd.c:1152:3: error: format not a string literal and no format arguments [-Werror=format-security]
+| cprintf (indentation_string);
+
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/print_cmd.c b/print_cmd.c
+index d1dfd1a..956db53 100644
+--- a/print_cmd.c
++++ b/print_cmd.c
+@@ -1149,7 +1149,7 @@ indent (amount)
+ for (i = 0; amount > 0; amount--)
+ indentation_string[i++] = ' ';
+ indentation_string[i] = '\0';
+- cprintf (indentation_string);
++ cprintf ("%s", indentation_string);
+ }
+
+ static void
diff --git a/meta/recipes-extended/bash/bash-3.2.57/test-output.patch b/meta/recipes-extended/bash/bash-3.2.57/test-output.patch
new file mode 100644
index 0000000000..2b09b7d977
--- /dev/null
+++ b/meta/recipes-extended/bash/bash-3.2.57/test-output.patch
@@ -0,0 +1,25 @@
+Add FAIL/PASS output to test output.
+
+Signed-off-by: Björn Stenberg <bjst@enea.com>
+Upstream-Status: Pending
+---
+diff -uNr a/tests/run-all b/tests/run-all
+--- a/tests/run-all 1999-10-08 17:07:46.000000000 +0200
++++ b/tests/run-all 2012-10-27 21:04:18.663331887 +0200
+@@ -22,7 +22,15 @@
+ case $x in
+ $0|run-minimal|run-gprof) ;;
+ *.orig|*~) ;;
+- *) echo $x ; sh $x ;;
++ *) echo $x
++ output=`sh $x`
++ if [ -n "$output" ]; then
++ echo "$output"
++ echo "FAIL: $x"
++ else
++ echo "PASS: $x"
++ fi
++ ;;
+ esac
+ done
+