summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/autoconf/autoconf/preferbash.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/autoconf/autoconf/preferbash.patch')
-rw-r--r--meta/recipes-devtools/autoconf/autoconf/preferbash.patch39
1 files changed, 25 insertions, 14 deletions
diff --git a/meta/recipes-devtools/autoconf/autoconf/preferbash.patch b/meta/recipes-devtools/autoconf/autoconf/preferbash.patch
index fa76ee9bdd..3979e83f70 100644
--- a/meta/recipes-devtools/autoconf/autoconf/preferbash.patch
+++ b/meta/recipes-devtools/autoconf/autoconf/preferbash.patch
@@ -1,25 +1,36 @@
1This value is used to determine CONFIG_SHELL and SHELL which may get exported into 1From 0aac3047cd7681d610b22d79501c297fa3433148 Mon Sep 17 00:00:00 2001
2scripts shared via sstate onto other systems. 2From: Ross Burton <ross.burton@intel.com>
3Date: Thu, 12 Mar 2020 17:25:41 +0000
4Subject: [PATCH 2/7] m4sh: prefer bash over sh
3 5
4Some systems have /bin/sh -> dash and others /bin/sh -> bash. Bash is preferred 6_AS_DETECT_BETTER_SHELL looks for a good shell to use, and tries to look for
5but sometimes we can sometimes end up exporting /bin/sh yet use bashisms. 7'sh' before 'bash'. Whilst for many systems sh is a symlink to bash,
8there are many where sh is a symlink to a more minimal sh implementation.
6 9
7This patch puts bash first in the search results which avoids the bash/dash confusion. 10For example, Debian by default has /bin/sh -> /bin/dash: dash is a faster
11shell to start (which makes a notable difference to boot speed) but is not
12as fast as bash at executing long scripts (and configure scripts are not
13known for their conciseness).
8 14
9RP 2012/9/23 15Change the search order to bash then sh, so that a known-good shell (bash)
16is used if available over something which is merely POSIX compliant.
17---
18 lib/m4sugar/m4sh.m4 | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-)
10 20
11Upstream-Status: Inappropriate [OE specific configuration] 21diff --git a/lib/m4sugar/m4sh.m4 b/lib/m4sugar/m4sh.m4
12 22index 9d543952..84ef84a9 100644
13Index: autoconf-2.69/lib/m4sugar/m4sh.m4 23--- a/lib/m4sugar/m4sh.m4
14=================================================================== 24+++ b/lib/m4sugar/m4sh.m4
15--- autoconf-2.69.orig/lib/m4sugar/m4sh.m4 2012-03-07 17:35:26.000000000 +0000 25@@ -230,7 +230,7 @@ dnl Remove any tests from suggested that are also required
16+++ autoconf-2.69/lib/m4sugar/m4sh.m4 2013-09-23 16:12:38.853597515 +0000
17@@ -229,7 +229,7 @@
18 [_AS_PATH_WALK([/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH], 26 [_AS_PATH_WALK([/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH],
19 [case $as_dir in @%:@( 27 [case $as_dir in @%:@(
20 /*) 28 /*)
21- for as_base in sh bash ksh sh5; do 29- for as_base in sh bash ksh sh5; do
22+ for as_base in bash sh ksh sh5; do 30+ for as_base in bash sh ksh sh5; do
23 # Try only shells that exist, to save several forks. 31 # Try only shells that exist, to save several forks.
24 as_shell=$as_dir/$as_base 32 as_shell=$as_dir$as_base
25 AS_IF([{ test -f "$as_shell" || test -f "$as_shell.exe"; } && 33 AS_IF([{ test -f "$as_shell" || test -f "$as_shell.exe"; } &&
34--
352.25.1
36