git: e889fcdf8e8d - stable/13 - Disable -Wunused-function for {ed,x}25519_ref10.c in libsodium.

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Wed, 22 Mar 2023 16:32:59 UTC
The branch stable/13 has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=e889fcdf8e8ddc184c97e79b82bcf251126e1fa5

commit e889fcdf8e8ddc184c97e79b82bcf251126e1fa5
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-02-02 20:25:16 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2023-03-22 16:19:58 +0000

    Disable -Wunused-function for {ed,x}25519_ref10.c in libsodium.
    
    (cherry picked from commit 63b7c2df8ec41bf9ac33ccaf9b9d16c7dc28ea0c)
---
 sys/conf/files              | 4 ++--
 sys/modules/crypto/Makefile | 2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/sys/conf/files b/sys/conf/files
index 19b0445f2e0c..17dcd22facc7 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -5045,7 +5045,7 @@ opencrypto/xform_poly1305.c	optional crypto \
 	compile-with "${NORMAL_C} -I$S/contrib/libsodium/src/libsodium/include -I$S/crypto/libsodium"
 contrib/libsodium/src/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c \
 	optional crypto \
-	compile-with "${NORMAL_C} -I$S/contrib/libsodium/src/libsodium/include/sodium -I$S/crypto/libsodium"
+	compile-with "${NORMAL_C} -I$S/contrib/libsodium/src/libsodium/include/sodium -I$S/crypto/libsodium -Wno-unused-function"
 contrib/libsodium/src/libsodium/crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c \
 	optional crypto \
 	compile-with "${NORMAL_C} -I$S/contrib/libsodium/src/libsodium/include/sodium -I$S/crypto/libsodium"
@@ -5066,7 +5066,7 @@ contrib/libsodium/src/libsodium/crypto_scalarmult/curve25519/scalarmult_curve255
 	compile-with "${NORMAL_C} -I$S/contrib/libsodium/src/libsodium/include/sodium -I$S/crypto/libsodium"
 contrib/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/x25519_ref10.c \
 	optional crypto \
-	compile-with "${NORMAL_C} -I$S/contrib/libsodium/src/libsodium/include/sodium -I$S/crypto/libsodium"
+	compile-with "${NORMAL_C} -I$S/contrib/libsodium/src/libsodium/include/sodium -I$S/crypto/libsodium -Wno-unused-function"
 contrib/libsodium/src/libsodium/crypto_stream/chacha20/stream_chacha20.c \
 	optional crypto \
 	compile-with "${NORMAL_C} -I$S/contrib/libsodium/src/libsodium/include/sodium -I$S/crypto/libsodium"
diff --git a/sys/modules/crypto/Makefile b/sys/modules/crypto/Makefile
index 877bae8d930e..471d04be1525 100644
--- a/sys/modules/crypto/Makefile
+++ b/sys/modules/crypto/Makefile
@@ -75,6 +75,7 @@ SRCS	+= aead_xchacha20poly1305.c
 CFLAGS.aead_xchacha20poly1305.c	+= -I${LIBSODIUM_INC}/sodium -I${LIBSODIUM_COMPAT}
 SRCS	+= ed25519_ref10.c
 CFLAGS.ed25519_ref10.c		+= -I${LIBSODIUM_INC}/sodium -I${LIBSODIUM_COMPAT}
+CWARNFLAGS.ed25519_ref10.c	+= -Wno-unused-function
 SRCS	+= core_hchacha20.c
 CFLAGS.core_hchacha20.c		+= -I${LIBSODIUM_INC}/sodium -I${LIBSODIUM_COMPAT}
 SRCS	+= onetimeauth_poly1305.c
@@ -89,6 +90,7 @@ SRCS	+= scalarmult_curve25519.c
 CFLAGS.scalarmult_curve25519.c	+= -I${LIBSODIUM_INC}/sodium -I${LIBSODIUM_COMPAT}
 SRCS	+= x25519_ref10.c
 CFLAGS.x25519_ref10.c		+= -I${LIBSODIUM_INC}/sodium -I${LIBSODIUM_COMPAT}
+CWARNFLAGS.x25519_ref10.c	+= -Wno-unused-function
 SRCS	+= verify.c
 CFLAGS.verify.c			+= -I${LIBSODIUM_INC}/sodium -I${LIBSODIUM_COMPAT}
 SRCS	+= randombytes.c