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/lib/libnsl/Makefile.com
          +++ new/usr/src/lib/libnsl/Makefile.com
↓ open down ↓ 181 lines elided ↑ open up ↑
 182  182                  algs.o netselect.o
 183  183  BIGPICS =       $(GOTHOGS:%=pics/%)
 184  184  $(BIGPICS) :=   sparc_C_PICFLAGS = $(C_BIGPICFLAGS)
 185  185  $(BIGPICS) :=   i386_C_PICFLAGS = $(C_BIGPICFLAGS)
 186  186  
 187  187  # Compile C++ code without exceptions to avoid a dependence on libC.
 188  188  NOEXCEPTIONS= -noex
 189  189  CCFLAGS += $(NOEXCEPTIONS)
 190  190  CCFLAGS64 += $(NOEXCEPTIONS)
 191  191  
 192      -CPPFLAGS +=     -I$(SRC)/lib/common/inc -I$(SRC)/lib/libnsl/include -D_REENTRANT
      192 +CPPFLAGS +=     -I$(SRC)/lib/libnsl/include -D_REENTRANT
 193  193  CPPFLAGS +=     -I$(SRC)/lib/libnsl/dial
 194  194  
 195  195  CFLAGS +=       $(CCVERBOSE)
 196  196  
 197  197  # Make string literals read-only to save memory.
 198  198  CFLAGS +=       $(XSTRCONST)
 199  199  CFLAGS64 +=     $(XSTRCONST)
 200  200  CCFLAGS +=      -_CC=-features=conststrings
 201  201  CCFLAGS64 +=    -_CC=-features=conststrings
 202  202  
↓ open down ↓ 41 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX