Print this page
8609 want a position independent CRT

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libc/amd64/Makefile
          +++ new/usr/src/lib/libc/amd64/Makefile
↓ open down ↓ 983 lines elided ↑ open up ↑
 984  984          $(COMSYSOBJS)           \
 985  985          $(SYSOBJS)              \
 986  986          $(COMSYSOBJS64)         \
 987  987          $(SYSOBJS64)            \
 988  988          $(VALUES)
 989  989  
 990  990  TRACEOBJS=                      \
 991  991          plockstat.o
 992  992  
 993  993  # NOTE: libc.so.1 must be linked with the minimal crti.o and crtn.o
 994      -# modules whose source is provided in the $(SRC)/lib/common directory.
      994 +# modules whose source is provided in the $(SRC)/lib/crt directory.
 995  995  # This must be done because otherwise the Sun C compiler would insert
 996  996  # its own versions of these modules and those versions contain code
 997  997  # to call out to C++ initialization functions.  Such C++ initialization
 998  998  # functions can call back into libc before thread initialization is
 999  999  # complete and this leads to segmentation violations and other problems.
1000 1000  # Since libc contains no C++ code, linking with the minimal crti.o and
1001 1001  # crtn.o modules is safe and avoids the problems described above.
1002 1002  OBJECTS= $(CRTI) $(MOSTOBJS) $(CRTN)
1003      -CRTSRCS= ../../common/amd64
     1003 +CRTSRCS= ../../crt/amd64
1004 1004  
1005 1005  # include common library definitions
1006 1006  include ../../Makefile.lib
1007 1007  include ../../Makefile.lib.64
1008 1008  
1009 1009  CFLAGS64 += $(CTF_FLAGS)
1010 1010  
1011 1011  # This is necessary to avoid problems with calling _ex_unwind().
1012 1012  # We probably don't want any inlining anyway.
1013 1013  CFLAGS64 += -xinline=
↓ open down ↓ 255 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX