From ed84ccc48fc5689332508e768b6b8473f451d553 Mon Sep 17 00:00:00 2001 From: Piotr Kubaj Date: Tue, 23 Feb 2021 09:35:49 +0000 Subject: [PATCH] multimedia/ffmpeg: use clang from ports with bfd on powerpc64 with LTO option Turns out that clang can build proper binaries when using LTO, if bfd is used instead of lld. LLVM from ports is necessary because LLVMgold.so is not present in base. Approved by: tier 2 blanket --- multimedia/ffmpeg/Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/multimedia/ffmpeg/Makefile b/multimedia/ffmpeg/Makefile index 786cc24ebafe..6bcf4c779148 100644 --- a/multimedia/ffmpeg/Makefile +++ b/multimedia/ffmpeg/Makefile @@ -626,10 +626,13 @@ DOC_FILES= Changelog CREDITS INSTALL.md LICENSE.md MAINTAINERS \ DOC_DOCFILES= APIchanges *.txt PORTDOCS= * -.include +.include -.if ${ARCH} == powerpc64 && ${PORT_OPTIONS:MLTO} -USE_GCC= yes +.if ${ARCH} == powerpc64 && ${PORT_OPTIONS:MLTO} && ${CHOSEN_COMPILER_TYPE} == clang +CPP= ${LOCALBASE}/bin/clang-cpp${LLVM_DEFAULT} +CC= ${LOCALBASE}/bin/clang${LLVM_DEFAULT} +BUILD_DEPENDS+= ${LOCALBASE}/bin/clang${LLVM_DEFAULT}:devel/llvm${LLVM_DEFAULT} +LLD_UNSAFE= yes .endif post-install: @@ -638,4 +641,4 @@ post-install: (cd ${WRKSRC}/doc && ${COPYTREE_SHARE} \ "${DOC_DOCFILES}" ${STAGEDIR}${DOCSDIR}) -.include +.include