summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-office/libreoffice/libreoffice-9999.ebuild')
-rw-r--r--app-office/libreoffice/libreoffice-9999.ebuild26
1 files changed, 10 insertions, 16 deletions
diff --git a/app-office/libreoffice/libreoffice-9999.ebuild b/app-office/libreoffice/libreoffice-9999.ebuild
index 0bc93233961b..67ba6c45bbef 100644
--- a/app-office/libreoffice/libreoffice-9999.ebuild
+++ b/app-office/libreoffice/libreoffice-9999.ebuild
@@ -389,41 +389,35 @@ src_configure() {
local google_default_client_secret="vgKG0NNv7GoDpbtoFNLxCUXu"
# Show flags set at the beginning
- einfo "Current CFLAGS: ${CFLAGS}"
- einfo "Current LDFLAGS: ${LDFLAGS}"
+ einfo "Preset CFLAGS: ${CFLAGS}"
+ einfo "Preset LDFLAGS: ${LDFLAGS}"
- local have_switched_compiler=
- if use clang && ! tc-is-clang ; then
+ if use clang ; then
# Force clang
einfo "Enforcing the use of clang due to USE=clang ..."
- have_switched_compiler=yes
AR=llvm-ar
CC=${CHOST}-clang
CXX=${CHOST}-clang++
NM=llvm-nm
RANLIB=llvm-ranlib
- elif ! use clang && ! tc-is-gcc ; then
+ LDFLAGS+=" -fuse-ld=lld"
+ strip-unsupported-flags
+ else
# Force gcc
- have_switched_compiler=yes
einfo "Enforcing the use of gcc due to USE=-clang ..."
AR=gcc-ar
CC=${CHOST}-gcc
CXX=${CHOST}-g++
NM=gcc-nm
RANLIB=gcc-ranlib
+ strip-unsupported-flags
fi
export LO_CLANG_CC=${CC}
export LO_CLANG_CXX=${CXX}
- if [[ -n "${have_switched_compiler}" ]] ; then
- # Because we switched active compiler we have to ensure
- # that no unsupported flags are set
- strip-unsupported-flags
- fi
-
- # Show flags set at the beginning
- einfo " Used CFLAGS: ${CFLAGS}"
- einfo " Used LDFLAGS: ${LDFLAGS}"
+ # Show flags set at the end
+ einfo " Used CFLAGS: ${CFLAGS}"
+ einfo " Used LDFLAGS: ${LDFLAGS}"
# Ensure we use correct toolchain
tc-export CC CXX LD AR NM OBJDUMP RANLIB PKG_CONFIG