Print this page
9884 cw(1) should use -fpic rather than -Kpic

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libbc/sparc/Makefile
          +++ new/usr/src/lib/libbc/sparc/Makefile
↓ open down ↓ 36 lines elided ↑ open up ↑
  37   37  ECHO=   echo
  38   38  
  39   39  # objects are grouped by source directory.
  40   40  
  41   41  COMPATCOM= \
  42   42  gtty.o      lockf.o     pause.o     stty.o      tell.o      ulimit.o \
  43   43  utime.o
  44   44  
  45   45  COMPAT4.1=\
  46   46  ftime.o     nice.o      rand.o      vlimit.o    vtimes.o    getpw.o times.o
  47      - 
       47 +
  48   48  COMPATSYS5=\
  49   49  nice.o      rand.o      getpw.o     times.o
  50   50  
  51   51  CRTSPARC =\
  52   52  _ftou.o      misalign.o  ptr_call.o \
  53   53  start_float.o \
  54   54  alloc_pbuf.o mon.o muldiv.o
  55   55  
  56   56  GENCOM=\
  57   57  _crypt.o _nlist.o _perror.o _psignal.o a64l.o abs.o alarm.o\
↓ open down ↓ 32 lines elided ↑ open up ↑
  90   90  _base_S.o _base_il.o _base_sup.o _big_power.o _small_power.o \
  91   91  _sprintf_sup.o _times_power.o qeconvert.o \
  92   92  _Q_neg.o _Q_add.o _Q_sub.o _Q_mul.o _Q_div.o _Q_cmp.o \
  93   93  _Q_cmpe.o _Q_stoq.o _Q_dtoq.o _Q_itoq.o _Q_utoq.o _Q_qtos.o _Q_qtod.o \
  94   94  _Q_qtoi.o _Q_qtou.o _Q_sqrt.o _Qfaddsub.o _Qfcompare.o _Qfdiv.o \
  95   95  _Qfmul.o _Qfpack.o _Qfunpack.o _Qfutility.o _Q_fcc.o _Q_get_rp_rd.o \
  96   96  calloc.o malloc.o \
  97   97  getpass.o localtime.o ttyslot.o
  98   98  
  99   99  GENCOMSPARC=\
 100      -alloca.o   ffs.o insque.o    remque.o    isinf.o     base_conv.o 
      100 +alloca.o   ffs.o insque.o    remque.o    isinf.o     base_conv.o
 101  101  
 102  102  GEN4.2=\
 103  103  nlist.o     timezone.o  sleep.o  system.o
 104  104  
 105  105  GENSYS5=\
 106  106  assert.o    nlist.o     sgetl.o    sleep.o      sputl.o     system.o \
 107      -sighold.o   
      107 +sighold.o
 108  108  
 109  109  STDIOCOM=\
 110  110  clrerr.o    ctermid.o   cuserid.o   doprnt.o    doscan.o    fdopen.o \
 111  111  feof.o      ferror.o    fgetc.o     fgets.o     fileno.o    findiop.o \
 112  112  fputc.o     fputs.o     fread.o     fseek.o     ftell.o \
 113  113  fwrite.o    getc.o      getchar.o   gets.o      getw.o      iob.o \
 114  114  putc.o      putchar.o   puts.o      putw.o      remove.o \
 115  115  rew.o       scanf.o     setbuffer.o setvbuf.o   tmpnam.o    tempnam.o \
 116  116  tmpfile.o   ungetc.o
 117  117  
↓ open down ↓ 25 lines elided ↑ open up ↑
 143  143  getegid.o   geteuid.o   getppid.o   mmap.o      pipe.o      putmsg.o \
 144  144  sbrk.o      _syscall.o  getmsg.o    _read.o     _write.o \
 145  145  _readv.o    _writev.o   sendsig.o
 146  146  
 147  147  SYS4.2=\
 148  148  access.o    chdir.o     chmod.o     chown.o     chroot.o    \
 149  149  creat.o     execve.o    getpgrp.o   link.o      mkdir.o  \
 150  150  mknod.o     open.o      readlink.o  rename.o    rmdir.o  \
 151  151  setpgrp.o   stat.o      symlink.o   truncate.o  unlink.o     \
 152  152  statfs.o    fcntl.o     read.o      write.o     readv.o \
 153      -writev.o    setjmp.o    mount.o 
      153 +writev.o    setjmp.o    mount.o
 154  154  
 155  155  SYS4.2SPARC=\
 156  156  getgroups.o setgroups.o
 157  157  
 158  158  SYSSYS5=\
 159  159  access.o    chdir.o     chmod.o     chown.o     chroot.o \
 160  160  creat.o     execve.o    getgroups.o getpgrp.o   link.o \
 161  161  mkdir.o     mknod.o     open.o      readlink.o  rename.o \
 162  162  rmdir.o     setgroups.o setpgrp.o   stat.o      statfs.o \
 163  163  stime.o     symlink.o   truncate.o  unlink.o    fcntl.o \
↓ open down ↓ 169 lines elided ↑ open up ↑
 333  333  CERRWARN += -_gcc=-Wno-parentheses
 334  334  CERRWARN += -_gcc=-Wno-uninitialized
 335  335  CERRWARN += -_gcc=-Wno-unused
 336  336  CERRWARN += -_gcc=-Wno-switch
 337  337  CERRWARN += -_gcc=-Wno-address
 338  338  
 339  339  # SONAME is used by DYNFLAGS
 340  340  $(DYNLIB4X) :=  SONAME = $(DYNLIB4X)
 341  341  $(DYNLIBS5) :=  SONAME = $(DYNLIBS5)
 342  342  
 343      -pics/%.o:= ASFLAGS += -K pic -DPIC
 344      -pics/%.o:= CPPFLAGS += -K pic -DPIC
 345      -s5pics/%.o:= ASFLAGS += -K pic -DPIC
      343 +pics/%.o:= ASFLAGS += $(AS_PICFLAGS) -DPIC
      344 +pics/%.o:= CPPFLAGS += $(C_PICFLAGS) -DPIC
      345 +s5pics/%.o:= ASFLAGS += $(AS_PICFLAGS) -DPIC
 346  346  DYNFLAGS += $(ZINTERPOSE)
 347  347  
 348  348  BUILD.s=  $(AS) $(ASFLAGS) $< -o $@
 349  349  
 350  350  # libbc method of building an archive
 351  351  BUILD.AR= $(RM) $@ ; \
 352  352          $(AR) q $@ $(OBJECTS:%=$(DIR)/%)
 353  353  
 354  354  # the TXTS macro is used for NSE bootstrapping.
 355      -TXTS=   inc/SYS.h inc/PIC.h inc/machine/asm_linkage.h 
      355 +TXTS=   inc/SYS.h inc/PIC.h inc/machine/asm_linkage.h
 356  356  
 357  357  LIBS = $(DYNLIB4X) $(DYNLIBS5)
 358  358  
 359  359  OBJECTS= $(COMPATCOM) $(COMPAT4.1) $(CRTSPARC) $(GENCOM) \
 360  360  $(GENCOMSPARC) $(GEN4.2) $(STDIOCOM) $(STDIO4.2) \
 361  361  $(INET) $(NET) $(NETSPARC) $(YP) \
 362      -$(SYSCOM) $(SYSCOMSPARC) $(SYS4.2) 
      362 +$(SYSCOM) $(SYSCOMSPARC) $(SYS4.2)
 363  363  
 364  364  #
 365  365  # Since this library is strictly for binary compability with ancient
 366  366  # applications, we deactivate CTF to avoid kicking up dust.
 367  367  #
 368  368  CTFCONVERT_POST = :
 369  369  CTFMERGE_LIB = :
 370  370  
 371  371  S5OBJECTS= $(COMPATCOM) $(COMPATSYS5) $(CRTSPARC) $(GENCOM) \
 372  372  $(GENCOMSPARC) $(GENSYS5) $(STDIOCOM) $(STDIOSYS5) \
↓ open down ↓ 1 lines elided ↑ open up ↑
 374  374  $(INET) $(NET) $(NETSPARC) $(YP)
 375  375  
 376  376  S5PICOBJS=      $(S5OBJECTS:%=s5pics/%)
 377  377  
 378  378  CLEANFILES= ../libc/yp/ypupdate_prot.c ../inc/include/rpcsvc/ypupdate_prot.h \
 379  379          ../libc/compat/sys5/epoch.h \
 380  380          $(S5PICOBJS)
 381  381  CLOBBERFILES= ../libc/compat/sys5/mkepoch
 382  382  
 383  383  # conditional assignments
 384      -s5pics/%.o:= CPPFLAGS = -Dsparc -DS5EMUL -K pic -DPIC -I. -Iinc \
      384 +s5pics/%.o:= CPPFLAGS = -Dsparc -DS5EMUL $(C_PICFLAGS) -DPIC -I. -Iinc \
 385  385          -I../inc/5include -I../inc/include -I../inc/include/sys \
 386  386          $(CPPFLAGS.master)
 387  387  
 388  388  s5pics/%.o := CFLAGS += -xregs=no%appl
 389  389  pics/%.o := CFLAGS += -xregs=no%appl
 390  390  
 391  391  $(DYNLIB4X):= DIR = pics
 392  392  $(DYNLIBS5):= DIR = s5pics
 393  393  
 394  394  .KEEP_STATE:
↓ open down ↓ 12 lines elided ↑ open up ↑
 407  407          $(POST_PROCESS_SO)
 408  408  
 409  409  # include common library targets
 410  410  include ../../Makefile.targ
 411  411  
 412  412  s5pics:
 413  413          -@mkdir -p $@
 414  414  
 415  415  # special cases
 416  416  PSEUDO_POBJS= $(PSEUDO_SRCS:%.s=pics/%.o)
 417      -PSEUDO_PS5OBJS= $(PSEUDO_SRCS:%.s=s5pics/%.o) 
      417 +PSEUDO_PS5OBJS= $(PSEUDO_SRCS:%.s=s5pics/%.o)
 418  418  
 419  419  $(PSEUDO_POBJS) $(PSEUDO_PS5OBJS):
 420  420          @(echo '#include "SYS.h"'; \
 421  421          echo '  SYSCALL($(@F:.o=))'; \
 422  422          echo '  RET'; \
 423  423          echo '  SET_SIZE($(@F:.o=))') >  tmp.$(@F:.o=).s
 424  424          $(AS) $(ASFLAGS) -o $@ tmp.$(@F:.o=).s
 425  425          $(POST_PROCESS_O)
 426  426          @$(RM) tmp.$(@F:.o=).s
 427  427  
↓ open down ↓ 16 lines elided ↑ open up ↑
 444  444  # building ypupdated it should look here too, but doesn't at the moment.
 445  445  #
 446  446  # It would be nice to use a ".x.h" rule for this, but that causes problems.
 447  447  #
 448  448  pics/yp_update.o \
 449  449  s5pics/yp_update.o : ../inc/include/rpcsvc/ypupdate_prot.h ../libc/yp/yp_update.c
 450  450          $(COMPILE.c) -o $@ ../libc/yp/yp_update.c
 451  451          $(POST_PROCESS_O)
 452  452  
 453  453  pics/ypupdate_prot.o s5pics/ypupdate_prot.o : ../inc/include/rpcsvc/ypupdate_prot.h\
 454      -                                ../libc/yp/ypupdate_prot.c 
      454 +                                ../libc/yp/ypupdate_prot.c
 455  455          $(COMPILE.c) -o $@ ../libc/yp/ypupdate_prot.c
 456  456          $(POST_PROCESS_O)
 457  457  
 458  458  ../libc/yp/ypupdate_prot.c: ../libc/yp/ypupdate_prot.x
 459  459          $(RM) $@
 460  460          $(RPCGEN) -c -o $@ ../libc/yp/ypupdate_prot.x
 461  461  
 462  462  ../libc/yp/ypupdate_prot.h: ../libc/yp/ypupdate_prot.x
 463  463          $(RM) $@ ../libc/yp/ypupdate_prot.h
 464  464          $(RPCGEN) -h -o ../libc/yp/ypupdate_prot.h ../libc/yp/ypupdate_prot.x
 465  465  
 466  466  ../inc/include/rpcsvc/ypupdate_prot.h: ../libc/yp/ypupdate_prot.h
 467  467          cp ../libc/yp/ypupdate_prot.h $@
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX