[Bug 263976] editors/libreoffice: Fails to build using llvm/clang14 on recent src main

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 22 May 2022 19:19:11 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=263976

Mark Millard <marklmi26-fbsd@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fluffy@FreeBSD.org

--- Comment #8 from Mark Millard <marklmi26-fbsd@yahoo.com> ---
(In reply to Tomoaki AOKI from comment #7)

Your use of:

OPTIONS_FILE_SET+=LTO

causes:

.if ${PORT_OPTIONS:MLTO} && ${CHOSEN_COMPILER_TYPE} == clang
CPP=    ${LOCALBASE}/bin/clang-cpp${LLVM_DEFAULT}
CC=     ${LOCALBASE}/bin/clang${LLVM_DEFAULT}
CXX=    ${LOCALBASE}/bin/clang++${LLVM_DEFAULT}
BUILD_DEPENDS+= ${LOCALBASE}/bin/clang${LLVM_DEFAULT}:devel/llvm${LLVM_DEFAULT}
LLD_UNSAFE=     yes
.endif

to be used. But if you do not use LTO that code is not
used and the system toolchain is used.

Going back to the use of LTO case to provide more
description of it . . .

LTO use in turn causes use of ${LLVM_DEFAULT} in the
places shown above. It no longer uses the system toolchain
but instead uses devel/llvm${LLVM_DEFAULT} .

If you leave LLVM_DEFAULT at its default you get devel/llvm90
as the toolchain. If you assign a different default, you get
what you assign, such as when you assigned 13 and got
devel/llvm13 .

If you want devel/llvm14 to be used, one way is to use:

if ${.CURDIR:M/usr/ports/editors/libreoffice}
DEFAULT_VERSIONS+=      llvm=14
.endif

in your /etc/make.conf file. If you do this, it seems
unlikely that you would get the same failure that you get
with devel/llvm90 in use. If it is really different, that
would make the subject line for this bugzilla report
incorrect/misleading.

-- 
You are receiving this mail because:
You are the assignee for the bug.