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/rtld/Makefile.com
          +++ new/usr/src/cmd/sgs/rtld/Makefile.com
↓ open down ↓ 21 lines elided ↑ open up ↑
  22   22  #
  23   23  # Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
  24   24  # Copyright (c) 2018, Joyent, Inc.
  25   25  # Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
  26   26  #
  27   27  
  28   28  RTLD=           ld.so.1
  29   29  
  30   30  AVLOBJ=         avl.o
  31   31  DTROBJ=         dtrace_data.o
  32      -TOOLOBJS=       alist.o strhash.o
       32 +SGSCOMMONOBJ=   alist.o strhash.o
  33   33  BLTOBJ=         msg.o
  34   34  ELFCAPOBJ=      elfcap.o
  35   35  OBJECTS=        $(BLTOBJ) \
  36   36                  $(AVLOBJ) \
  37   37                  $(DTROBJ) \
  38      -                $(TOOLOBJS) \
       38 +                $(SGSCOMMONOBJ) \
  39   39                  $(ELFCAPOBJ) \
  40   40                  $(P_ASOBJS)   $(P_COMOBJS)   $(P_MACHOBJS)   $(G_MACHOBJS)  \
  41   41                  $(S_ASOBJS)   $(S_COMOBJS)   $(S_MACHOBJS)   $(CP_MACHOBJS)
  42   42  
  43   43  COMOBJS=        $(P_COMOBJS)  $(S_COMOBJS)
  44   44  ASOBJS=         $(P_ASOBJS)   $(S_ASOBJS)
  45   45  MACHOBJS=       $(P_MACHOBJS) $(S_MACHOBJS)
  46   46  NOCTFOBJS=      $(ASOBJS)
  47   47  
  48   48  include         $(SRC)/lib/Makefile.lib
↓ open down ↓ 19 lines elided ↑ open up ↑
  68   68  # dlopen() functionality while in single-user mode.
  69   69  ETCLIBDIR=      $(ROOT)/etc/lib
  70   70  ETCDYNLIB=      $(RTLD:%=$(ETCLIBDIR)/%)
  71   71  
  72   72  ROOTDYNLIB=     $(RTLD:%=$(ROOTFS_LIBDIR)/%)
  73   73  ROOTDYNLIB64=   $(RTLD:%=$(ROOTFS_LIBDIR64)/%)
  74   74  
  75   75  
  76   76  FILEMODE =      755
  77   77  
  78      -CPPFLAGS +=     -I$(SRCBASE)/lib/libc/inc \
  79      -                -I$(SRCBASE)/uts/common/krtld \
  80      -                -I$(SRCBASE)/uts/$(PLAT) \
  81      -                -I$(SRCBASE)/uts/$(PLAT)/krtld \
       78 +CPPFLAGS +=     -I$(SRC)/lib/libc/inc \
       79 +                -I$(SRC)/uts/common/krtld \
       80 +                -I$(SRC)/uts/$(PLAT) \
       81 +                -I$(SRC)/uts/$(PLAT)/krtld \
  82   82                  -I$(SRC)/common/sgsrtcid \
  83   83                  -I$(ELFCAP) \
  84   84                   $(CPPFEATUREMACROS)
  85   85  
  86   86  ASFLAGS=        -P -D_ASM $(CPPFLAGS)
  87   87  LDLIB =         -L ../../libld/$(MACH)
  88   88  RTLDLIB =       -L ../../librtld/$(MACH)
  89   89  
  90   90  CERRWARN +=     -_gcc=-Wno-uninitialized
  91   91  CERRWARN +=     -_gcc=-Wno-unused-variable
↓ open down ↓ 2 lines elided ↑ open up ↑
  94   94  # not linted
  95   95  SMATCH=off
  96   96  
  97   97  # These definitions require that libc be built in the same workspace
  98   98  # as the run-time linker and before the run-time linker is built.
  99   99  # This is required for the system's self-consistency in any case.
 100  100  CPICLIB =       $(VAR_RTLD_CPICLIB)
 101  101  CPICLIB64 =     $(VAR_RTLD_CPICLIB64)
 102  102  CLIB =          -lc_pic
 103  103  
 104      -LDLIBS +=       $(CONVLIBDIR) $(CONV_LIB) \
      104 +LDLIBS +=       $(CONVLIBDIR) -lconv \
 105  105                  $(CPICLIB) $(CLIB) \
 106      -                $(LDDBGLIBDIR) $(LDDBG_LIB) \
      106 +                $(LDDBGLIBDIR) -llddbg \
 107  107                  $(RTLDLIB) -lrtld \
 108      -                $(LDLIB) $(LD_LIB)
      108 +                $(LDLIB) -lld
 109  109  
 110  110  DYNFLAGS +=     -i -e _rt_boot $(VERSREF) $(ZNODLOPEN) \
 111  111                  $(ZINTERPOSE) -zdtrace=dtrace_data '-R$$ORIGIN'
 112  112  
 113  113  BUILD.s=        $(AS) $(ASFLAGS) $< -o $@
 114  114  
 115  115  BLTDEFS=        msg.h
 116  116  BLTDATA=        msg.c
 117  117  BLTMESG=        $(SGSMSGDIR)/rtld
 118  118  
↓ open down ↓ 12 lines elided ↑ open up ↑
 131  131  SGSMSGTARG=     $(SGSMSGCOM)
 132  132  SGSMSGALL=      $(SGSMSGCOM) $(SGSMSG32) $(SGSMSG64) \
 133  133                  $(SGSMSGSPARC) $(SGSMSGSPARC32) $(SGSMSGSPARC64) \
 134  134                  $(SGSMSGINTEL) $(SGSMSGINTEL32) $(SGSMSGINTEL64)
 135  135  
 136  136  SGSMSGFLAGS1=   $(SGSMSGFLAGS) -m $(BLTMESG)
 137  137  SGSMSGFLAGS2=   $(SGSMSGFLAGS) -h $(BLTDEFS) -d $(BLTDATA) -n rtld_msg
 138  138  
 139  139  SRCS=           $(AVLOBJ:%.o=$(VAR_AVLDIR)/%.c) \
 140  140                  $(DTROBJ:%.o=$(VAR_DTRDIR)/%.c) \
 141      -                $(TOOLOBJS:%.o=$(SGSTOOLS)/common/%.c) \
      141 +                $(SGSCOMMONOBJ:%.o=$(SGSCOMMON)/%.c) \
 142  142                  $(COMOBJS:%.o=../common/%.c)  $(MACHOBJS:%.o=%.c) $(BLTDATA) \
 143      -                $(G_MACHOBJS:%.o=$(SRCBASE)/uts/$(PLAT)/krtld/%.c) \
      143 +                $(G_MACHOBJS:%.o=$(SRC)/uts/$(PLAT)/krtld/%.c) \
 144  144                  $(CP_MACHOBJS:%.o=../$(MACH)/%.c) \
 145  145                  $(ASOBJS:%.o=%.s)
 146  146  
 147  147  CLEANFILES +=   $(CRTS) $(BLTFILES)
 148  148  CLOBBERFILES += $(RTLD)
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX