Print this page
8609 want a position independent CRT

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libc/sparcv9/Makefile.com
          +++ new/usr/src/lib/libc/sparcv9/Makefile.com
↓ open down ↓ 996 lines elided ↑ open up ↑
 997  997          $(COMSYSOBJS)           \
 998  998          $(SYSOBJS)              \
 999  999          $(COMSYSOBJS64)         \
1000 1000          $(SYSOBJS64)            \
1001 1001          $(VALUES)
1002 1002  
1003 1003  TRACEOBJS=                      \
1004 1004          plockstat.o
1005 1005  
1006 1006  # NOTE: libc.so.1 must be linked with the minimal crti.o and crtn.o
1007      -# modules whose source is provided in the $(SRC)/lib/common directory.
     1007 +# modules whose source is provided in the $(SRC)/lib/crt directory.
1008 1008  # This must be done because otherwise the Sun C compiler would insert
1009 1009  # its own versions of these modules and those versions contain code
1010 1010  # to call out to C++ initialization functions.  Such C++ initialization
1011 1011  # functions can call back into libc before thread initialization is
1012 1012  # complete and this leads to segmentation violations and other problems.
1013 1013  # Since libc contains no C++ code, linking with the minimal crti.o and
1014 1014  # crtn.o modules is safe and avoids the problems described above.
1015 1015  OBJECTS= $(CRTI) $(MOSTOBJS) $(CRTN)
1016      -CRTSRCS= ../../common/sparcv9
     1016 +CRTSRCS= ../../crt/sparcv9
1017 1017  
1018 1018  # include common library definitions
1019 1019  include $(SRC)/lib/Makefile.lib
1020 1020  include $(SRC)/lib/Makefile.lib.64
1021 1021  
1022 1022  # we need to override the default SONAME here because we might
1023 1023  # be building a variant object (still libc.so.1, but different filename)
1024 1024  SONAME = libc.so.1
1025 1025  
1026 1026  CFLAGS64 += $(CCVERBOSE)
↓ open down ↓ 305 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX