summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYiyang Wu <xgreenlandforwyy@gmail.com>2021-03-02 22:58:28 +0800
committerZac Medico <zmedico@gentoo.org>2021-03-06 00:55:50 -0800
commitc10d98823936063e535edf7e28534314bb22a083 (patch)
tree1b1415f9652d53c0541ba5ce7ec87ea5eccf9ec7 /dev-util/bazel
parentmedia-libs/libsdl: multiple CVEs v1.2.15_p20210224 (diff)
downloadgentoo-c10d98823936063e535edf7e28534314bb22a083.tar.gz
gentoo-c10d98823936063e535edf7e28534314bb22a083.tar.bz2
gentoo-c10d98823936063e535edf7e28534314bb22a083.zip
dev-util/bazel: enable statically linked libstdc++ for gentoo prefix
Bug: https://bugs.gentoo.org/773982 Package-Manager: Portage-3.0.16, Repoman-3.0.2 Signed-off-by: Yiyang Wu <xgreenlandforwyy@gmail.com> Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'dev-util/bazel')
-rw-r--r--dev-util/bazel/bazel-3.2.0.ebuild8
1 files changed, 6 insertions, 2 deletions
diff --git a/dev-util/bazel/bazel-3.2.0.ebuild b/dev-util/bazel/bazel-3.2.0.ebuild
index 8963929994e..ac040b43670 100644
--- a/dev-util/bazel/bazel-3.2.0.ebuild
+++ b/dev-util/bazel/bazel-3.2.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -13,7 +13,8 @@ SRC_URI="https://github.com/bazelbuild/bazel/releases/download/${PV}/${P}-dist.z
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64"
-IUSE="examples tools"
+IUSE="examples tools prefix static-libs"
+REQUIRED_USE="prefix? ( static-libs )"
# strip corrupts the bazel binary
# test fails with network-sandbox: An error occurred during the fetch of repository 'io_bazel_skydoc' (bug 690794)
RESTRICT="strip test"
@@ -67,6 +68,9 @@ src_prepare() {
src_compile() {
export EXTRA_BAZEL_ARGS="--jobs=$(makeopts_jobs) $(bazel-get-flags) --host_javabase=@local_jdk//:jdk"
+ if use static-libs; then
+ export BAZEL_LINKOPTS=-static-libs:-static-libgcc BAZEL_LINKLIBS=-l%:libstdc++.a:-lm
+ fi
VERBOSE=yes ./compile.sh || die
./scripts/generate_bash_completion.sh \