commit: c5c2daa6ff0970a37747c58328df38b4ce57207f Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> AuthorDate: Sun May 1 19:51:05 2016 +0000 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> CommitDate: Sun May 1 19:51:46 2016 +0000 URL: https://gitweb.gentoo.org/proj/hardened-dev.git/commit/?id=c5c2daa6
toolchain.eclass: sanely check if there are spec files to be installed eclass/toolchain.eclass | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 247dcee..40b2cf9 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -1954,7 +1954,11 @@ copy_minispecs_gcc_specs() { fi create_gcc_env_entry vanilla insinto ${LIBPATH} - doins "${WORKDIR}"/specs/*.specs || die "failed to install specs" + # Only doins if there are actually spec files in "${WORKDIR}"/specs/ + local SPECSDIR="${WORKDIR}"/specs/ + if [[ "$(ls -A ${SPECSDIR})" ]]; then + doins "${SPECSDIR}"/*.specs || die "failed to install specs" + fi # Build system specs file which, if it exists, must be a complete set of # specs as it completely and unconditionally overrides the builtin specs. if ! tc_version_is_at_least 4.4 ; then