commit: 20eaafa4033bfaeab15a5952bec5839e7f8684ea Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Mon Dec 23 05:05:55 2024 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Mon Dec 23 05:05:55 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=20eaafa4
dev-libs/protobuf-c: fix tests with GCC 15 GCC 15 makes a change to union initialisation and exposes a bug in protobuf-c. Build with the new -fzero-init-padding-bits=unions flag if supported to fix the testsuite until the upstream bug is fixed. Note that the upstream bug has not yet been reported so keeping the Gentoo bug open. Bug: https://bugs.gentoo.org/946366 Signed-off-by: Sam James <sam <AT> gentoo.org> ...{protobuf-c-1.4.1-r1.ebuild => protobuf-c-1.4.1-r2.ebuild} | 11 +++++++++-- ...{protobuf-c-1.5.0-r2.ebuild => protobuf-c-1.5.0-r3.ebuild} | 9 ++++++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/dev-libs/protobuf-c/protobuf-c-1.4.1-r1.ebuild b/dev-libs/protobuf-c/protobuf-c-1.4.1-r2.ebuild similarity index 82% rename from dev-libs/protobuf-c/protobuf-c-1.4.1-r1.ebuild rename to dev-libs/protobuf-c/protobuf-c-1.4.1-r2.ebuild index f19d1016e21e..9807ffedacc5 100644 --- a/dev-libs/protobuf-c/protobuf-c-1.4.1-r1.ebuild +++ b/dev-libs/protobuf-c/protobuf-c-1.4.1-r2.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -inherit autotools multilib-minimal +inherit autotools flag-o-matic multilib-minimal MY_PV="${PV/_/-}" MY_P="${PN}-${MY_PV}" @@ -42,6 +42,13 @@ src_prepare() { eautoreconf } +src_configure() { + # Workaround for bug #946366 + append-flags $(test-flags-CC -fzero-init-padding-bits=unions) + + multilib-minimal_src_configure +} + multilib_src_configure() { local myeconfargs=( $(use_enable static-libs static) diff --git a/dev-libs/protobuf-c/protobuf-c-1.5.0-r2.ebuild b/dev-libs/protobuf-c/protobuf-c-1.5.0-r3.ebuild similarity index 85% rename from dev-libs/protobuf-c/protobuf-c-1.5.0-r2.ebuild rename to dev-libs/protobuf-c/protobuf-c-1.5.0-r3.ebuild index 5633caaa249d..c37c0de027c7 100644 --- a/dev-libs/protobuf-c/protobuf-c-1.5.0-r2.ebuild +++ b/dev-libs/protobuf-c/protobuf-c-1.5.0-r3.ebuild @@ -3,7 +3,7 @@ EAPI=8 -inherit autotools multilib-minimal +inherit autotools flag-o-matic multilib-minimal MY_PV="${PV/_/-}" MY_P="${PN}-${MY_PV}" @@ -41,6 +41,13 @@ src_prepare() { eautoreconf } +src_configure() { + # Workaround for bug #946366 + append-flags $(test-flags-CC -fzero-init-padding-bits=unions) + + multilib-minimal_src_configure +} + multilib_src_configure() { local myeconfargs=( $(use_enable static-libs static)
