diff options
author | Piotr Kubaj <pkubaj@FreeBSD.org> | 2021-02-23 19:02:21 +0800 |
---|---|---|
committer | Piotr Kubaj <pkubaj@FreeBSD.org> | 2021-02-23 19:02:21 +0800 |
commit | 0ec495e9a8c7ad16727e5ef4bb77d805e6d5f501 (patch) | |
tree | 0605daddaea5789d20821630917a47fa83adb254 /editors | |
parent | 7940d0a475720c38a6345ab07504cadca19c1f61 (diff) | |
download | freebsd-ports-gnome-0ec495e9a8c7ad16727e5ef4bb77d805e6d5f501.tar.gz freebsd-ports-gnome-0ec495e9a8c7ad16727e5ef4bb77d805e6d5f501.tar.zst freebsd-ports-gnome-0ec495e9a8c7ad16727e5ef4bb77d805e6d5f501.zip |
editors/libreoffice: add LTO option
LLD fails to link libreoffice, so ld.bfd needs to be used. Since LLVMgold.so (used for LTO with binutils) is not included in base, LLVM from ports needs to be used.
PR: 253777
Approved by: fluffy (maintainer)
Diffstat (limited to 'editors')
-rw-r--r-- | editors/libreoffice/Makefile | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/editors/libreoffice/Makefile b/editors/libreoffice/Makefile index 3712209346c9..bca8c4763d0c 100644 --- a/editors/libreoffice/Makefile +++ b/editors/libreoffice/Makefile @@ -117,7 +117,7 @@ USE_OPENLDAP= yes USE_PERL5= build USE_XORG= ice sm x11 xaw xcb xext xinerama xrandr xrender -OPTIONS_DEFINE= COINMP CUPS DOCS GNOME GTK3 JAVA KF5 MMEDIA PGSQL QT5 SDK TEST WEBDAV +OPTIONS_DEFINE= COINMP CUPS DOCS GNOME GTK3 JAVA KF5 LTO MMEDIA PGSQL QT5 SDK TEST WEBDAV OPTIONS_DEFAULT= CUPS MMEDIA QT5 .if !defined(DEFAULT_VERSIONS) || ! ${DEFAULT_VERSIONS:Mssl=*} @@ -200,6 +200,8 @@ KF5_USE= kde=config,coreaddons,i18n,kio,windowsystem KF5_USES= kde:5 KF5_IMPLIES= QT5 +LTO_CONFIGURE_ENABLE= lto + MMEDIA_CONFIGURE_ENABLE= gstreamer-1-0 MMEDIA_USE= GSTREAMER1=yes @@ -287,6 +289,14 @@ EXTRA_PATCHES+= ${FILESDIR}/powerpc64 CONFIGURE_ARGS+= --disable-skia .endif +.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 + .if ${CHOSEN_COMPILER_TYPE} == clang CXXFLAGS_WARN= -Woverloaded-virtual -Wno-unused-parameter -Wno-unused-local-typedefs .else |