From 948ec1f10e9cfe0dce398af042f4bbad7549dc5d Mon Sep 17 00:00:00 2001 From: Nicolas PARLANT Date: Mon, 22 Jun 2026 12:35:49 +0200 Subject: [PATCH] net-mail/dovecot: override runtime_checks for cross-compiling Signed-off-by: Nicolas PARLANT Part-of: https://codeberg.org/gentoo/gentoo/pulls/1219 Merges: https://codeberg.org/gentoo/gentoo/pulls/1219 Signed-off-by: Sam James --- net-mail/dovecot/dovecot-2.4.4-r1.ebuild | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/net-mail/dovecot/dovecot-2.4.4-r1.ebuild b/net-mail/dovecot/dovecot-2.4.4-r1.ebuild index 75154b916df96..d6ce3284a2dcc 100644 --- a/net-mail/dovecot/dovecot-2.4.4-r1.ebuild +++ b/net-mail/dovecot/dovecot-2.4.4-r1.ebuild @@ -147,6 +147,20 @@ src_prepare() { src_configure() { use static-libs && lto-guarantee-fat + if tc-is-cross-compiler; then + # runtime checks cannot be executed on the host + # m4/gmtime_max.m4: 40 or 31 bits + local maxtime=31 + tc-has-64bit-time_t && maxtime=40 + export i_cv_gmtime_max_time_t=${maxtime} + export i_cv_epoll_works=yes + export i_cv_fd_passing=yes + export i_cv_mmap_plays_with_write=yes + export i_cv_posix_fallocate_works=yes + export lib_cv_va_copy=yes + export lib_cv___va_copy=no + fi + # --disable-hardening because our toolchain already defaults to # these bits on, and it actually regresses the default _FORTIFY_SOURCE # level for hardened at least from 3 to 2.