Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: OpenMandrivaAssociation/zstd
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4f70a5b346e2c452d9e3827ba5c8b45977197b80
Choose a base ref
...
head repository: OpenMandrivaAssociation/zstd
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 97524bdb193e48d5b24e0d67443334a5649e01eb
Choose a head ref
  • 7 commits
  • 2 files changed
  • 2 contributors

Commits on Sep 1, 2022

  1. clang 15 fixes

    berolinux committed Sep 1, 2022
    Copy the full SHA
    2379ab4 View commit details

Commits on Sep 10, 2022

  1. enable compile with LLVM/polly

    tpgxyz committed Sep 10, 2022

    Unverified

    This user has not yet uploaded their public signing key.
    Copy the full SHA
    a54378a View commit details

Commits on Nov 17, 2022

  1. update LLVM/polly flags

    tpgxyz committed Nov 17, 2022
    Copy the full SHA
    178c2cb View commit details

Commits on Feb 10, 2023

  1. new version 1.5.4

    tpgxyz committed Feb 10, 2023
    Copy the full SHA
    2ff9505 View commit details
  2. Copy the full SHA
    ae65936 View commit details

Commits on Feb 15, 2023

  1. correct PGO

    tpgxyz committed Feb 15, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    3466e9f View commit details

Commits on Feb 20, 2023

  1. Copy the full SHA
    97524bd View commit details
Showing with 41 additions and 11 deletions.
  1. +1 −1 .abf.yml
  2. +40 −10 zstd.spec
2 changes: 1 addition & 1 deletion .abf.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
sources:
zstd-1.5.2.tar.gz: 8ddf671abb68fd7ed2c655e84753c0e899477455
zstd-1.5.4.tar.gz: 128aa7c9305b8d13b1ba8a88766492a779cebe40
50 changes: 40 additions & 10 deletions zstd.spec
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# (tpg) reduce bloat by excluding cmake requires on devel packages
%global __requires_exclude ^cmake.*$

# zstd is used by mesa, mesa is used by wine
%ifarch %{x86_64}
%bcond_without compat32
@@ -19,12 +16,15 @@

%global optflags %{optflags} -O3

# (tpg) use LLVM/polly for polyhedra optimization and automatic vector code generation
%define pollyflags -mllvm -polly -mllvm -polly-position=early -mllvm -polly-parallel=true -fopenmp -fopenmp-version=50 -mllvm -polly-dependences-computeout=5000000 -mllvm -polly-detect-profitability-min-per-loop-insts=40 -mllvm -polly-tiling=true -mllvm -polly-prevect-width=256 -mllvm -polly-vectorizer=stripmine -mllvm -polly-omp-backend=LLVM -mllvm -polly-num-threads=0 -mllvm -polly-scheduling=dynamic -mllvm -polly-scheduling-chunksize=1 -mllvm -polly-invariant-load-hoisting -mllvm -polly-loopfusion-greedy -mllvm -polly-run-inliner -mllvm -polly-run-dce -mllvm -polly-enable-delicm=true -mllvm -extra-vectorizer-passes -mllvm -enable-cond-stores-vec -mllvm -slp-vectorize-hor-store -mllvm -enable-loopinterchange -mllvm -enable-loop-distribute -mllvm -enable-unroll-and-jam -mllvm -enable-loop-flatten -mllvm -interleave-small-loop-scalar-reduction -mllvm -unroll-runtime-multi-exit -mllvm -aggressive-ext-opt

# (tpg) enable PGO build
%bcond_without pgo

Summary: Extremely powerful file compression utility
Name: zstd
Version: 1.5.2
Version: 1.5.4
Release: 2
License: BSD
Group: Archiving/Compression
@@ -128,9 +128,9 @@ cd ../..

%if %{with pgo}
cd build/cmake
CFLAGS="%{optflags} -fprofile-generate" \
CXXFLAGS="%{optflags} -fprofile-generate" \
LDFLAGS="%{build_ldflags} -fprofile-generate" \
CFLAGS="%{optflags} -fprofile-generate -mllvm -vp-counters-per-site=100 %{pollyflags}" \
CXXFLAGS="%{optflags} -fprofile-generate -mllvm -vp-counters-per-site=100 %{pollyflags}" \
LDFLAGS="%{build_ldflags} -fprofile-generate -mllvm -vp-counters-per-site=100" \
%cmake \
-DZSTD_BUILD_CONTRIB:BOOL=ON \
-DZSTD_LEGACY_SUPPORT:BOOL=ON \
@@ -170,9 +170,9 @@ PROFDATA="$(realpath %{name}-llvm.profdata)"
rm -f *.profile.d
rm -rf build

CFLAGS="%{optflags} -fprofile-use=$PROFDATA" \
CXXFLAGS="%{optflags} -fprofile-instr-use=$PROFDATA" \
LDFLAGS="%{build_ldflags} -fprofile-instr-use=$PROFDATA" \
CFLAGS="%{optflags} -fprofile-use=$PROFDATA %{pollyflags}" \
CXXFLAGS="%{optflags} -fprofile-use=$PROFDATA %{pollyflags}" \
LDFLAGS="%{build_ldflags} -fprofile-use=$PROFDATA" \
%else
cd build/cmake
%endif
@@ -196,6 +196,36 @@ cd build/cmake
%ninja_install -C build
install -m 755 build/contrib/pzstd/pzstd %{buildroot}%{_bindir}/

# (tpg) strip LTO from "LLVM IR bitcode" files
check_convert_bitcode() {
printf '%s\n' "Checking for LLVM IR bitcode"
llvm_file_name=$(realpath ${1})
llvm_file_type=$(file ${llvm_file_name})

if printf '%s\n' "${llvm_file_type}" | grep -q "LLVM IR bitcode"; then
# recompile without LTO
clang %{optflags} -fno-lto -Wno-unused-command-line-argument -x ir ${llvm_file_name} -c -o ${llvm_file_name}
elif printf '%s\n' "${llvm_file_type}" | grep -q "current ar archive"; then
printf '%s\n' "Unpacking ar archive ${llvm_file_name} to check for LLVM bitcode components."
# create archive stage for objects
archive_stage=$(mktemp -d)
archive=${llvm_file_name}
cd ${archive_stage}
ar x ${archive}
for archived_file in $(find -not -type d); do
check_convert_bitcode ${archived_file}
printf '%s\n' "Repacking ${archived_file} into ${archive}."
ar r ${archive} ${archived_file}
done
ranlib ${archive}
cd ..
fi
}

for i in $(find %{buildroot} -type f -name "*.[ao]"); do
check_convert_bitcode ${i}
done

%files
%{_bindir}/*
%doc %{_mandir}/man1/*