summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas K. Hüttel <dilfridge@gentoo.org>2020-11-22 01:24:25 +0200
committerAndreas K. Hüttel <dilfridge@gentoo.org>2020-11-22 01:27:36 +0200
commitf9e9a8666cd4b64a01bf3f6dcf585e8c4e1dec14 (patch)
treefc4ce03a7d02cfe430156412ba2ffce464b0bd64 /app-office/libreoffice
parentmedia-video/shotcut: Keep suppressing bogus warning (diff)
downloadgentoo-f9e9a8666cd4b64a01bf3f6dcf585e8c4e1dec14.tar.gz
gentoo-f9e9a8666cd4b64a01bf3f6dcf585e8c4e1dec14.tar.bz2
gentoo-f9e9a8666cd4b64a01bf3f6dcf585e8c4e1dec14.zip
app-office/libreoffice: Brute-force compiler settings (clang/gcc)
Bug: https://bugs.gentoo.org/739134 Package-Manager: Portage-3.0.9, Repoman-3.0.2 Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
Diffstat (limited to 'app-office/libreoffice')
-rw-r--r--app-office/libreoffice/libreoffice-7.0.3.1.ebuild26
-rw-r--r--app-office/libreoffice/libreoffice-7.0.9999.ebuild26
-rw-r--r--app-office/libreoffice/libreoffice-9999.ebuild26
3 files changed, 30 insertions, 48 deletions
diff --git a/app-office/libreoffice/libreoffice-7.0.3.1.ebuild b/app-office/libreoffice/libreoffice-7.0.3.1.ebuild
index 695c9c5f0f69..e561517b8f53 100644
--- a/app-office/libreoffice/libreoffice-7.0.3.1.ebuild
+++ b/app-office/libreoffice/libreoffice-7.0.3.1.ebuild
@@ -393,41 +393,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 CLANG_CC=${CC}
export 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
diff --git a/app-office/libreoffice/libreoffice-7.0.9999.ebuild b/app-office/libreoffice/libreoffice-7.0.9999.ebuild
index b10bdb491e5c..223d653facc3 100644
--- a/app-office/libreoffice/libreoffice-7.0.9999.ebuild
+++ b/app-office/libreoffice/libreoffice-7.0.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 CLANG_CC=${CC}
export 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
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