Module Name:    src
Committed By:   riastradh
Date:           Thu May 25 16:05:28 UTC 2023

Modified Files:
        src/crypto/external/bsd/openssl/lib/libapps: Makefile
        src/crypto/external/bsd/openssl/lib/libcrypto: Makefile
        src/crypto/external/bsd/openssl/lib/libssl: Makefile

Log Message:
openssl: Suppress clang warnings for using string literals as char *.

Not sure this is actually forbidden by the C standard.  There may be
bugs lurking here, but OpenSSL uses this extensively, so let's just
get the build going again.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/crypto/external/bsd/openssl/lib/libapps/Makefile
cvs rdiff -u -r1.30 -r1.31 \
    src/crypto/external/bsd/openssl/lib/libcrypto/Makefile
cvs rdiff -u -r1.15 -r1.16 \
    src/crypto/external/bsd/openssl/lib/libssl/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libapps/Makefile
diff -u src/crypto/external/bsd/openssl/lib/libapps/Makefile:1.4 src/crypto/external/bsd/openssl/lib/libapps/Makefile:1.5
--- src/crypto/external/bsd/openssl/lib/libapps/Makefile:1.4	Thu May 25 15:52:28 2023
+++ src/crypto/external/bsd/openssl/lib/libapps/Makefile	Thu May 25 16:05:27 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.4 2023/05/25 15:52:28 riastradh Exp $
+#	$NetBSD: Makefile,v 1.5 2023/05/25 16:05:27 riastradh Exp $
 
 # RCSid:
 #	Id: Makefile,v 1.33 1998/11/11 11:53:53 sjg Exp
@@ -33,6 +33,9 @@ CPPFLAGS+= -I${OPENSSLSRC}/../include
 CPPFLAGS+= -I${OPENSSLSRC}/apps/lib
 CPPFLAGS+= -I${OPENSSLSRC}/apps/include
 
+# OpenSSL extensively uses string literals as char *, which clang
+# (reasonably if not exactly rightly) objects to.
+CWARNFLAGS.clang+=-Wno-error=incompatible-pointer-types-discards-qualifiers
 
 CRYPTODIST=	${NETBSDSRCDIR}/crypto
 OPENSSLINC=	${OPENSSLSRC}/include/openssl

Index: src/crypto/external/bsd/openssl/lib/libcrypto/Makefile
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/Makefile:1.30 src/crypto/external/bsd/openssl/lib/libcrypto/Makefile:1.31
--- src/crypto/external/bsd/openssl/lib/libcrypto/Makefile:1.30	Thu May 25 15:52:28 2023
+++ src/crypto/external/bsd/openssl/lib/libcrypto/Makefile	Thu May 25 16:05:28 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.30 2023/05/25 15:52:28 riastradh Exp $
+#	$NetBSD: Makefile,v 1.31 2023/05/25 16:05:28 riastradh Exp $
 
 # RCSid:
 #	Id: Makefile,v 1.33 1998/11/11 11:53:53 sjg Exp
@@ -31,6 +31,10 @@ CPPFLAGS+= -I${OPENSSLSRC}/crypto/asn1 -
 CPPFLAGS+= -I${OPENSSLSRC}/crypto/modes
 CPPFLAGS+= -I${OPENSSLSRC}/../include
 
+# OpenSSL extensively uses string literals as char *, which clang
+# (reasonably if not exactly rightly) objects to.
+CWARNFLAGS.clang+=-Wno-error=incompatible-pointer-types-discards-qualifiers
+
 CRYPTODIST=	${NETBSDSRCDIR}/crypto
 OPENSSLINC=	${OPENSSLSRC}/include/openssl
 

Index: src/crypto/external/bsd/openssl/lib/libssl/Makefile
diff -u src/crypto/external/bsd/openssl/lib/libssl/Makefile:1.15 src/crypto/external/bsd/openssl/lib/libssl/Makefile:1.16
--- src/crypto/external/bsd/openssl/lib/libssl/Makefile:1.15	Thu May 25 15:52:29 2023
+++ src/crypto/external/bsd/openssl/lib/libssl/Makefile	Thu May 25 16:05:28 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.15 2023/05/25 15:52:29 riastradh Exp $
+#	$NetBSD: Makefile,v 1.16 2023/05/25 16:05:28 riastradh Exp $
 
 # RCSid:
 #	Id: Makefile,v 1.33 1998/11/11 11:53:53 sjg Exp
@@ -24,6 +24,10 @@ CWARNFLAGS.clang+=	-Wno-unused-value
 # XXX: This warning seems to trigger incorrectly
 CWARNFLAGS.clang+=	-Wno-atomic-alignment
 
+# OpenSSL extensively uses string literals as char *, which clang
+# (reasonably if not exactly rightly) objects to.
+CWARNFLAGS.clang+=-Wno-error=incompatible-pointer-types-discards-qualifiers
+
 LIB=	ssl
 CPPFLAGS+= -Dlib${LIB} -I${OPENSSLSRC} -I${OPENSSLSRC}/crypto
 CPPFLAGS+= -I${OPENSSLSRC}/include

Reply via email to