summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-05-31 15:28:06 +0100
committerSam James <sam@gentoo.org>2024-05-31 15:28:06 +0100
commit6fcd44ef37805c5c43770ca0f207d8a0bd99cb75 (patch)
tree010137c4f7ca5b50828f50b3629dc1055568bff4 /app-arch
parentapp-arch/xz-utils: fix PGO with USE=-extra-filters (diff)
downloadgentoo-6fcd44ef37805c5c43770ca0f207d8a0bd99cb75.tar.gz
gentoo-6fcd44ef37805c5c43770ca0f207d8a0bd99cb75.tar.bz2
gentoo-6fcd44ef37805c5c43770ca0f207d8a0bd99cb75.zip
app-arch/xz-utils: fix PGO with libarchive tar
Closes: https://bugs.gentoo.org/933200 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-arch')
-rw-r--r--app-arch/xz-utils/xz-utils-5.6.2.ebuild9
-rw-r--r--app-arch/xz-utils/xz-utils-9999.ebuild9
2 files changed, 14 insertions, 4 deletions
diff --git a/app-arch/xz-utils/xz-utils-5.6.2.ebuild b/app-arch/xz-utils/xz-utils-5.6.2.ebuild
index 43e7da134e9a..687084d7fdae 100644
--- a/app-arch/xz-utils/xz-utils-5.6.2.ebuild
+++ b/app-arch/xz-utils/xz-utils-5.6.2.ebuild
@@ -116,17 +116,22 @@ multilib_src_compile() {
if use pgo ; then
emake CFLAGS="${CFLAGS} ${pgo_generate_flags}" -k check
+ local tar_pgo_args=(
+ --mtime=@2718281828
+ )
+ has_version "app-alternatives/tar[gnu]" && tar_pgo_args+=( --sort=name )
+
if multilib_is_native_abi ; then
(
shopt -s globstar
tar \
- --sort=name --mtime=@2718281828 \
+ "${tar_pgo_args[@]}" \
-cf xz-pgo-test-01.tar \
{"${S}","${BUILD_DIR}"}/**/*.[cho] \
{"${S}","${BUILD_DIR}"}/**/*.so* \
{"${S}","${BUILD_DIR}"}/**/**.txt \
- {"${S}","${BUILD_DIR}"}/tests/files \
+ {"${S}","${BUILD_DIR}"}/tests/files
stat --printf="xz-pgo-test-01.tar.tar size: %s\n" xz-pgo-test-01.tar
md5sum xz-pgo-test-01.tar
diff --git a/app-arch/xz-utils/xz-utils-9999.ebuild b/app-arch/xz-utils/xz-utils-9999.ebuild
index 43e7da134e9a..687084d7fdae 100644
--- a/app-arch/xz-utils/xz-utils-9999.ebuild
+++ b/app-arch/xz-utils/xz-utils-9999.ebuild
@@ -116,17 +116,22 @@ multilib_src_compile() {
if use pgo ; then
emake CFLAGS="${CFLAGS} ${pgo_generate_flags}" -k check
+ local tar_pgo_args=(
+ --mtime=@2718281828
+ )
+ has_version "app-alternatives/tar[gnu]" && tar_pgo_args+=( --sort=name )
+
if multilib_is_native_abi ; then
(
shopt -s globstar
tar \
- --sort=name --mtime=@2718281828 \
+ "${tar_pgo_args[@]}" \
-cf xz-pgo-test-01.tar \
{"${S}","${BUILD_DIR}"}/**/*.[cho] \
{"${S}","${BUILD_DIR}"}/**/*.so* \
{"${S}","${BUILD_DIR}"}/**/**.txt \
- {"${S}","${BUILD_DIR}"}/tests/files \
+ {"${S}","${BUILD_DIR}"}/tests/files
stat --printf="xz-pgo-test-01.tar.tar size: %s\n" xz-pgo-test-01.tar
md5sum xz-pgo-test-01.tar