Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/sys/crypto/chacha Acknowledge clang warning for NEON c...



details:   https://anonhg.NetBSD.org/src/rev/a21339cb49d8
branches:  trunk
changeset: 938467:a21339cb49d8
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Tue Sep 08 17:35:27 2020 +0000

description:
Acknowledge clang warning for NEON cipher code on aarch64eb

We've already made the nonportable vector initializations portable; the
code works on aarch64eb.

diffstat:

 sys/crypto/aes/arch/arm/files.aesneon       |  4 +++-
 sys/crypto/chacha/arch/arm/files.chacha_arm |  3 ++-
 tests/sys/crypto/aes/Makefile               |  6 +++++-
 tests/sys/crypto/chacha/Makefile            |  5 ++++-
 4 files changed, 14 insertions(+), 4 deletions(-)

diffs (71 lines):

diff -r 5765d9988a03 -r a21339cb49d8 sys/crypto/aes/arch/arm/files.aesneon
--- a/sys/crypto/aes/arch/arm/files.aesneon     Tue Sep 08 17:30:44 2020 +0000
+++ b/sys/crypto/aes/arch/arm/files.aesneon     Tue Sep 08 17:35:27 2020 +0000
@@ -1,8 +1,10 @@
-#      $NetBSD: files.aesneon,v 1.4 2020/08/16 18:02:03 riastradh Exp $
+#      $NetBSD: files.aesneon,v 1.5 2020/09/08 17:35:27 jakllsch Exp $
 
 ifdef aarch64
 makeoptions    aes     "COPTS.aes_neon.c"+="-march=armv8-a"
 makeoptions    aes     "COPTS.aes_neon_subr.c"+="-march=armv8-a"
+makeoptions    aes     "CWARNFLAGS.aes_neon.c"+="${${ACTIVE_CC} == clang :? -Wno-nonportable-vector-initialization :}"
+makeoptions    aes     "CWARNFLAGS.aes_neon_subr.c"+="${${ACTIVE_CC} == clang :? -Wno-nonportable-vector-initialization :}"
 else
 makeoptions    aes     "COPTS.aes_neon.c"+="-mfloat-abi=softfp -mfpu=neon"
 makeoptions    aes     "COPTS.aes_neon_subr.c"+="-mfloat-abi=softfp -mfpu=neon"
diff -r 5765d9988a03 -r a21339cb49d8 sys/crypto/chacha/arch/arm/files.chacha_arm
--- a/sys/crypto/chacha/arch/arm/files.chacha_arm       Tue Sep 08 17:30:44 2020 +0000
+++ b/sys/crypto/chacha/arch/arm/files.chacha_arm       Tue Sep 08 17:35:27 2020 +0000
@@ -1,7 +1,8 @@
-#      $NetBSD: files.chacha_arm,v 1.4 2020/09/08 17:17:32 jakllsch Exp $
+#      $NetBSD: files.chacha_arm,v 1.5 2020/09/08 17:35:27 jakllsch Exp $
 
 ifdef aarch64
 makeoptions    chacha  "COPTS.chacha_neon.c"+="-march=armv8-a"
+makeoptions    chacha  "CWARNFLAGS.chacha_neon.c"+="${${ACTIVE_CC} == clang :? -Wno-nonportable-vector-initialization :}"
 else
 makeoptions    chacha  "COPTS.chacha_neon.c"+="-mfloat-abi=softfp -mfpu=neon"
 endif
diff -r 5765d9988a03 -r a21339cb49d8 tests/sys/crypto/aes/Makefile
--- a/tests/sys/crypto/aes/Makefile     Tue Sep 08 17:30:44 2020 +0000
+++ b/tests/sys/crypto/aes/Makefile     Tue Sep 08 17:35:27 2020 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.5 2020/08/17 16:26:02 riastradh Exp $
+#      $NetBSD: Makefile,v 1.6 2020/09/08 17:35:27 jakllsch Exp $
 
 .include <bsd.own.mk>
 
@@ -29,9 +29,13 @@
 SRCS.t_aes+=   aes_armv8_64.S
 .endif
 
+CLANG_NO_NONPORTABLE_VECTOR_INITIALIZATION= ${${ACTIVE_CC} == "clang":? -Wno-nonportable-vector-initialization :}
+
 SRCS.t_aes+=   aes_neon.c
+COPTS.aes_neon.c+=${CLANG_NO_NONPORTABLE_VECTOR_INITIALIZATION}
 SRCS.t_aes+=   aes_neon_impl.c
 SRCS.t_aes+=   aes_neon_subr.c
+COPTS.aes_neon_subr.c+=${CLANG_NO_NONPORTABLE_VECTOR_INITIALIZATION}
 .if !empty(MACHINE_ARCH:Mearmv7*)
 SRCS.t_aes+=   aes_neon_32.S
 .endif
diff -r 5765d9988a03 -r a21339cb49d8 tests/sys/crypto/chacha/Makefile
--- a/tests/sys/crypto/chacha/Makefile  Tue Sep 08 17:30:44 2020 +0000
+++ b/tests/sys/crypto/chacha/Makefile  Tue Sep 08 17:35:27 2020 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.5 2020/08/17 16:26:02 riastradh Exp $
+#      $NetBSD: Makefile,v 1.6 2020/09/08 17:35:27 jakllsch Exp $
 
 .include <bsd.own.mk>
 
@@ -21,7 +21,10 @@
 .PATH: ${NETBSDSRCDIR}/sys/crypto/chacha/arch/arm
 CPPFLAGS+=     -I${NETBSDSRCDIR}/sys/crypto/chacha/arch/arm
 
+CLANG_NO_NONPORTABLE_VECTOR_INITIALIZATION= ${${ACTIVE_CC} == "clang":? -Wno-nonportable-vector-initialization :}
+
 SRCS.t_chacha+=        chacha_neon.c
+COPTS.chacha_neon.c+=  ${CLANG_NO_NONPORTABLE_VECTOR_INITIALIZATION}
 .if !empty(MACHINE_ARCH:Mearmv7*)
 SRCS.t_chacha+=        chacha_neon_32.S
 .elif !empty(MACHINE_ARCH:Maarch64*)



Home | Main Index | Thread Index | Old Index