commit:     d7449bbbc7e898bc848a447ce14ef9e32199453b
Author:     Nicholas Vinson <nvinson234 <AT> gmail <DOT> com>
AuthorDate: Tue Jan  9 04:42:44 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jan  9 07:29:04 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d7449bbb

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 <nvinson234 <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/34717
Signed-off-by: Sam James <sam <AT> gentoo.org>

 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 2ce3a6e8e027..fd8877e311de 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() {

Reply via email to