diff options
| author | Ross Burton <ross.burton@intel.com> | 2019-07-25 16:20:23 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-07-26 08:41:38 +0100 |
| commit | 81485be19b180c3249099b3606888f8357fbb9e1 (patch) | |
| tree | 31224879dd944ada469d662a2dd3a88b96961632 /meta/recipes-support | |
| parent | 9b7a1653d8a30c232bf99fe26f9d1085c8e42f82 (diff) | |
| download | poky-81485be19b180c3249099b3606888f8357fbb9e1.tar.gz | |
gnutls: don't use HOSTTOOLS_DIR/bash as a shell on target
The libopts configure script looks for a shell on the build host and assumes
it's good for the target. However in our builds it find $HOSTTOOLS_DIR/bash
which isn't useful, so patch out the detection and force $base_bindir/sh.
(From OE-Core rev: 9aaa1e3bdfd767fe8e19c00c611b34920644df27)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support')
| -rw-r--r-- | meta/recipes-support/gnutls/gnutls/posix-shell.patch | 39 | ||||
| -rw-r--r-- | meta/recipes-support/gnutls/gnutls_3.6.8.bb | 4 |
2 files changed, 43 insertions, 0 deletions
diff --git a/meta/recipes-support/gnutls/gnutls/posix-shell.patch b/meta/recipes-support/gnutls/gnutls/posix-shell.patch new file mode 100644 index 0000000000..938e2d1e18 --- /dev/null +++ b/meta/recipes-support/gnutls/gnutls/posix-shell.patch | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | Don't embed the path to the build-time POSIX shell as this will be | ||
| 2 | $TMPDIR/hosttools/bash, which is no good on the target. | ||
| 3 | |||
| 4 | Instead default to /bin/sh but allow it to be set in the environment. | ||
| 5 | |||
| 6 | This isn't really upstreamable but I filed a bug at | ||
| 7 | https://gitlab.com/gnutls/gnutls/issues/807 and hope a proper fix will be | ||
| 8 | integrated. | ||
| 9 | |||
| 10 | Upstream-Status: Inappropriate | ||
| 11 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
| 12 | |||
| 13 | diff --git a/src/libopts/m4/libopts.m4 b/src/libopts/m4/libopts.m4 | ||
| 14 | index c6ad738..a62faca 100644 | ||
| 15 | --- a/src/libopts/m4/libopts.m4 | ||
| 16 | +++ b/src/libopts/m4/libopts.m4 | ||
| 17 | @@ -112,21 +112,7 @@ AC_DEFUN([INVOKE_LIBOPTS_MACROS_FIRST],[ | ||
| 18 | AC_CHECK_FUNCS([mmap canonicalize_file_name snprintf strdup strchr \ | ||
| 19 | strrchr strsignal fchmod fstat chmod]) | ||
| 20 | AC_PROG_SED | ||
| 21 | - [while : | ||
| 22 | - do | ||
| 23 | - POSIX_SHELL=`which bash` | ||
| 24 | - test -x "$POSIX_SHELL" && break | ||
| 25 | - POSIX_SHELL=`which dash` | ||
| 26 | - test -x "$POSIX_SHELL" && break | ||
| 27 | - POSIX_SHELL=/usr/xpg4/bin/sh | ||
| 28 | - test -x "$POSIX_SHELL" && break | ||
| 29 | - POSIX_SHELL=`/bin/sh -c ' | ||
| 30 | - exec 2>/dev/null | ||
| 31 | - if ! true ; then exit 1 ; fi | ||
| 32 | - echo /bin/sh'` | ||
| 33 | - test -x "$POSIX_SHELL" && break | ||
| 34 | - ]AC_MSG_ERROR([cannot locate a working POSIX shell])[ | ||
| 35 | - done] | ||
| 36 | + POSIX_SHELL="${POSIX_SHELL:-/bin/sh}" | ||
| 37 | AC_DEFINE_UNQUOTED([POSIX_SHELL], ["${POSIX_SHELL}"], | ||
| 38 | [define to a working POSIX compliant shell]) | ||
| 39 | AC_SUBST([POSIX_SHELL]) | ||
diff --git a/meta/recipes-support/gnutls/gnutls_3.6.8.bb b/meta/recipes-support/gnutls/gnutls_3.6.8.bb index 6c6c520e8c..c927063f0a 100644 --- a/meta/recipes-support/gnutls/gnutls_3.6.8.bb +++ b/meta/recipes-support/gnutls/gnutls_3.6.8.bb | |||
| @@ -19,6 +19,7 @@ SHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}" | |||
| 19 | 19 | ||
| 20 | SRC_URI = "https://www.gnupg.org/ftp/gcrypt/gnutls/v${SHRT_VER}/gnutls-${PV}.tar.xz \ | 20 | SRC_URI = "https://www.gnupg.org/ftp/gcrypt/gnutls/v${SHRT_VER}/gnutls-${PV}.tar.xz \ |
| 21 | file://arm_eabi.patch \ | 21 | file://arm_eabi.patch \ |
| 22 | file://posix-shell.patch \ | ||
| 22 | " | 23 | " |
| 23 | 24 | ||
| 24 | SRC_URI[md5sum] = "9dcf0aa45d1a42e1b3ca5d39ec7c61a8" | 25 | SRC_URI[md5sum] = "9dcf0aa45d1a42e1b3ca5d39ec7c61a8" |
| @@ -47,6 +48,9 @@ EXTRA_OECONF = " \ | |||
| 47 | --with-default-trust-store-file=${sysconfdir}/ssl/certs/ca-certificates.crt \ | 48 | --with-default-trust-store-file=${sysconfdir}/ssl/certs/ca-certificates.crt \ |
| 48 | " | 49 | " |
| 49 | 50 | ||
| 51 | # Otherwise the tools try and use HOSTTOOLS_DIR/bash as a shell. | ||
| 52 | export POSIX_SHELL="${base_bindir}/sh" | ||
| 53 | |||
| 50 | LDFLAGS_append_libc-musl = " -largp" | 54 | LDFLAGS_append_libc-musl = " -largp" |
| 51 | 55 | ||
| 52 | do_configure_prepend() { | 56 | do_configure_prepend() { |
