Hi,

> http://build-failures.rhaalovely.net/powerpc/last/security/aircrack-ng.log

The faulty code is based on a vintage version of John The Ripper.

It would need a 'long long' here, but then it moves the error in other
parts of the code, and so it would need a lot of patches as upstream
John reworked all that part.

As such i'm proposing to simply remove the AltiVec support so it
builds, and to add a fix that allows really to disable AltiVec as
build flags were no honoured.

Comments/feedback are welcome,

Charlène.



Index: Makefile
===================================================================
RCS file: /cvs/ports/security/aircrack-ng/Makefile,v
retrieving revision 1.29
diff -u -p -u -p -r1.29 Makefile
--- Makefile    6 Dec 2019 14:29:40 -0000       1.29
+++ Makefile    5 Jun 2020 23:55:41 -0000
@@ -52,10 +52,10 @@ PKG_ARGS+=              -Dx86=0
 #.else
 PKG_ARGS+=              -Darm=0
 #.endif
+# XXX AltiVec optimizations can't be built with clang, and POWER8 ones
+# are useless on powerpc
 .if ${MACHINE_ARCH} == "powerpc"
-PKG_ARGS+=              -Dppc=1
-.else
-PKG_ARGS+=              -Dppc=0
+MAKE_ENV+=              ALTIVEC=false POWER8=false
 .endif
 
 
Index: patches/patch-build_m4_aircrack_ng_simd_m4
===================================================================
RCS file: patches/patch-build_m4_aircrack_ng_simd_m4
diff -N patches/patch-build_m4_aircrack_ng_simd_m4
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-build_m4_aircrack_ng_simd_m4  5 Jun 2020 23:55:41 -0000
@@ -0,0 +1,25 @@
+$OpenBSD$
+
+Ensure that disabling AltiVec and POWER8 instructions with MAKE_ENV is honoured
+even if the build machine supports them, from:
+https://github.com/aircrack-ng/aircrack-ng/issues/1941
+
+Index: build/m4/aircrack_ng_simd.m4
+--- build/m4/aircrack_ng_simd.m4.orig
++++ build/m4/aircrack_ng_simd.m4
+@@ -132,7 +132,6 @@ then
+     AX_CHECK_COMPILE_FLAG([-maltivec], [
+         AX_APPEND_FLAG(-maltivec, [ppc_altivec_[]_AC_LANG_ABBREV[]flags])
+         AC_SUBST(ppc_altivec_[]_AC_LANG_ABBREV[]flags)
+-        ALTIVEC_FOUND=1
+     ])
+ 
+     AX_CHECK_COMPILE_FLAG([-mabi=altivec], [
+@@ -148,7 +147,6 @@ then
+     AX_CHECK_COMPILE_FLAG([-mpower8-vector], [
+         AX_APPEND_FLAG(-mpower8-vector, 
[ppc_altivec_[]_AC_LANG_ABBREV[]flags])
+         AC_SUBST(ppc_altivec_[]_AC_LANG_ABBREV[]flags)
+-        POWER8_FOUND=1
+     ])
+ fi
+ 
Index: patches/patch-build_m4_aircrack_ng_simd_m4.orig
===================================================================
RCS file: patches/patch-build_m4_aircrack_ng_simd_m4.orig
diff -N patches/patch-build_m4_aircrack_ng_simd_m4.orig
Index: pkg/PFRAG.ppc
===================================================================
RCS file: pkg/PFRAG.ppc
diff -N pkg/PFRAG.ppc
--- pkg/PFRAG.ppc       12 Aug 2019 14:40:04 -0000      1.2
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,4 +0,0 @@
-@comment $OpenBSD: PFRAG.ppc,v 1.2 2019/08/12 14:40:04 cwen Exp $
-lib/libaircrack-crypto-ppc-altivec-1.3.0.so
-lib/libaircrack-crypto-ppc-altivec.la
-lib/libaircrack-crypto-ppc-altivec.so
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/security/aircrack-ng/pkg/PLIST,v
retrieving revision 1.4
diff -u -p -u -p -r1.4 PLIST
--- pkg/PLIST   23 Feb 2019 22:23:25 -0000      1.4
+++ pkg/PLIST   5 Jun 2020 23:55:41 -0000
@@ -10,7 +10,6 @@
 @bin bin/wpaclean
 lib/libaircrack-crypto-1.3.0.so
 %%x86%%
-%%ppc%%
 %%arm%%
 lib/libaircrack-crypto.la
 lib/libaircrack-crypto.so


Reply via email to