commit:     5bd9495d157f02609a2942992e42cf08121ea15a
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 11 18:45:12 2021 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sun Jul 11 18:45:32 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5bd9495d

app-editors/emacs: Work around jit not working with ccache

Bug: https://bugs.gentoo.org/801580
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 app-editors/emacs/emacs-28.0.9999.ebuild | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/app-editors/emacs/emacs-28.0.9999.ebuild 
b/app-editors/emacs/emacs-28.0.9999.ebuild
index aeefea10ed8..4a6795ce801 100644
--- a/app-editors/emacs/emacs-28.0.9999.ebuild
+++ b/app-editors/emacs/emacs-28.0.9999.ebuild
@@ -141,9 +141,16 @@ src_prepare() {
                        || die "Upstream version number changed to 
${FULL_VERSION}"
        fi
 
-       # These files ignore LDFLAGS. We assign the variable here, because
-       # for live ebuilds FULL_VERSION doesn't exist in global scope
-       use jit && 
QA_FLAGS_IGNORED="usr/$(get_libdir)/emacs/${FULL_VERSION}/native-lisp/.*"
+       if use jit; then
+               # These files ignore LDFLAGS. We assign the variable here, 
because
+               # for live ebuilds FULL_VERSION doesn't exist in global scope
+               
QA_FLAGS_IGNORED="usr/$(get_libdir)/emacs/${FULL_VERSION}/native-lisp/.*"
+               # gccjit doesn't play well with ccache #801580
+               # For now, work around the problem with an explicit LIBRARY_PATH
+               has ccache ${FEATURES} \
+                       && export LIBRARY_PATH=$("$(tc-getCC)" 
-print-search-dirs \
+                               | sed -n '/^libraries:/{s:^[^/]*::;p}')
+       fi
 
        default
 

Reply via email to