Print this page
native tools must reliably use a native adjunct, even if that's inconvenient
While it is perhaps convenient for native tools to use updated versions
of certain things like libxml it is imperative that those versions are
_also_ build for the build machine.  Thus they need to be in the native
adjunct (even if that native adjunct is thus not /).
Fix the native adjunct to be rooted similarly to the adjunct proto (that
is, at /), and fix SMF to use it correctly

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/svc/svccfg/Makefile
          +++ new/usr/src/cmd/svc/svccfg/Makefile
↓ open down ↓ 62 lines elided ↑ open up ↑
  63   63  $(NATIVE_BUILD)PROG = $(MYPROG:%=%-native)
  64   64  $(NATIVE_BUILD)OBJS = $(MYOBJS:%.o=%-native.o)
  65   65  
  66   66  # svccfg has a name clash with main() and libl.so.1.  However, svccfg must
  67   67  # still export a number of "yy*" (libl) interfaces.  Reduce all other symbols
  68   68  # to local scope.
  69   69  MAPFILES +=     $(MAPFILE.LEX) $(MAPFILE.NGB)
  70   70  MAPOPTS =       $(MAPFILES:%=-M%)
  71   71  
  72   72  MYCPPFLAGS =    -I ../common -I$(ADJUNCT_PROTO)/usr/include/libxml2
       73 +$(NATIVE_BUILD)MYCPPFLAGS =     -I ../common \
       74 +                -I$(NATIVE_ADJUNCT)/usr/include/libxml2
  73   75  CPPFLAGS +=     $(MYCPPFLAGS)
  74   76  LDFLAGS +=      $(MAPOPTS)
  75   77  
  76   78  CERRWARN +=     -_gcc=-Wno-unused-label
  77   79  CERRWARN +=     -_gcc=-Wno-implicit-function-declaration
  78   80  CERRWARN +=     -_gcc=-Wno-switch
  79   81  CERRWARN +=     -_gcc=-Wno-uninitialized
  80   82  CERRWARN +=     -_gcc=-Wno-unused-variable
  81   83  CERRWARN +=     -_gcc=-Wno-parentheses
  82   84  
↓ open down ↓ 23 lines elided ↑ open up ↑
 106  108  $(NATIVE_BUILD)CPPFLAGS = \
 107  109          -DNATIVE_BUILD \
 108  110          $(MYCPPFLAGS) \
 109  111          -I$(LIBSCF)/inc \
 110  112          -I$(LIBTECLA) \
 111  113          -I$(LIBUUTIL)/common
 112  114  $(NATIVE_BUILD)LDFLAGS =
 113  115  $(NATIVE_BUILD)LDLIBS = \
 114  116          -L$(LIBUUTIL)/native -R $(LIBUUTIL)/native \
 115  117          -L$(LIBSCF)/native -R $(LIBSCF)/native \
 116      -        -L$(ADJUNCT_PROTO)/usr/lib -R$(ADJUNCT_PROTO)/usr/lib \
      118 +        -L$(NATIVE_ADJUNCT)/usr/lib -R$(NATIVE_ADJUNCT)/usr/lib \
 117  119          $(SVCCFG_EXTRA_LIBS)
 118  120  
 119  121  svccfg_lex.o svccfg_grammar.o := CCVERBOSE =
 120  122  
 121  123  svccfg_help.po := XGETFLAGS =   -a
 122  124  
 123  125  .KEEP_STATE:
 124  126  .PARALLEL: $(OBJS) $(LNTS)
 125  127  
 126  128  all debug: $(PROG)
↓ open down ↓ 50 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX