Print this page
5910 libnisdb won't build with modern GCC

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libnisdb/Makefile
          +++ new/usr/src/lib/libnisdb/Makefile
↓ open down ↓ 11 lines elided ↑ open up ↑
  12   12  #
  13   13  # When distributing Covered Code, include this CDDL HEADER in each
  14   14  # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15  # If applicable, add the following below this CDDL HEADER, with the
  16   16  # fields enclosed by brackets "[]" replaced with your own identifying
  17   17  # information: Portions Copyright [yyyy] [name of copyright owner]
  18   18  #
  19   19  # CDDL HEADER END
  20   20  #
  21   21  #
       22 +# Copyright 2015 Gary Mills
  22   23  # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23   24  # Use is subject to license terms.
  24   25  #
  25   26  #
  26   27  
  27   28  LIBRARY= libnisdb.a
  28   29  VERS=   .2
  29   30  PROTOCOL_DIR= $(ROOT)/include/rpcsvc
  30   31  YPTOL_DIR= ./yptol
  31   32  
↓ open down ↓ 95 lines elided ↑ open up ↑
 127  128                  shim_ancil.o \
 128  129                  shim_changepasswd.o \
 129  130                  update.o \
 130  131                  stubs.o \
 131  132                  yptol_utils.o \
 132  133                  nis_parse_ldap_util.o
 133  134  LARGEPICS=      $(LARGESYMS:%=pics/%)
 134  135  $(LARGEPICS) := sparc_C_PICFLAGS = $(C_BIGPICFLAGS)
 135  136  $(LARGEPICS) := i386_C_PICFLAGS = $(C_BIGPICFLAGS)
 136  137  
      138 +# More and stricter semantic checks and lint-like checks
      139 +CFLAGS  +=      $(CCVERBOSE)
      140 +
 137  141  CPPFLAGS +=     -D_REENTRANT
 138  142  
 139      -CERRWARN +=     -_gcc=-Wno-unused-variable
 140      -CERRWARN +=     -_gcc=-Wno-unused-value
      143 +# Have an unused variable that can't be removed
      144 +UVAR_PICS = \
      145 +pics/db_dictionary_c_xdr.o \
      146 +pics/db_dictlog_c_xdr.o \
      147 +pics/db_entry_c_xdr.o \
      148 +pics/db_index_c_xdr.o \
      149 +pics/db_item_c_xdr.o \
      150 +pics/db_log_entry_c_xdr.o \
      151 +pics/db_mindex_c_xdr.o \
      152 +pics/db_query_c_xdr.o \
      153 +pics/db_scheme_c_xdr.o \
      154 +pics/db_table_c_xdr.o \
      155 +pics/db_vers_c_xdr.o \
      156 +pics/ldap_xdr.o \
      157 +pics/dit_access.o \
      158 +pics/update.o \
      159 +pics/yptol_utils.o \
      160 +pics/map_ctrl.o
      161 +
      162 +$(UVAR_PICS) := CERRWARN += -_gcc=-Wno-unused-variable
      163 +
      164 +# Correcting these might alter logic
 141  165  CERRWARN +=     -_gcc=-Wno-uninitialized
 142      -CERRWARN +=     -_gcc=-Wno-implicit-function-declaration
 143  166  CERRWARN +=     -_gcc=-Wno-switch
 144      -CERRWARN +=     -_gcc=-Wno-parentheses
 145  167  
 146  168  # Extra includes, from yp, for yptol files.
 147  169  CPPFLAGS += -I$(SRC)/cmd/ypcmd
 148  170  
      171 +# Need the path to nis_clnt.h
      172 +CLNT_PICS = pics/db_entry_c_xdr.o pics/ldap_xdr.o pics/db_mindex_c_xdr.o
      173 +
      174 +$(CLNT_PICS) := CPPFLAGS += -I../libnsl/nis/gen
      175 +
 149  176  LIBS = $(DYNLIB)
 150  177  ZDEFS=
 151  178  LDLIBS += -lnsl -lldap -lc
 152  179  
 153  180  # A number of interfaces are interposed by numerous applications, therefore
 154  181  # prevent direct binding to anything in libnisdb.  Disable libnisdb from
 155  182  # directly binding to itself, but allow libnisdb to directly bind to its
 156  183  # dependencies (ie. map -Bdirect -> -zdirect).  Ensure lazy loading is
 157  184  # established (which is enabled automatically with -Bdirect).  In addition,
 158  185  # libnisdb interposes on socket(), so tag this library as an interposer.
↓ open down ↓ 56 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX