commit:     b3564cd40e6c33304a799fa6c511f452b3997722
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 18 22:22:40 2025 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Mon Aug 18 22:22:40 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b3564cd4

dev-libs/xxhash: Fix cross-compiling by always setting CC

Otherwise a rebuild occurs in src_install with the wrong compiler.

Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 dev-libs/xxhash/xxhash-0.8.3.ebuild | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/dev-libs/xxhash/xxhash-0.8.3.ebuild 
b/dev-libs/xxhash/xxhash-0.8.3.ebuild
index 1ba92035c3f8..bd72c554ad3f 100644
--- a/dev-libs/xxhash/xxhash-0.8.3.ebuild
+++ b/dev-libs/xxhash/xxhash-0.8.3.ebuild
@@ -27,13 +27,20 @@ src_configure() {
        multilib-minimal_src_configure
 }
 
+myemake() {
+       emake \
+               AR="$(tc-getAR)" \
+               CC="$(tc-getCC)" \
+               "${@}"
+}
+
 multilib_src_compile() {
-       emake AR="$(tc-getAR)" CC="$(tc-getCC)"
+       myemake
 }
 
 multilib_src_test() {
        # Injecting CPPFLAGS into CFLAGS is needed for test_sanity
-       emake CC="$(tc-getCC)" CFLAGS="${CPPFLAGS} ${CFLAGS}" check
+       myemake CFLAGS="${CPPFLAGS} ${CFLAGS}" check
 }
 
 multilib_src_install() {
@@ -43,7 +50,7 @@ multilib_src_install() {
                LIBDIR="${EPREFIX}"/usr/$(get_libdir)
        )
 
-       emake "${emakeargs[@]}" install
+       myemake "${emakeargs[@]}" install
        einstalldocs
 
        rm "${ED}"/usr/$(get_libdir)/libxxhash.a || die

Reply via email to