Print this page
crt: Need a position-independent CRT for PIE
- Implement the greatest possible part of the crt1 in C
- Implement SPARC versions of the ASM sections of crt1
- Build crt1 position-independently, minor ASM updates to be position
  independent
- Implement crt1 with the hook expected by modern GCC to support
  profiling, make gcrt1 a symlink for source compatibility (older GCC
  initializes profiling at firsnt use of _mcount if necessary, so
  doesn't need the gcrt)
- Split the CRT out of developer/library/lint into a separate c-runtime package

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/env/Makefile
          +++ new/usr/src/cmd/env/Makefile
↓ open down ↓ 15 lines elided ↑ open up ↑
  16   16  # If applicable, add the following below this CDDL HEADER, with the
  17   17  # fields enclosed by brackets "[]" replaced with your own identifying
  18   18  # information: Portions Copyright [yyyy] [name of copyright owner]
  19   19  #
  20   20  # CDDL HEADER END
  21   21  #
  22   22  #
  23   23  # Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  24   24  # Use is subject to license terms.
  25   25  #
  26      -# ident "%Z%%M% %I%     %E% SMI"
  27      -#
  28   26  
  29   27  PROG= env
  30   28  XPG4PROG= env
  31   29  OBJS= env.o
  32   30  
  33   31  include ../Makefile.cmd
  34   32  
  35   33  clean $(XPG4) := OBJS += values-xpg4.o
  36   34  
  37   35  .KEEP_STATE:
  38   36  
  39   37  all: $(PROG) $(XPG4)
  40   38  
  41   39  $(PROG) $(XPG4): $$(OBJS)
  42   40          $(LINK.c) -o $@ $(OBJS) $(LDLIBS)
  43   41          $(POST_PROCESS)
  44   42  
  45   43  install: all $(ROOTPROG) $(ROOTXPG4PROG)
  46   44  
  47      -values-xpg4.o: ../../lib/common/common/values-xpg4.c
  48      -        $(COMPILE.c) -o $@ ../../lib/common/common/values-xpg4.c
       45 +values-xpg4.o: ../../lib/crt/common/values-xpg4.c
       46 +        $(COMPILE.c) -o $@ ../../lib/crt/common/values-xpg4.c
  49   47  
  50   48  clean:
  51   49          $(RM) $(OBJS)
  52   50  
  53   51  lint:   lint_PROG
  54   52  
  55   53  include ../Makefile.targ
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX