summaryrefslogtreecommitdiff
path: root/app-arch/7-zip
diff options
context:
space:
mode:
authorAlex Xu (Hello71) <alex_y_xu@yahoo.ca>2022-05-13 12:33:42 -0400
committerAlex Xu (Hello71) <alex_y_xu@yahoo.ca>2022-05-13 12:33:42 -0400
commit01f6be8b095b41db30dc17c730aec05144226988 (patch)
treea8635e44a05aae02d137a863a1af26d61feb8524 /app-arch/7-zip
parent5a8064d458796013279d9c0e925441b73e916b69 (diff)
downloadgentoo-overlay-01f6be8b095b41db30dc17c730aec05144226988.tar.xz
gentoo-overlay-01f6be8b095b41db30dc17c730aec05144226988.zip
app-arch/7-zip: fix aes asm, add -fno-strict-aliasing
Diffstat (limited to 'app-arch/7-zip')
-rw-r--r--app-arch/7-zip/7-zip-21.07-r2.ebuild (renamed from app-arch/7-zip/7-zip-21.07-r1.ebuild)9
-rw-r--r--app-arch/7-zip/files/7-zip-less-asm.patch41
2 files changed, 47 insertions, 3 deletions
diff --git a/app-arch/7-zip/7-zip-21.07-r1.ebuild b/app-arch/7-zip/7-zip-21.07-r2.ebuild
index 7154c6c..81229fc 100644
--- a/app-arch/7-zip/7-zip-21.07-r1.ebuild
+++ b/app-arch/7-zip/7-zip-21.07-r2.ebuild
@@ -24,13 +24,16 @@ RDEPEND="!app-arch/p7zip"
S=${WORKDIR}
-PATCHES=( ${FILESDIR}/7-zip-flags.patch )
+PATCHES=(
+ "${FILESDIR}/7-zip-flags.patch"
+ "${FILESDIR}/7-zip-less-asm.patch"
+)
src_compile() {
cd CPP/7zip/Bundles/Alone2 || die
local myemakeargs=(
- CC="$(tc-getCC) ${CFLAGS} ${LDFLAGS}"
- CXX="$(tc-getCXX) ${CXXFLAGS} ${LDFLAGS}"
+ CC="$(tc-getCC) ${CFLAGS} -fno-strict-aliasing ${LDFLAGS}"
+ CXX="$(tc-getCXX) ${CXXFLAGS} -fno-strict-aliasing ${LDFLAGS}"
)
if use asm; then
myemakeargs+=(USE_ASM=1 USE_JWASM=1)
diff --git a/app-arch/7-zip/files/7-zip-less-asm.patch b/app-arch/7-zip/files/7-zip-less-asm.patch
new file mode 100644
index 0000000..040b445
--- /dev/null
+++ b/app-arch/7-zip/files/7-zip-less-asm.patch
@@ -0,0 +1,41 @@
+--- a/CPP/7zip/7zip_gcc.mak 2021-12-25 09:00:00.000000000 -0500
++++ b/CPP/7zip/7zip_gcc.mak 2022-05-13 12:20:17.539629635 -0400
+@@ -1127,21 +1127,6 @@
+ endif
+ endif
+
+-ifdef USE_X86_ASM
+-$O/7zCrcOpt.o: ../../../../Asm/x86/7zCrcOpt.asm
+- $(MY_ASM) $(AFLAGS) $<
+-$O/XzCrc64Opt.o: ../../../../Asm/x86/XzCrc64Opt.asm
+- $(MY_ASM) $(AFLAGS) $<
+-$O/Sha1Opt.o: ../../../../Asm/x86/Sha1Opt.asm
+- $(MY_ASM) $(AFLAGS) $<
+-$O/Sha256Opt.o: ../../../../Asm/x86/Sha256Opt.asm
+- $(MY_ASM) $(AFLAGS) $<
+-
+-ifndef USE_JWASM
+-USE_X86_ASM_AES=1
+-endif
+-
+-else
+ $O/7zCrcOpt.o: ../../../../C/7zCrcOpt.c
+ $(CC) $(CFLAGS) $<
+ $O/XzCrc64Opt.o: ../../../../C/XzCrc64Opt.c
+@@ -1150,16 +1135,10 @@
+ $(CC) $(CFLAGS) $<
+ $O/Sha256Opt.o: ../../../../C/Sha256Opt.c
+ $(CC) $(CFLAGS) $<
+-endif
+
+
+-ifdef USE_X86_ASM_AES
+-$O/AesOpt.o: ../../../../Asm/x86/AesOpt.asm
+- $(MY_ASM) $(AFLAGS) $<
+-else
+ $O/AesOpt.o: ../../../../C/AesOpt.c
+ $(CC) $(CFLAGS) $<
+-endif
+
+
+ ifdef USE_X64_ASM