diff --git a/sdk_container/src/third_party/portage-stable/app-arch/lz4/Manifest b/sdk_container/src/third_party/portage-stable/app-arch/lz4/Manifest index dfd1e824e6..91e1cb9c3f 100644 --- a/sdk_container/src/third_party/portage-stable/app-arch/lz4/Manifest +++ b/sdk_container/src/third_party/portage-stable/app-arch/lz4/Manifest @@ -1 +1,2 @@ +DIST lz4-1.10.0.tar.gz 387114 BLAKE2B c87a939b748b0449e4f1869579ebc109704aa89e8699b6029217f6786c351d1b0329580dd3a955fe509efb113f29aecbafc83084d65d153f5d43610f4840a819 SHA512 8c4ceb217e6dc8e7e0beba99adc736aca8963867bcf9f970d621978ba11ce92855912f8b66138037a1d2ae171e8e17beb7be99281fea840106aa60373c455b28 DIST lz4-1.9.4.tar.gz 354063 BLAKE2B 2289cdce36acd35283bf2f02ef4d6d8f4805563be6d5a3492f3d6ea7975fb6bd14e1ac2e505df9747776edf8bcf0da7ba4ae7084b150e3ec08a52a9885f92ad5 SHA512 043a9acb2417624019d73db140d83b80f1d7c43a6fd5be839193d68df8fd0b3f610d7ed4d628c2a9184f7cde9a0fd1ba9d075d8251298e3eb4b3a77f52736684 diff --git a/sdk_container/src/third_party/portage-stable/app-arch/lz4/files/1.10.0-fix-freestanding-test.patch b/sdk_container/src/third_party/portage-stable/app-arch/lz4/files/1.10.0-fix-freestanding-test.patch new file mode 100644 index 0000000000..f8dfe2a41c --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/lz4/files/1.10.0-fix-freestanding-test.patch @@ -0,0 +1,42 @@ + +From: https://github.com/lz4/lz4/pull/1468 + +commit 63267a77d863f63826d8b13ddb8c190d3a4c01c5 +Author: Holger Hoffstätte +Date: Mon Jul 22 22:11:19 2024 +0200 + + Fix stack alignment of _start() in freestanding test + + When the freestanding test is built with any kind of optimization + that enables vectorized loops, special care must be taken to align + the stack for _start() at a 16-byte boundary. + +diff --git a/tests/freestanding.c b/tests/freestanding.c +index 6109aa7..96de9d3 100644 +--- a/tests/freestanding.c ++++ b/tests/freestanding.c +@@ -225,7 +225,7 @@ EXTERN_C int memcmp(const void *s1, const void *s2, size_t n) { + + + // +-EXTERN_C void _start(void) { ++EXTERN_C void __attribute__((force_align_arg_pointer)) _start(void) { + test(); + MY_exit(0); + } + +Disable the stack protector to allow building with clang. +See https://bugs.gentoo.org/936480 + +diff -up lz4-1.10.0/build/meson/meson/tests/meson.build lz4-1.10.0/build/meson/meson/tests/meson.build +--- lz4-1.10.0/build/meson/meson/tests/meson.build 2024-07-21 19:29:49.000000000 +0200 ++++ lz4-1.10.0/build/meson/meson/tests/meson.build 2024-07-23 01:26:40.561113031 +0200 +@@ -47,7 +47,7 @@ test_exes = { + }, + 'freestanding': { + 'sources': files(lz4_source_root / 'tests/freestanding.c'), +- 'c_args': ['-ffreestanding', '-Wno-unused-parameter', '-Wno-declaration-after-statement'], ++ 'c_args': ['-ffreestanding', '-fno-stack-protector', '-Wno-unused-parameter', '-Wno-declaration-after-statement'], + 'link_args': ['-nostdlib'], + 'build': cc.get_id() in ['gcc', 'clang'] and + host_machine.system() == 'linux' and host_machine.cpu_family() == 'x86_64', diff --git a/sdk_container/src/third_party/portage-stable/app-arch/lz4/lz4-1.10.0-r1.ebuild b/sdk_container/src/third_party/portage-stable/app-arch/lz4/lz4-1.10.0-r1.ebuild new file mode 100644 index 0000000000..7cbc02aadc --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/lz4/lz4-1.10.0-r1.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit meson-multilib + +DESCRIPTION="Extremely Fast Compression algorithm" +HOMEPAGE="https://github.com/lz4/lz4" +SRC_URI="https://github.com/lz4/lz4/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD-2 GPL-2" +SLOT="0/1.10.0-meson" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +IUSE="static-libs test" +RESTRICT="!test? ( test )" + +EMESON_SOURCE=${S}/build/meson + +PATCHES=( + "${FILESDIR}/${PV}-fix-freestanding-test.patch" +) + +multilib_src_configure() { + local emesonargs=( + -Dtests=$(usex test true false) + -Ddefault_library=$(usex static-libs both shared) + ) + # with -Dprograms=false, the test suite is only rudimentary, + # so build them for testing non-native ABI as well + if multilib_is_native_abi || use test; then + emesonargs+=( + -Dprograms=true + ) + fi + + meson_src_configure +} diff --git a/sdk_container/src/third_party/portage-stable/app-arch/lz4/lz4-1.10.0.ebuild b/sdk_container/src/third_party/portage-stable/app-arch/lz4/lz4-1.10.0.ebuild new file mode 100644 index 0000000000..325d4225f6 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/lz4/lz4-1.10.0.ebuild @@ -0,0 +1,25 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake-multilib + +DESCRIPTION="Extremely Fast Compression algorithm" +HOMEPAGE="https://github.com/lz4/lz4" +SRC_URI="https://github.com/lz4/lz4/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD-2 GPL-2" +SLOT="0/1.10.0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +IUSE="static-libs" + +CMAKE_USE_DIR=${S}/build/cmake + +multilib_src_configure() { + local mycmakeargs=( + -DBUILD_STATIC_LIBS=$(usex static-libs) + ) + + cmake_src_configure +}