Print this page
8609 want a position independent CRT

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libc/sparc/Makefile.com
          +++ new/usr/src/lib/libc/sparc/Makefile.com
↓ open down ↓ 1056 lines elided ↑ open up ↑
1057 1057          $(COMSYSOBJS)           \
1058 1058          $(SYSOBJS)              \
1059 1059          $(COMSYSOBJS64)         \
1060 1060          $(SYSOBJS64)            \
1061 1061          $(VALUES)
1062 1062  
1063 1063  TRACEOBJS=                      \
1064 1064          plockstat.o
1065 1065  
1066 1066  # NOTE: libc.so.1 must be linked with the minimal crti.o and crtn.o
1067      -# modules whose source is provided in the $(SRC)/lib/common directory.
     1067 +# modules whose source is provided in the $(SRC)/lib/crt directory.
1068 1068  # This must be done because otherwise the Sun C compiler would insert
1069 1069  # its own versions of these modules and those versions contain code
1070 1070  # to call out to C++ initialization functions.  Such C++ initialization
1071 1071  # functions can call back into libc before thread initialization is
1072 1072  # complete and this leads to segmentation violations and other problems.
1073 1073  # Since libc contains no C++ code, linking with the minimal crti.o and
1074 1074  # crtn.o modules is safe and avoids the problems described above.
1075 1075  OBJECTS= $(CRTI) $(MOSTOBJS) $(CRTN)
1076      -CRTSRCS= ../../common/sparc
     1076 +CRTSRCS= ../../crt/sparcv7
1077 1077  
1078 1078  # include common library definitions
1079 1079  include $(SRC)/lib/Makefile.lib
1080 1080  
1081 1081  # we need to override the default SONAME here because we might
1082 1082  # be building a variant object (still libc.so.1, but different filename)
1083 1083  SONAME = libc.so.1
1084 1084  
1085 1085  CFLAGS += $(CCVERBOSE)
1086 1086  
↓ open down ↓ 333 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX