commit: e05b37859baea238fd59b9a686b5891b76346686
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 12 23:07:15 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jul 12 23:07:15 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e05b3785
dev-libs/botan: handle -fsanitize={address,undefined}
See https://github.com/randombit/botan/issues/3623#issuecomment-1632453228. We
need
to handle -fsanitize=address and -fsanitize=undefined and pass them through
with the special build system options rather than passing them in raw.
Signed-off-by: Sam James <sam <AT> gentoo.org>
dev-libs/botan/botan-3.1.0.ebuild | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/dev-libs/botan/botan-3.1.0.ebuild
b/dev-libs/botan/botan-3.1.0.ebuild
index 556004d6c660..6cbda3afca02 100644
--- a/dev-libs/botan/botan-3.1.0.ebuild
+++ b/dev-libs/botan/botan-3.1.0.ebuild
@@ -5,7 +5,7 @@ EAPI=8
PYTHON_COMPAT=( python3_{10..12} )
VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/botan.asc
-inherit edo multiprocessing python-r1 toolchain-funcs verify-sig
+inherit edo flag-o-matic multiprocessing python-r1 toolchain-funcs verify-sig
MY_P="Botan-${PV}"
DESCRIPTION="C++ crypto library"
@@ -62,6 +62,7 @@ python_check_deps() {
}
src_configure() {
+ tc-export AR CC CXX
python_setup
local disable_modules=(
@@ -167,7 +168,17 @@ src_configure() {
)
fi
- tc-export AR CC CXX
+ local sanitizers=()
+ if is-flagq -fsanitize=address ; then
+ sanitizers+=( address )
+ fi
+ if is-flagq -fsanitize=undefined ; then
+ sanitizers+=( undefined )
+ fi
+ filter-flags '-fsanitize=*'
+ myargs+=(
+ --enable-sanitizers=$(IFS=","; echo "${sanitizers[*]}")
+ )
edo ${EPYTHON} configure.py --verbose "${myargs[@]}"
}