Print this page
    
11528 Makefile.noget can get gone
11529 Use -Wno-maybe-initialized
    
      
        | Split | Close | 
      | Expand all | 
      | Collapse all | 
    
    
          --- old/usr/src/uts/sun4v/unix/Makefile
          +++ new/usr/src/uts/sun4v/unix/Makefile
   1    1  #
   2    2  # CDDL HEADER START
   3    3  #
   4    4  # The contents of this file are subject to the terms of the
   5    5  # Common Development and Distribution License (the "License").
   6    6  # You may not use this file except in compliance with the License.
   7    7  #
   8    8  # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9    9  # or http://www.opensolaris.org/os/licensing.
  10   10  # See the License for the specific language governing permissions
  11   11  # and limitations under the License.
  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   22  #
  23   23  # Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  24   24  # Use is subject to license terms.
  25   25  #
  26   26  
  27   27  #
  28   28  #       This makefile drives the production of /unix (and unix.o).
  29   29  #
  30   30  #       sun4v implementation architecture dependent
  31   31  #
  32   32  
  33   33  #
  34   34  #       Path to the base of the uts directory tree (usually /usr/src/uts).
  35   35  #
  36   36  UTSBASE = ../..
  37   37  
  38   38  #
  39   39  #       Define the module and object file sets.
  40   40  #
  41   41  UNIX            = unix
  42   42  OBJECTS         = $(SPECIAL_OBJS:%=$(OBJS_DIR)/%) \
  43   43                    $(CORE_OBJS:%=$(OBJS_DIR)/%) \
  44   44                    $(MACH_NOT_YET_KMODS:%=$(OBJS_DIR)/%)
  45   45  LINTS           = $(SPECIAL_OBJS:%.o=$(LINTS_DIR)/%.ln) \
  46   46                    $(CORE_OBJS:%.o=$(LINTS_DIR)/%.ln) \
  47   47                    $(KRTLD_OBJS:%.o=$(LINTS_DIR)/%.ln) \
  48   48                    $(MACH_NOT_YET_KMODS:%.o=$(LINTS_DIR)/%.ln) \
  49   49                    $(LINTS_DIR)/vers.ln \
  50   50                    $(LINTS_DIR)/modstubs.ln
  51   51  
  52   52  KRTLD_MAPFILE   = $(UTSBASE)/sparc/krtld/mapfile
  53   53  KRTLD_OBJECTS   = $(KRTLD_OBJS:%=$(OBJS_DIR)/%)
  54   54  KRTLD_O         = $(OBJS_DIR)/krtld.o
  55   55  
  56   56  ROOTMODULE      = $(ROOT_PSM_KERN_DIR)/$(UNIX)
  57   57  UNIX32_LINK     = $(ROOT_PSM_KERN_DIR_32)/$(UNIX)
  58   58  UNIX_BIN        = $(OBJS_DIR)/$(UNIX)
  59   59  
  60   60  LIBS            = $(GENLIB) $(PLATLIB) $(CPULIB)
  61   61  
  62   62  GENUNIX         = genunix
  63   63  GENUNIX_DIR     = ../$(GENUNIX)
  64   64  GENOPTS         = -L $(GENUNIX_DIR)/$(OBJS_DIR) -l $(GENUNIX)
  65   65  
  66   66  CPU_DIR         = .
  67   67  CPUOPTS         = -L $(CPU_DIR)/$(OBJS_DIR) -l $(CPUNAME)
  68   68  
  69   69  PLAT_DIR        = ../platmod
  70   70  PLATOPTS        = -L $(PLAT_DIR)/$(OBJS_DIR) -l $(PLATMOD)
  71   71  
  72   72  LIBOPTS         = $(GENOPTS) $(PLATOPTS) $(CPUOPTS)
  73   73  
  74   74  CTFEXTRAOBJS    = $(OBJS_DIR)/vers.o
  75   75  
  76   76  #
  77   77  #       Include common rules.
  78   78  #
  79   79  include $(UTSBASE)/sun4v/Makefile.sun4v
  80   80  
  81   81  #
  82   82  #       Define targets
  83   83  #
  84   84  ALL_TARGET      = $(UNIX_BIN)
  85   85  LINT_TARGET     = $(LINT_LIB)
  86   86  INSTALL_TARGET  = $(UNIX_BIN) $(ROOTMODULE) $(UNIX32_LINK)
  87   87  
  88   88  #
  89   89  #       This is UNIX_DIR. Use a short path.
  90   90  #
  91   91  UNIX_DIR        = .
  92   92  
  93   93  #
  94   94  #       Overrides
  95   95  #
  96   96  CLEANFILES      += $(UNIX_O) $(MODSTUBS_O) $(KRTLD_O) $(KRTLD_OBJECTS) \
  97   97                     $(OBJS_DIR)/vers.c $(OBJS_DIR)/vers.o \
  98   98                     $(CPU_OBJ) $(CPULIB) \
  99   99                     $(DTRACESTUBS_O) $(DTRACESTUBS)
 100  100  
 101  101  CLOBBERFILES    = $(CLEANFILES) $(UNIX_BIN)
 102  102  CLEANLINTFILES  += $(LINT_LIB)
 103  103  
 104  104  #
 105  105  # lint pass one enforcement 
 106  106  # Turn on doubleword alignment for 64 bit counter timer registers
 107  107  #
 108  108  CFLAGS += $(CCVERBOSE) -dalign
 109  109  
 110  110  #
 111  111  # For now, disable these lint checks; maintainers should endeavor
 112  112  # to investigate and remove these for maximum lint coverage.
  
    | ↓ open down ↓ | 112 lines elided | ↑ open up ↑ | 
 113  113  # Please do not carry these forward to new Makefiles.
 114  114  #
 115  115  LINTTAGS        += -erroff=E_SUSPICIOUS_COMPARISON
 116  116  LINTTAGS        += -erroff=E_BAD_PTR_CAST_ALIGN
 117  117  LINTTAGS        += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
 118  118  LINTTAGS        += -erroff=E_STATIC_UNUSED
 119  119  LINTTAGS        += -erroff=E_PTRDIFF_OVERFLOW
 120  120  LINTTAGS        += -erroff=E_ASSIGN_NARROW_CONV
 121  121  
 122  122  CERRWARN        += -_gcc=-Wno-parentheses
 123      -CERRWARN        += -_gcc=-Wno-uninitialized
      123 +CERRWARN        += $(CNOWARN_UNINIT)
 124  124  CERRWARN        += -_gcc=-Wno-char-subscripts
 125  125  CERRWARN        += -_gcc=-Wno-unused-variable
 126  126  CERRWARN        += -_gcc=-Wno-unused-function
 127  127  CERRWARN        += -_gcc=-Wno-unused-label
 128  128  CERRWARN        += -_gcc=-Wno-type-limits
 129  129  CERRWARN        += -_gcc=-Wno-clobbered
 130  130  CERRWARN        += -_gcc=-Wno-empty-body
 131  131  CERRWARN        += -_gcc=-Wno-unused-value
 132  132  CERRWARN        += -_gcc=-Wno-switch
 133  133  
 134  134  #
 135  135  #       Default build targets.
 136  136  #
 137  137  .KEEP_STATE:
 138  138  
 139  139  def:            $(DEF_DEPS)
 140  140  
 141  141  all:            $(ALL_DEPS)
 142  142  
 143  143  clean:          $(CLEAN_DEPS)
 144  144  
 145  145  clobber:        $(CLOBBER_DEPS)
 146  146  
 147  147  lint:           $(LINT_DEPS)
 148  148  
 149  149  clean.lint:     $(CLEAN_LINT_DEPS)
 150  150  
 151  151  install:        $(INSTALL_DEPS)
 152  152  
 153  153  
 154  154  $(UNIX_BIN):    $(UNIX_O) $(KRTLD_O) $(MODSTUBS_O) $(MAPFILE) $(LIBS) \
 155  155                  $(DTRACESTUBS) 
 156  156          $(LD) -dy -b -o $@ -e _start -M $(MAPFILE) \
 157  157              $(UNIX_O) $(KRTLD_O) $(MODSTUBS_O) $(LIBOPTS) $(DTRACESTUBS) 
 158  158          $(CTFMERGE_UNIQUIFY_AGAINST_GENUNIX)
 159  159          $(POST_PROCESS)
 160  160  
 161  161  $(UNIX32_LINK): $(ROOT_PSM_KERN_DIR_32) $(UNIX_BIN)
 162  162          -$(RM) $@; ln -s $(SUBDIR64)/$(UNIX) $@
 163  163  
 164  164  symcheck:       $(UNIX_O) $(KRTLD_O) $(MODSTUBS_O) $(LIBS)
 165  165          $(LD) -dy -b -o $(SYM_MOD) -M $(MAPFILE) \
 166  166          $(UNIX_O) $(KRTLD_O) $(MODSTUBS_O) $(LIBOPTS) $(DTRACESTUBS)
 167  167  
 168  168  $(UNIX_O):      $(OBJECTS) $(OBJS_DIR)/vers.o
 169  169          $(LD) -r -o $@ $(OBJECTS) $(OBJS_DIR)/vers.o
 170  170  
 171  171  $(KRTLD_O):     $(KRTLD_OBJECTS)
 172  172          $(LD) -r -o $@ -M$(KRTLD_MAPFILE) $(KRTLD_OBJECTS)
 173  173  
 174  174  #
 175  175  #       Special rules for generating assym.h for inclusion in assembly files.
 176  176  #
 177  177  $(DSF_DIR)/$(OBJS_DIR)/assym.h: FRC
 178  178          @cd $(DSF_DIR); $(MAKE) all.targ
 179  179  
 180  180  $(GENLIB):      FRC
 181  181          @pwd
 182  182          @(cd $(GENLIB_DIR); pwd; $(MAKE) all.targ)
 183  183  
 184  184  $(PLATLIB):
 185  185          ?@pwd
 186  186          ?@(cd $(PLAT_DIR); pwd; $(MAKE) all.targ)
 187  187  
 188  188  #
 189  189  #       CPU_OBJ now comprises of 2 object files which come from sun4 common
 190  190  #       and from architecture dependent code.  OBJS_DIR is prepended where
 191  191  #       CPU_OBJ is defined to allow for building multiple CPU_OBJ's
 192  192  #
 193  193  $(CPULIB):      $(CPU_OBJ)
 194  194          $(BUILD.SO) $(CPU_OBJ)
 195  195  
 196  196  #
 197  197  #       The global lint target builds the kernel lint library (llib-lunix.ln)
 198  198  #       which is equivalent to a lint of /unix.o. Then all kernel modules for
 199  199  #       this architecture are linted against the kernel lint library.
 200  200  #
 201  201  #       Note:   lint errors in the kernel lint library will be repeated for
 202  202  #               each module. It is important that the kernel lint library
 203  203  #               be clean to keep the textual output to a reasonable level.
 204  204  #
 205  205  
 206  206  $(LINT_LIB):    $(LINT_LIB_DIR) $(LINTS)
 207  207          @-$(ECHO) "\n$(UNIX): (library construction):"
 208  208          @$(LINT) -o $(UNIX) $(LINTFLAGS) $(LINTS)
 209  209          @$(MV) $(@F) $@
 210  210  
 211  211  lintlib:        $(LINT_DEPS)
 212  212  
 213  213  #
 214  214  #       Include common targets.
 215  215  #
 216  216  include $(UTSBASE)/$(PLATFORM)/Makefile.targ
 217  217  
  
    | ↓ open down ↓ | 84 lines elided | ↑ open up ↑ | 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX