Add more Unix support from Debian Linux packaging
A free file archiver for extremely high compression
Brought to you by:
ipavlov
Hi Igor,
I'm working on Debian Linux to package 7-Zip.
And I adds some patches to build on some old or minor platforms.
I think these patches are also useful for others.
Please apply them.
All our patches are held on our Git at:
https://salsa.debian.org/debian/7zip/-/tree/master/debian/patches
about
C/7zCrc.c
The main idea in that 7-zip's code was that we compile whole code with low
__ARM_ARCH
, and use__target__("arch=armv8-a+crc")
for some functions.Then we detect CRC feature via hwcap at runtime.
So we can get single binary that will work on old and new processors, And it will use hardware CRC of new processors.
We want to get single executable that links to special "new-ISA" functions at runtime.
OK, so patch 0012 must be a Debian specific one.
You can drop this patch.
I will try to make more better fix in next time.
Hi Igor,
Thanks to appling my patch.
I make some fixup patch to 7-Zip 21.04.
Please apply it.
why we can't use
getauxval(AT_HWCAP)
?Hi Igor,
Because source code stability is more important for minor platforms like kFreeBSD.
AT_HWCAP
/AT_HWCAP2
values are comes from glibc source code.https://sourceware.org/git/?p=glibc.git;a=blob;f=elf/elf.h;h=50f87bacebe3736af8c24b928e85c26dc72b449c;hb=HEAD#l1183
https://sourceware.org/git/?p=glibc.git;a=blob;f=elf/elf.h;h=50f87bacebe3736af8c24b928e85c26dc72b449c;hb=HEAD#l1205
But such wired hack often loses source code stability.
If 7-Zip works without my
AT_HWCAP
hack for kFreeBSD, there is no need to useAT_HWCAP
.So I revert my
AT_HWCAP
patch.glibc deverolppers also discussions about similar issue .