Print this page
11461 should use a native link-editor during the build
11463 SUNWonld has passed its use-by date
11464 cmd/sgs/tools should contain tools, not common code
11465 sgsmsg should be built with the rest of the build tools

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/sgs/Makefile.com
          +++ new/usr/src/cmd/sgs/Makefile.com
↓ open down ↓ 23 lines elided ↑ open up ↑
  24   24  # Copyright 2016 RackTop Systems.
  25   25  # Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
  26   26  #
  27   27  
  28   28  .KEEP_STATE:
  29   29  .KEEP_STATE_FILE: .make.state.$(MACH)
  30   30  
  31   31  
  32   32  include         $(SRC)/cmd/sgs/Makefile.var
  33   33  
  34      -SRCBASE =       ../../../..
  35      -
  36   34  i386_ARCH =     intel
  37   35  sparc_ARCH =    sparc
  38   36  
  39   37  ARCH =          $($(MACH)_ARCH)
  40   38  
  41   39  # Establish any global flags.
  42   40  
  43   41  # Setting DEBUG = -DDEBUG (or "make DEBUG=-DDEBUG ...") enables ASSERT()
  44   42  # checking.  This is automatically enabled for DEBUG builds, not for non-debug
  45   43  # builds.  Unset the global CSTD_GNU89 flag to insure we uncover all compiler
  46   44  # warnings/errors.
  47   45  DEBUG =
  48   46  $(NOT_RELEASE_BUILD)DEBUG = -DDEBUG
  49   47  
  50   48  CSTD_GNU89 =    $(CSTD_GNU99)
  51   49  
  52   50  CFLAGS +=       $(CCVERBOSE) $(DEBUG) $(XFFLAG)
  53   51  CFLAGS64 +=     $(CCVERBOSE) $(DEBUG) $(XFFLAG)
  54   52  
       53 +NATIVE_CFLAGS +=        $(CCVERBOSE) $(DEBUG) $(XFFLAG)
       54 +
  55   55  CERRWARN +=     -_gcc=-Wno-type-limits
  56   56  CERRWARN +=     -_gcc=-Wno-parentheses
  57   57  CERRWARN +=     -_gcc=-Wno-unused-value
  58   58  
  59   59  #
  60   60  # Location of the shared elfcap code
  61   61  #
  62   62  ELFCAP=         $(SRC)/common/elfcap
  63   63  
  64   64  # Reassign CPPFLAGS so that local search paths are used before any parent
  65   65  # $ROOT paths.
  66      -CPPFLAGS =      -I. -I../common -I../../include -I../../include/$(MACH) \
       66 +CPPFLAGS =      -I. -I../common -I$(SGSHOME)/include -I$(SGSHOME)/include/$(MACH) \
  67   67                  $(CPPFLAGS.master) -I$(ELFCAP)
  68   68  
  69   69  # PICS64 is unique to our environment
  70   70  $(PICS64) :=    sparc_CFLAGS += -xregs=no%appl $(C_PICFLAGS)
  71   71  $(PICS64) :=    sparcv9_CFLAGS += -xregs=no%appl $(C_PICFLAGS)
  72   72  $(PICS64) :=    CPPFLAGS += -DPIC -D_REENTRANT
  73   73  
  74   74  LDFLAGS +=      $(ZIGNORE)
  75   75  DYNFLAGS +=     $(ZIGNORE)
  76   76  
  77   77  # Establish the local tools, proto and package area.
  78   78  
  79   79  SGSHOME =       $(SRC)/cmd/sgs
  80      -SGSPROTO =      $(SGSHOME)/proto/$(MACH)
       80 +SGSCOMMON =     $(SGSHOME)/common
  81   81  SGSTOOLS =      $(SGSHOME)/tools
  82   82  SGSMSGID =      $(SGSHOME)/messages
  83   83  SGSMSGDIR =     $(SGSHOME)/messages/$(MACH)
  84   84  SGSONLD =       $(ROOT)/opt/SUNWonld
  85   85  SGSRPATH =      /usr/lib
  86   86  SGSRPATH64 =    $(SGSRPATH)/$(MACH64)
  87   87  
  88      -# Mimic the structure of an installed system.
  89      -
  90      -SGSLIBDIR =     $(SGSPROTO)/lib
  91      -SGSPREFIX =     $(SGSPROTO)/usr
  92      -SGSBINDIR =     $(SGSPREFIX)/bin
  93      -
  94   88  #
  95   89  # Macros to be used to include link against libconv and include vernote.o
  96   90  #
  97   91  VERSREF =       -ulink_ver_string
  98   92  
  99   93  LDLIBDIR =      -L$(SGSHOME)/libld/$(MACH)
 100   94  LDLIBDIR64 =    -L$(SGSHOME)/libld/$(MACH64)
 101   95  
 102   96  CONVLIBDIR =    -L$(SGSHOME)/libconv/$(MACH)
 103   97  CONVLIBDIR64 =  -L$(SGSHOME)/libconv/$(MACH64)
↓ open down ↓ 6 lines elided ↑ open up ↑
 110  104  
 111  105  
 112  106  # The cmd/Makefile.com and lib/Makefile.com define TEXT_DOMAIN.  We don't need
 113  107  # this definition as the sgs utilities obtain their domain via sgsmsg(1l).
 114  108  
 115  109  DTEXTDOM =
 116  110  
 117  111  # Define any generic sgsmsg(1l) flags.  The default message generation system
 118  112  # is to use gettext(3i), add the -C flag to switch to catgets(3c).
 119  113  
 120      -SGSMSG =                $(SGSTOOLS)/$(MACH)/sgsmsg
      114 +SGSMSG =                $(ONBLD_TOOLS)/bin/$(MACH)/sgsmsg
 121  115  SGSMSG_PIGLATIN_NL =    perl $(SGSTOOLS)/common/sgsmsg_piglatin_nl.pl
 122      -CHKMSG =                $(SGSTOOLS)/chkmsg.sh
      116 +CHKMSG =                $(SGSHOME)/tools/chkmsg.sh
 123  117  
 124  118  SGSMSGVFLAG =
 125  119  SGSMSGFLAGS =   $(SGSMSGVFLAG) -i $(SGSMSGID)/sgs.ident
 126  120  CHKMSGFLAGS =   $(SGSMSGTARG:%=-m %) $(SGSMSGCHK:%=-m %)
 127      -
 128      -# Native targets should use the minimum of ld(1) flags to allow building on
 129      -# previous releases.  We use mapfiles to scope, but don't bother versioning.
 130      -
 131      -native :=       DYNFLAGS = -R$(SGSLIBDIR) -L$(SGSLIBDIR) $(ZNOVERSION) \
 132      -                        $(HSONAME)
 133      -
 134      -# Comment out the following two lines to have the sgs built from the system
 135      -# link-editor, rather than the local proto link-editor.
 136      -CC_USE_PROTO =  -Yl,$(SGSBINDIR)
 137      -LD_USE_PROTO =  $(SGSBINDIR)/
 138      -
 139      -LD_LIB =        -lld
 140      -LD_LIB32 =      -lld32
 141      -LD_LIB64 =      -lld64
 142      -
 143      -LDDBG_LIB =     -llddbg
 144      -LDDBG_LIB32 =   -llddbg32
 145      -LDDBG_LIB64 =   -llddbg64
 146      -
 147      -CONV_LIB =      -lconv
 148      -CONV_LIB32 =    -lconv32
 149      -CONV_LIB64 =    -lconv64
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX