From: jsing Date: Sun, 30 Apr 2017 04:44:58 +0000 (+0000) Subject: Only enable -Werror on libcrypto/libssl/libtls if we are building with X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=daf5597b6f8dcbc5cfcfc1563b10b7b6e8065d58;p=openbsd Only enable -Werror on libcrypto/libssl/libtls if we are building with gcc4. This should avoid failed builds while transitioning compilers. While here also make the CFLAGS blocks consistent across makefiles. Discussed with deraadt@, ok beck@ --- diff --git a/lib/libcrypto/Makefile b/lib/libcrypto/Makefile index 9ab1e0349dc..13f4ab0de59 100644 --- a/lib/libcrypto/Makefile +++ b/lib/libcrypto/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.15 2017/02/28 14:15:37 jsing Exp $ +# $OpenBSD: Makefile,v 1.16 2017/04/30 04:44:58 jsing Exp $ LIB= crypto @@ -13,13 +13,16 @@ CLEANFILES=${PC_FILES} ${VERSION_SCRIPT} LCRYPTO_SRC= ${.CURDIR} -CFLAGS+= -Wall -Wundef -Werror +CFLAGS+= -Wall -Wundef +.if ${COMPILER_VERSION:L} == "gcc4" +CFLAGS+= -Werror +.endif +CFLAGS+= -DLIBRESSL_INTERNAL .if !defined(NOPIC) CFLAGS+= -DDSO_DLFCN -DHAVE_DLFCN_H -DHAVE_FUNOPEN .endif -CFLAGS+= -DLIBRESSL_INTERNAL # Hardware engines CFLAGS+= -DOPENSSL_NO_HW_PADLOCK # XXX enable this? diff --git a/lib/libssl/Makefile b/lib/libssl/Makefile index 12a4b4c2fad..809851d2517 100644 --- a/lib/libssl/Makefile +++ b/lib/libssl/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.34 2017/04/29 22:31:42 beck Exp $ +# $OpenBSD: Makefile,v 1.35 2017/04/30 04:44:58 jsing Exp $ .include .ifndef NOMAN @@ -12,10 +12,11 @@ CLEANFILES=${PC_FILES} ${VERSION_SCRIPT} LIB= ssl CFLAGS+= -Wall -Wundef -.if ${COMPILER_VERSION:L} != "gcc3" +.if ${COMPILER_VERSION:L} == "gcc4" CFLAGS+= -Werror .endif CFLAGS+= -DLIBRESSL_INTERNAL + CFLAGS+= -I${.CURDIR} LDADD+= -L${BSDOBJDIR}/lib/libcrypto -lcrypto diff --git a/lib/libtls/Makefile b/lib/libtls/Makefile index d528ddf5eeb..2b09517fbe2 100644 --- a/lib/libtls/Makefile +++ b/lib/libtls/Makefile @@ -1,11 +1,14 @@ -# $OpenBSD: Makefile,v 1.30 2017/01/25 23:53:18 schwarze Exp $ +# $OpenBSD: Makefile,v 1.31 2017/04/30 04:44:58 jsing Exp $ .include .ifndef NOMAN SUBDIR= man .endif -CFLAGS+= -Wall -Werror -Wimplicit +CFLAGS+= -Wall -Wimplicit -Wundef +.if ${COMPILER_VERSION:L} == "gcc4" +CFLAGS+= -Werror +.endif CFLAGS+= -DLIBRESSL_INTERNAL CLEANFILES= ${VERSION_SCRIPT}