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

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libwanboot/Makefile.com
          +++ new/usr/src/lib/libwanboot/Makefile.com
↓ open down ↓ 52 lines elided ↑ open up ↑
  53   53  DHCP_DIR =      $(SRC)/common/net/dhcp
  54   54  DHCP_OBJS =     dhcpinfo.o
  55   55  DHCP_SRCS =     $(DHCP_OBJS:%.o=$(DHCP_DIR)/%.c)
  56   56  
  57   57  OBJECTS =       $(LOC_OBJS) $(COM_OBJS) $(DHCP_OBJS)
  58   58  
  59   59  include ../../Makefile.lib
  60   60  
  61   61  LIBS +=         $(LINTLIB)
  62   62  LDLIBS +=       -lnvpair -lresolv -lnsl -lsocket -ldevinfo -ldhcputil \
  63      -                -linetutil -lc -lcrypto -lssl
       63 +                -linetutil -lc
       64 +
       65 +# libcrypto and libssl have no lint library, so we can only use it when
       66 +# building
       67 +$(DYNLIB) := LDLIBS += -lcrypto -lssl
       68 +
  64   69  CPPFLAGS =      -I$(SRC)/common/net/wanboot/crypt $(CPPFLAGS.master)
  65   70  CERRWARN +=     -_gcc=-Wno-switch
  66   71  CERRWARN +=     -_gcc=-Wno-parentheses
  67   72  CERRWARN +=     -_gcc=-Wno-unused-value
  68   73  CERRWARN +=     -_gcc=-Wno-uninitialized
  69   74  
  70   75  # Must override SRCS from Makefile.lib since sources have
  71   76  # multiple source directories.
  72   77  SRCS =          $(LOC_SRCS) $(COM_SRCS) $(DHCP_SRCS)
  73   78  
  74   79  # Must define location of lint library source.
  75   80  SRCDIR =        $(LOC_DIR)
  76   81  $(LINTLIB) :=   SRCS = $(SRCDIR)/$(LINTSRC)
  77   82  
  78   83  # OpenSSL requires us to turn this off
  79   84  LINTFLAGS   +=    -erroff=E_BAD_PTR_CAST_ALIGN
  80   85  LINTFLAGS64 +=    -erroff=E_BAD_PTR_CAST_ALIGN
       86 +
       87 +# OpenSSLs API includes some macro expansions that are incompatible with lint,
       88 +# depending on the version of OpenSSL used
       89 +LINTFLAGS   +=    -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
       90 +LINTFLAGS64 +=    -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
  81   91  
  82   92  CFLAGS +=       $(CCVERBOSE)
  83   93  CPPFLAGS +=     -I$(LOC_DIR) -I$(COM_DIR) -I$(DHCP_DIR)
  84   94  
  85   95  .KEEP_STATE:
  86   96  
  87   97  all: $(LIBS)
  88   98  
  89   99  lint: lintcheck
  90  100  
  91  101  pics/%.o: $(COM_DIR)/%.c
  92  102          $(COMPILE.c) -o $@ $<
  93  103          $(POST_PROCESS_O)
  94  104  
  95  105  pics/%.o: $(DHCP_DIR)/%.c
  96  106          $(COMPILE.c) -o $@ $<
  97  107          $(POST_PROCESS_O)
  98  108  
  99  109  include ../../Makefile.targ
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX