Print this page
4853 illumos-gate is not lint-clean when built with openssl 1.0

@@ -58,11 +58,16 @@
 
 include ../../Makefile.lib
 
 LIBS +=         $(LINTLIB)
 LDLIBS +=       -lnvpair -lresolv -lnsl -lsocket -ldevinfo -ldhcputil \
-                -linetutil -lc -lcrypto -lssl
+                -linetutil -lc
+
+# libcrypto and libssl have no lint library, so we can only use it when
+# building
+$(DYNLIB) := LDLIBS += -lcrypto -lssl
+
 CPPFLAGS =      -I$(SRC)/common/net/wanboot/crypt $(CPPFLAGS.master)
 CERRWARN +=     -_gcc=-Wno-switch
 CERRWARN +=     -_gcc=-Wno-parentheses
 CERRWARN +=     -_gcc=-Wno-unused-value
 CERRWARN +=     -_gcc=-Wno-uninitialized

@@ -77,10 +82,15 @@
 
 # OpenSSL requires us to turn this off
 LINTFLAGS   +=    -erroff=E_BAD_PTR_CAST_ALIGN
 LINTFLAGS64 +=    -erroff=E_BAD_PTR_CAST_ALIGN
 
+# OpenSSLs API includes some macro expansions that are incompatible with lint,
+# depending on the version of OpenSSL used
+LINTFLAGS   +=    -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
+LINTFLAGS64 +=    -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
+
 CFLAGS +=       $(CCVERBOSE)
 CPPFLAGS +=     -I$(LOC_DIR) -I$(COM_DIR) -I$(DHCP_DIR)
 
 .KEEP_STATE: