Skip to content

Commit

Permalink
nettle: make Neon detection work, and infer armv6
Browse files Browse the repository at this point in the history
ARMv6 detection relied on seeing armv6 or armv7 in the toolchain name,
which is not the case. And with ARMv6 not detected, the Neon detection
wasn't attempted.

Always attempt Neon detection for arm, and if found, assume ARMv6 too.
This avoids having to think about changing the ARMv6 detection.
  • Loading branch information
kjbracey2 committed Jan 12, 2022
1 parent f215815 commit 4b1da8c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
16 changes: 8 additions & 8 deletions release/src/router/nettle/configure
Original file line number Diff line number Diff line change
Expand Up @@ -6564,9 +6564,7 @@ if test "x$enable_assembler" = xyes ; then
OPT_NETTLE_SOURCES="fat-arm.c $OPT_NETTLE_SOURCES"
FAT_TEST_LIST="arch:5 arch:6,neon"
else
case "$host_cpu" in
armv6* | armv7*)
if test "$enable_arm_neon" = auto ; then
if test "$enable_arm_neon" = auto ; then
if test "$cross_compiling" = yes ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if assembler accepts Neon instructions" >&5
$as_echo_n "checking if assembler accepts Neon instructions... " >&6; }
Expand Down Expand Up @@ -6613,12 +6611,14 @@ $as_echo "$enable_arm_neon" >&6; }
fi
fi


asm_path="arm/v6 arm"
;;
esac
if test "x$enable_arm_neon" = xyes ; then
asm_path="arm/neon $asm_path"
asm_path="arm/neon arm/v6 $asm_path"
else
case "$host_cpu" in
armv678*)
asm_path="arm/v6 arm"
;;
esac
fi
fi
;;
Expand Down
16 changes: 8 additions & 8 deletions release/src/router/nettle/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -447,15 +447,15 @@ if test "x$enable_assembler" = xyes ; then
OPT_NETTLE_SOURCES="fat-arm.c $OPT_NETTLE_SOURCES"
FAT_TEST_LIST="arch:5 arch:6,neon"
else
case "$host_cpu" in
armv6* | armv7*)
NETTLE_CHECK_ARM_NEON

asm_path="arm/v6 arm"
;;
esac
NETTLE_CHECK_ARM_NEON
if test "x$enable_arm_neon" = xyes ; then
asm_path="arm/neon $asm_path"
asm_path="arm/neon arm/v6 $asm_path"
else
case "$host_cpu" in
armv[678]*)
asm_path="arm/v6 arm"
;;
esac
fi
fi
;;
Expand Down

0 comments on commit 4b1da8c

Please sign in to comment.