From d7449bbbc7e898bc848a447ce14ef9e32199453b Mon Sep 17 00:00:00 2001 From: Nicholas Vinson Date: Mon, 8 Jan 2024 23:42:44 -0500 Subject: [PATCH] media-gfx/sam2p: Fix clang -flto build failure When compiling with clang and ld.lld build fails with the error message: ps_tiny.o: file not recognized: file format not recognized This is because the build system does not properly honor standard buildtime flags and instead requires nonstandard flags be set to get the proper build result. This patch sets the necessary flags to successfully compile with clang and -flto. Signed-off-by: Nicholas Vinson Closes: https://github.com/gentoo/gentoo/pull/34717 Signed-off-by: Sam James --- media-gfx/sam2p/sam2p-0.49.4_p20190718-r1.ebuild | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/media-gfx/sam2p/sam2p-0.49.4_p20190718-r1.ebuild b/media-gfx/sam2p/sam2p-0.49.4_p20190718-r1.ebuild index 2ce3a6e8e0275..fd8877e311dee 100644 --- a/media-gfx/sam2p/sam2p-0.49.4_p20190718-r1.ebuild +++ b/media-gfx/sam2p/sam2p-0.49.4_p20190718-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -48,7 +48,12 @@ src_configure() { } src_compile() { - emake GCC_STRIP= + emake GCC_STRIP= \ + CC="$(tc-getCC)" \ + CXX="$(tc-getCXX)" \ + LD="$(tc-getCC)" \ + LDXX="$(tc-getCXX)" \ + LDY="$(tc-getCC)" } src_install() {