package/aircrack-ng: powerpc support optional ALTIVEC
PATCH 1/2 package/aircrack-ng: powerpc support optional ALTIVEC
This patch adds support for the powerpc arch to conditionally check if an arch provies altivec accelerator support, similar to other SIMD on ARM/x86.
Upstream issue: aircrack-ng/aircrack-ng#1941
Fixes
http://autobuild.buildroot.net/results/87e82a5e8d0b1c1ff10ec3e59d25bcd56b329075
Tested against both a e6500 with Altivec and a e500 target.
--- ...1-autotools-Fix-optional-SIMD-on-PPC-arch.patch | 69 ++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 package/aircrack-ng/0001-autotools-Fix-optional-SIMD-on-PPC-arch.patch
package/aircrack-ng/0001-autotools-Fix-optional-SIMD-on-PPC-arch.patch new file +69 -0
@@ -0,0 +1,69 @@ +From 7cf680386de051cb8308510680299aef810fe743 Mon Sep 17 00:00:00 2001 +From: Joseph Benden <[email protected]> +Date: Fri, 17 Aug 2018 13:23:39 -0700 +Subject: [PATCH] autotools: Fix optional SIMD on PPC arch + +Resolves: +https://github.com/aircrack-ng/aircrack-ng/issues/1941 + +Upstream (applied to their master, not yet in a release): (squashed together) +https://github.com/aircrack-ng/aircrack-ng/commit/97838c6b903d33c8403a4bdcae60b8619fad7538 +https://github.com/aircrack-ng/aircrack-ng/commit/efc0b2718f4afd9582419902d205b242e546b9ab + +Signed-off-by: Joseph Benden <[email protected]> +Signed-off-by: Matt Weber <[email protected] +--- + build/m4/aircrack_ng_simd.m4 | 4 ++++ + src/aircrack-crypto/Makefile.am | 7 ++++++- + 2 files changed, 10 insertions(+), 1 deletion(-) + +diff --git a/build/m4/aircrack_ng_simd.m4 b/build/m4/aircrack_ng_simd.m4 +index 29c3816..2bcc41f 100644 +--- a/build/m4/aircrack_ng_simd.m4 ++++ b/build/m4/aircrack_ng_simd.m4 +@@ -132,6 +132,7 @@ 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], [ +@@ -147,6 +148,7 @@ 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 + +@@ -258,6 +260,8 @@ AM_CONDITIONAL([ARM], [test "$IS_ARM" = 1]) + AM_CONDITIONAL([PPC], [test "$IS_PPC" = 1]) + AM_CONDITIONAL([NEON], [test "$NEON_FOUND" = 1]) + AM_CONDITIONAL([AVX512F], [test "$AVX512F_FOUND" = 1]) ++AM_CONDITIONAL([ALTIVEC], [test "$ALTIVEC_FOUND" = 1]) ++AM_CONDITIONAL([POWER8], [test "$POWER8_FOUND" = 1]) + ]) + + AC_DEFUN([AIRCRACK_NG_SIMD_C], [ +diff --git a/src/aircrack-crypto/Makefile.am b/src/aircrack-crypto/Makefile.am +index 8cc685d..a1664a5 100644 +--- a/src/aircrack-crypto/Makefile.am ++++ b/src/aircrack-crypto/Makefile.am +@@ -131,7 +131,12 @@ lib_LTLIBRARIES += libaircrack-crypto-arm-neon.la + endif + endif + if PPC +-lib_LTLIBRARIES += libaircrack-crypto-ppc-altivec.la libaircrack-crypto-ppc-power8.la ++if ALTIVEC ++lib_LTLIBRARIES += libaircrack-crypto-ppc-altivec.la ++endif ++if POWER8 ++lib_LTLIBRARIES += libaircrack-crypto-ppc-power8.la ++endif + endif + if X86 + if AVX512F +-- +1.9.1 +
Signature · 1 line
1.9.1
PATCH 2/2 Revert "package/aircrack-ng: powerpc arch requires altivec"
This reverts commit 1f3f1fb8c7324c9a50383b1cafcbd2f9d74a91f9.
--- package/aircrack-ng/Config.in | 3 --- 1 file changed, 3 deletions(-)
package/aircrack-ng/Config.in +0 -3
@@ -4,9 +4,6 @@ config BR2_PACKAGE_AIRCRACK_NG depends on BR2_TOOLCHAIN_HAS_THREADS depends on BR2_INSTALL_LIBSTDCPP depends on !BR2_STATIC_LIBS # dlfcn.h - # https://github.com/aircrack-ng/aircrack-ng/issues/1941 - depends on BR2_POWERPC_CPU_HAS_ALTIVEC || \ - !(BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le) select BR2_PACKAGE_OPENSSL if !BR2_PACKAGE_LIBGCRYPT help A set of tools for auditing wireless networks
Signature · 1 line
1.9.1
PATCH 2/2 Revert "package/aircrack-ng: powerpc arch requires altivec"
Hello,
Quoted 12 lines · Matt Weber
This reverts commit
1f3f1fb8c7324c9a50383b1cafcbd2f9d74a91f9.Signed-off-by Matt Weber <[email protected]>--- package/aircrack-ng/Config.in | 3 --- 1 file changed, 3 deletions(-)package/aircrack-ng/Config.in +0
-0
package/aircrack-ng/Config.in config BR2_PACKAGE_AIRCRACK_NG · line 9
Quoted 6 lines
package/aircrack-ng/Config.in +0
-3@@ -4,9 +4,6 @@ config BR2_PACKAGE_AIRCRACK_NG depends on BR2_TOOLCHAIN_HAS_THREADS depends on BR2_INSTALL_LIBSTDCPP depends on !BR2_STATIC_LIBS # dlfcn.h - # https://github.com/aircrack-ng/aircrack-ng/issues/1941 - depends on BR2_POWERPC_CPU_HAS_ALTIVEC || \ - !(BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le)
This revert made me realize that the commit itself was wrong: this architecture dependency had not been propagated to the Config.in comment in the same file.
But with the revert, this is obviously no longer relevant.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/2 package/aircrack-ng: powerpc support optional ALTIVEC
In reply to Matt WeberHello,
Quoted 9 lines · Matt Weber
This patch adds support for the powerpc arch to conditionally check if an arch provies altivec accelerator support, similar to other SIMD on ARM/x86.
Upstream issue: aircrack-ng/aircrack-ng#1941
Fixes
http://autobuild.buildroot.net/results/87e82a5e8d0b1c1ff10ec3e59d25bcd56b329075
Quoted 7 lines
Tested against both a e6500 with Altivec and a e500 target.
Signed-off-by Matthew Weber <[email protected]>--- ...1-autotools-Fix-optional-SIMD-on-PPC-arch.patch | 69 ++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 package/aircrack-ng/0001-autotools-Fix-optional-SIMD-on-PPC-arch.patch
Both applied to master. Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com