diff options
author | Sam James <sam@gentoo.org> | 2021-11-21 14:12:46 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2021-11-21 14:13:56 +0000 |
commit | 5e1cfeb86b5561f7ea59a04fa25d677471b49f3f (patch) | |
tree | 98aaf1c788700507ed9a3f20ca55a142bfacf08a /eclass | |
parent | app-i18n/unicode-emoji: drop old (diff) | |
download | gentoo-5e1cfeb86b5561f7ea59a04fa25d677471b49f3f.tar.gz gentoo-5e1cfeb86b5561f7ea59a04fa25d677471b49f3f.tar.bz2 gentoo-5e1cfeb86b5561f7ea59a04fa25d677471b49f3f.zip |
toolchain.eclass: handle empty musl 'nocross' patches dir
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/toolchain.eclass | 6 |
1 files changed, 6 insertions, 0 deletions
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 } |