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/libelf/Makefile.targ
          +++ new/usr/src/cmd/sgs/libelf/Makefile.targ
↓ open down ↓ 22 lines elided ↑ open up ↑
  23   23  # Copyright 2016 RackTop Systems.
  24   24  # Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
  25   25  #
  26   26  
  27   27  objs/%.o \
  28   28  pics/%.o:       %.c
  29   29                  $(COMPILE.c) -o $@ $<
  30   30                  $(POST_PROCESS_O)
  31   31  
  32   32  objs/%64.o \
  33      -pics/%64.o:     ../common/%.c
       33 +pics/%64.o:     $(SRCDIR)/common/%.c
  34   34                  $(COMPILE.c) -D_ELF64 -o $@ $<
  35   35                  $(POST_PROCESS_O)
  36   36  
  37   37  objs/%.o \
  38      -pics/%.o:       ../misc/%.c
       38 +pics/%.o:       $(SRCDIR)/misc/%.c
  39   39                  $(COMPILE.c) -DELF -o $@ $<
  40   40                  $(POST_PROCESS_O)
  41   41  
  42   42  objs/%.o \
  43      -pics/%.o:       ../common/%.c
       43 +pics/%.o:       $(SRCDIR)/common/%.c
  44   44                  $(COMPILE.c) -o $@ $<
  45   45                  $(POST_PROCESS_O)
  46   46  
  47   47  all:            $(BLTSRCS) .WAIT $(LIBS) $(LIBLINKS)
  48   48  
  49      -install:        all .WAIT $(ROOTFS_LIBS) $(ROOTFS_LINKS) \
  50      -                .WAIT $(ROOTDEMODIRS) .WAIT $(ROOTDEMOFILES)
  51      -
  52   49  delete:
  53   50                  $(RM) $(DYNLIB)
  54   51  
  55   52  $(LIBLINKS):
  56   53                  $(RM) $(LIBLINKS)
  57   54                  $(SYMLINK) $(DYNLIB) $(LIBLINKS)
  58   55  
  59   56  CLOBBERFILES += $(LIBLINKS)
  60   57  
  61   58  # include common library targets
  62   59  #
  63   60  include         $(SRC)/lib/Makefile.targ
  64   61  include         $(SRC)/cmd/sgs/Makefile.targ
  65   62  
  66      -xlate.c:        ../common/xlate.m4
  67      -                $(M4) < ../common/xlate.m4 > xlate.c
       63 +xlate.c:        $(SRCDIR)/common/xlate.m4
       64 +                $(M4) < $(SRCDIR)/common/xlate.m4 > xlate.c
  68   65  
  69      -xlate64.c:      ../common/xlate64.m4
  70      -                $(M4) < ../common/xlate64.m4 > xlate64.c
       66 +xlate64.c:      $(SRCDIR)/common/xlate64.m4
       67 +                $(M4) < $(SRCDIR)/common/xlate64.m4 > xlate64.c
  71   68  
  72   69  
  73   70  objs/msg.o \
  74   71  pics/msg.o:     msg.c
  75   72  
  76   73  objs/error.o \
  77   74  pics/error.o:   msg.h
  78   75  
  79   76  objs/ar.o \
  80   77  pics/ar.o:      msg.h
  81   78  
  82   79  objs/xlate.o \
  83   80  pics/xlate.o:   xlate.c
  84   81  
  85      -# Special target for native builds (ie. when we need to build a version of ld
  86      -# to build a version of ld :-).
  87      -
  88      -native:         $(SGSLIBDIR)/$(LIBLINKS)
  89      -
  90   82  $(PICS):        pics
  91   83  
  92      -$(SGSLIBDIR)/$(DYNLIB): $(PICS) $(SGSLIBDIR)
  93      -                $(BUILD.SO)
  94      -                $(POST_PROCESS_SO)
  95      -
  96      -$(SGSLIBDIR)/$(LIBLINKS): $(SGSLIBDIR)/$(DYNLIB)
  97      -                -@$(RM) $(SGSLIBDIR)/$(LIBLINKS)
  98      -                $(SYMLINK) $(DYNLIB) $(SGSLIBDIR)/$(LIBLINKS)
  99      -
 100      -
 101   84  # Derived source and header files (messaging).  Make sure that the sgsmsg
 102   85  # command is constructed - libelf might not be built with the whole sgs.
 103   86  
 104   87  catalog:        $(BLTMESG)
 105   88  
 106   89  chkmsg:         $(LIBSRCS)
 107   90                  sh $(CHKMSG) $(CHKMSGFLAGS) $(LIBSRCS)
 108   91  
 109   92  $(BLTDEFS) + \
 110      -$(BLTDATA):     $(SGSMSG) $(SGSMSGTARG)
       93 +$(BLTDATA):     $(SGSMSGTARG)
 111   94                  $(SGSMSG) $(SGSMSGFLAGS2) $(SGSMSGTARG)
 112   95  
 113      -$(BLTMESG):     $(SGSMSG) $(SGSMSGALL) xlate.c xlate64.c
       96 +$(BLTMESG):     $(SGSMSGALL) xlate.c xlate64.c
 114   97                  $(SGSMSG) $(SGSMSGFLAGS1) $(SGSMSGALL)
 115      -
 116      -$(SGSMSG):      FRC
 117      -                @ cd $(SGSTOOLS)/$(MACH); pwd; $(MAKE) catalog
 118      -                @ pwd
 119   98  
 120   99  FRC:
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX