diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/flex/files/flex-2.6.4-fix-malloc-prototype.patch b/sdk_container/src/third_party/portage-stable/sys-devel/flex/files/flex-2.6.4-fix-malloc-prototype.patch new file mode 100644 index 0000000000..9ded7cd40e --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-devel/flex/files/flex-2.6.4-fix-malloc-prototype.patch @@ -0,0 +1,26 @@ +Bug: https://bugs.gentoo.org/956581 +https://github.com/westes/flex/pull/674 +https://github.com/westes/flex/commit/4b142954b54a57a9b0af0a9661056a9c39a8fa95 + +From bf254c75b1e0d2641ebbd7fc85fb183f36a62ea7 Mon Sep 17 00:00:00 2001 +From: Richard Barnes +Date: Wed, 2 Oct 2024 10:35:09 -0700 +Subject: [PATCH] Match `malloc` signature to its use + +--- + lib/malloc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/malloc.c b/lib/malloc.c +index 75e8ef97c..701b9b39d 100755 +--- a/lib/malloc.c ++++ b/lib/malloc.c +@@ -3,7 +3,7 @@ + + #include + +- void *malloc (); ++ void *malloc (size_t n); + + /* Allocate an N-byte block of memory from the heap. + If N is zero, allocate a 1-byte block. */ diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/flex/flex-2.6.4-r6.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/flex/flex-2.6.4-r6.ebuild index 41845f105a..3a5e1b6a64 100644 --- a/sdk_container/src/third_party/portage-stable/sys-devel/flex/flex-2.6.4-r6.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-devel/flex/flex-2.6.4-r6.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -inherit flag-o-matic libtool multilib-minimal toolchain-funcs +inherit dot-a flag-o-matic libtool multilib-minimal toolchain-funcs DESCRIPTION="The Fast Lexical Analyzer" HOMEPAGE="https://github.com/westes/flex" @@ -29,6 +29,7 @@ PATCHES=( "${FILESDIR}"/${P}-libobjdir.patch "${FILESDIR}"/${P}-fix-build-with-glibc2.26.patch "${FILESDIR}"/${P}-fix-apple-m1-crash-by-explicit-pointer-cast.patch + "${FILESDIR}"/${P}-fix-malloc-prototype.patch "${WORKDIR}"/${P}-autotools-regenerate.patch ) @@ -53,7 +54,7 @@ src_prepare() { src_configure() { use static && append-ldflags -static - + lto-guarantee-fat multilib-minimal_src_configure } @@ -86,6 +87,7 @@ multilib_src_install() { } multilib_src_install_all() { + strip-lto-bytecode einstalldocs dodoc ONEWS find "${ED}" -name '*.la' -type f -delete || die