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/libld/Makefile.com
          +++ new/usr/src/cmd/sgs/libld/Makefile.com
↓ open down ↓ 39 lines elided ↑ open up ↑
  40   40                  unwind32.o      version32.o     wrap32.o
  41   41  
  42   42  COMOBJS64 =     args64.o        entry64.o       exit64.o        groups64.o \
  43   43                  ldentry64.o     ldlibs64.o      ldmachdep64.o   ldmain64.o \
  44   44                  libs64.o        files64.o       map64.o         map_core64.o \
  45   45                  map_support64.o map_v264.o      order64.o       outfile64.o \
  46   46                  place64.o       relocate64.o    resolve64.o     sections64.o \
  47   47                  sunwmove64.o    support64.o     syms64.o        update64.o \
  48   48                  unwind64.o      version64.o     wrap64.o
  49   49  
  50      -TOOLOBJS =      alist.o         assfail.o       findprime.o     string_table.o \
       50 +SGSCOMMONOBJ =  alist.o         assfail.o       findprime.o     string_table.o \
  51   51                  strhash.o
  52   52  AVLOBJ =        avl.o
  53   53  
  54   54  # Relocation engine objects.
  55   55  G_MACHOBJS32 =  doreloc_sparc_32.o doreloc_x86_32.o
  56   56  G_MACHOBJS64 =  doreloc_sparc_64.o doreloc_x86_64.o
  57   57  
  58   58  # Target specific objects (sparc/sparcv9)
  59   59  L_SPARC_MACHOBJS32 =    machrel.sparc32.o       machsym.sparc32.o
  60   60  L_SPARC_MACHOBJS64 =    machrel.sparc64.o       machsym.sparc64.o
  61   61  
  62   62  # Target specific objects (i386/amd64)
  63      -E_X86_TOOLOBJS =        leb128.o
       63 +E_X86_COMMONOBJ =       leb128.o
  64   64  L_X86_MACHOBJS32 =      machrel.intel32.o
  65   65  L_X86_MACHOBJS64 =      machrel.amd64.o
  66   66  
  67   67  # All target specific objects rolled together
  68      -E_TOOLOBJS =    $(E_SPARC_TOOLOBJS) \
  69      -        $(E_X86_TOOLOBJS)
       68 +E_COMMONOBJ =   $(E_SPARC_COMMONOBJ) \
       69 +        $(E_X86_COMMONOBJ)
  70   70  L_MACHOBJS32 =  $(L_SPARC_MACHOBJS32) \
  71   71          $(L_X86_MACHOBJS32)
  72   72  L_MACHOBJS64 =  $(L_SPARC_MACHOBJS64) \
  73   73          $(L_X86_MACHOBJS64)
  74   74  
  75   75  
  76   76  BLTOBJ =        msg.o
  77   77  ELFCAPOBJ =     elfcap.o
  78   78  
  79   79  OBJECTS =       $(BLTOBJ) $(G_MACHOBJS32) $(G_MACHOBJS64) \
  80   80                  $(L_MACHOBJS32) $(L_MACHOBJS64) \
  81   81                  $(COMOBJS) $(COMOBJS32) $(COMOBJS64) \
  82      -                $(TOOLOBJS) $(E_TOOLOBJS) $(AVLOBJ) $(ELFCAPOBJ)
       82 +                $(SGSCOMMONOBJ) $(E_COMMONOBJ) $(AVLOBJ) $(ELFCAPOBJ)
  83   83  
  84   84  include         $(SRC)/lib/Makefile.lib
  85   85  include         $(SRC)/cmd/sgs/Makefile.com
  86   86  
  87      -SRCDIR =        ../common
       87 +SRCDIR =        $(SGSHOME)/libld
       88 +MAPFILEDIR =    $(SRCDIR)/common
  88   89  
  89   90  CERRWARN += -_gcc=-Wno-unused-value
  90   91  CERRWARN += -_gcc=-Wno-parentheses
  91   92  CERRWARN += -_gcc=-Wno-uninitialized
  92   93  CERRWARN += -_gcc=-Wno-switch
  93   94  CERRWARN += -_gcc=-Wno-char-subscripts
  94   95  CERRWARN += -_gcc=-Wno-type-limits
  95   96  $(RELEASE_BUILD)CERRWARN += -_gcc=-Wno-unused
  96   97  
  97   98  SMOFF += no_if_block
  98   99  
  99  100  # Location of the shared relocation engines maintained under usr/src/uts.
 100  101  #
 101      -KRTLD_I386 = $(SRCBASE)/uts/$(VAR_PLAT_i386)/krtld
 102      -KRTLD_AMD64 = $(SRCBASE)/uts/$(VAR_PLAT_amd64)/krtld
 103      -KRTLD_SPARC = $(SRCBASE)/uts/$(VAR_PLAT_sparc)/krtld
      102 +KRTLD_I386 = $(SRC)/uts/$(VAR_PLAT_i386)/krtld
      103 +KRTLD_AMD64 = $(SRC)/uts/$(VAR_PLAT_amd64)/krtld
      104 +KRTLD_SPARC = $(SRC)/uts/$(VAR_PLAT_sparc)/krtld
 104  105  
 105  106  
 106      -CPPFLAGS +=     -DUSE_LIBLD_MALLOC -I$(SRCBASE)/lib/libc/inc \
 107      -                    -I$(SRCBASE)/uts/common/krtld -I$(SRCBASE)/uts/sparc \
      107 +CPPFLAGS +=     -DUSE_LIBLD_MALLOC -I$(SRC)/lib/libc/inc \
      108 +                    -I$(SRC)/uts/common/krtld -I$(SRC)/uts/sparc \
 108  109                      $(VAR_LIBLD_CPPFLAGS)
 109      -LDLIBS +=       $(CONVLIBDIR) $(CONV_LIB) $(LDDBGLIBDIR) $(LDDBG_LIB) \
      110 +LDLIBS +=       $(CONVLIBDIR) -lconv $(LDDBGLIBDIR) -llddbg \
 110  111                      $(ELFLIBDIR) -lelf $(DLLIB) -lc
 111  112  
 112      -DYNFLAGS +=     $(VERSREF) $(CC_USE_PROTO) '-R$$ORIGIN'
 113      -
 114      -native:=        DYNFLAGS        += $(CONVLIBDIR)
      113 +DYNFLAGS +=     $(VERSREF) '-R$$ORIGIN'
 115  114  
 116  115  BLTDEFS =       msg.h
 117  116  BLTDATA =       msg.c
 118  117  BLTMESG =       $(SGSMSGDIR)/libld
 119  118  
 120  119  BLTFILES =      $(BLTDEFS) $(BLTDATA) $(BLTMESG)
 121  120  
 122  121  # Due to cross linking support, every copy of libld contains every message.
 123  122  # However, we keep target specific messages in their own separate files for
 124  123  # organizational reasons.
 125  124  #
 126      -SGSMSGCOM =     ../common/libld.msg
 127      -SGSMSGSPARC =   ../common/libld.sparc.msg
 128      -SGSMSGINTEL =   ../common/libld.intel.msg
      125 +SGSMSGCOM =     $(SRCDIR)/common/libld.msg
      126 +SGSMSGSPARC =   $(SRCDIR)/common/libld.sparc.msg
      127 +SGSMSGINTEL =   $(SRCDIR)/common/libld.intel.msg
 129  128  SGSMSGTARG =    $(SGSMSGCOM) $(SGSMSGSPARC) $(SGSMSGINTEL)
 130  129  SGSMSGALL =     $(SGSMSGCOM) $(SGSMSGSPARC) $(SGSMSGINTEL)
 131  130  
 132  131  SGSMSGFLAGS1 =  $(SGSMSGFLAGS) -m $(BLTMESG)
 133  132  SGSMSGFLAGS2 =  $(SGSMSGFLAGS) -h $(BLTDEFS) -d $(BLTDATA) -n libld_msg
 134  133  
 135      -CHKSRCS =       $(SRCBASE)/uts/common/krtld/reloc.h \
 136      -                $(COMOBJS32:%32.o=../common/%.c) \
 137      -                $(L_MACHOBJS32:%32.o=../common/%.c) \
 138      -                $(L_MACHOBJS64:%64.o=../common/%.c) \
      134 +CHKSRCS =       $(SRC)/uts/common/krtld/reloc.h \
      135 +                $(COMOBJS32:%32.o=$(SRCDIR)/common/%.c) \
      136 +                $(L_MACHOBJS32:%32.o=$(SRCDIR)/common/%.c) \
      137 +                $(L_MACHOBJS64:%64.o=$(SRCDIR)/common/%.c) \
 139  138                  $(KRTLD_I386)/doreloc.c \
 140  139                  $(KRTLD_AMD64)/doreloc.c \
 141  140                  $(KRTLD_SPARC)/doreloc.c
 142  141  
 143      -LIBSRCS =       $(TOOLOBJS:%.o=$(SGSTOOLS)/common/%.c) \
 144      -                $(E_TOOLOBJS:%.o=$(SGSTOOLS)/common/%.c) \
 145      -                $(COMOBJS:%.o=../common/%.c) \
      142 +LIBSRCS =       $(SGSCOMMONOBJ:%.o=$(SGSCOMMON)/%.c) \
      143 +                $(SGSCOMMONOBJ:%.o=$(SGSCOMMON)/%.c) \
      144 +                $(COMOBJS:%.o=$(SRCDIR)/common/%.c) \
 146  145                  $(AVLOBJS:%.o=$(VAR_AVLDIR)/%.c) \
 147  146                  $(BLTDATA)
 148  147  
 149  148  CLEANFILES +=   $(BLTFILES)
 150  149  CLOBBERFILES += $(DYNLIB) $(LIBLINKS)
 151  150  
 152  151  ROOTFS_DYNLIB = $(DYNLIB:%=$(ROOTFS_LIBDIR)/%)
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX