From b3564cd40e6c33304a799fa6c511f452b3997722 Mon Sep 17 00:00:00 2001 From: James Le Cuirot Date: Mon, 18 Aug 2025 23:22:40 +0100 Subject: [PATCH] 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 --- 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 1ba92035c3f81..bd72c554ad3f1 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