]> code.ossystems Code Review - openembedded-core.git/commitdiff
bash: fix wrong exit status offset
authorRui Wang <rui.wang@windriver.com>
Mon, 16 Jul 2018 02:55:08 +0000 (10:55 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 18 Jul 2018 09:13:30 +0000 (10:13 +0100)
In Linux,8 bits of the return code and 8 bits of the number of
the killing signal are mixed into a single value on the exit code,
so the exit status offset should be 8. But the autoconf checker
can not determine it while cross compiling, and then it is set to
the default value 0, which will cause generating the wrong exit
code if program exit with an error code.

Signed-off-by: Rui Wang <rui.wang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-extended/bash/bash.inc

index 9c2b065f9f36a6ed275c2ce60110e6204c9683f5..2e7f261a2e7cca61cd846024cf7c2621da401da1 100644 (file)
@@ -7,7 +7,7 @@ DEPENDS = "ncurses bison-native virtual/libiconv"
 inherit autotools gettext texinfo update-alternatives ptest
 
 EXTRA_AUTORECONF += "--exclude=autoheader --exclude=aclocal"
-EXTRA_OECONF = "--enable-job-control --without-bash-malloc"
+EXTRA_OECONF = "--enable-job-control --without-bash-malloc bash_cv_wexitstatus_offset=8"
 
 # If NON_INTERACTIVE_LOGIN_SHELLS is defined, all login shells read the
 # startup files, even if they are not interactive.