From 5e1cfeb86b5561f7ea59a04fa25d677471b49f3f Mon Sep 17 00:00:00 2001 From: Sam James Date: Sun, 21 Nov 2021 14:12:46 +0000 Subject: toolchain.eclass: handle empty musl 'nocross' patches dir Signed-off-by: Sam James --- eclass/toolchain.eclass | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'eclass') diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 627531f2765a..852d65add7c5 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -561,10 +561,16 @@ do_gcc_gentoo_patches() { # We don't want to apply some patches when cross-compiling. if [[ -d "${WORKDIR}"/musl/nocross ]] ; then rm -fv "${WORKDIR}"/musl/nocross/*.patch || die + else + # Just make an empty directory to make the glob below easier. + mkdir -p "${WORKDIR}"/musl/nocross || die fi fi + local shopt_save=$(shopt -p nullglob) + shopt -s nullglob tc_apply_patches "Applying musl patches ..." "${WORKDIR}"/musl/{,nocross/}*.patch + ${shopt_save} fi fi } -- cgit v1.2.3-65-gdbad