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


 964         $(AIOOBJS)              \
 965         $(RTOBJS)               \
 966         $(SECFLAGSOBJS)         \
 967         $(TPOOLOBJS)            \
 968         $(THREADSOBJS)          \
 969         $(THREADSMACHOBJS)      \
 970         $(THREADSASMOBJS)       \
 971         $(UNICODEOBJS)          \
 972         $(UNWINDMACHOBJS)       \
 973         $(UNWINDASMOBJS)        \
 974         $(COMSYSOBJS)           \
 975         $(SYSOBJS)              \
 976         $(COMSYSOBJS64)         \
 977         $(SYSOBJS64)            \
 978         $(VALUES)
 979 
 980 TRACEOBJS=                      \
 981         plockstat.o
 982 
 983 # NOTE: libc.so.1 must be linked with the minimal crti.o and crtn.o
 984 # modules whose source is provided in the $(SRC)/lib/common directory.
 985 # This must be done because otherwise the Sun C compiler would insert
 986 # its own versions of these modules and those versions contain code
 987 # to call out to C++ initialization functions.  Such C++ initialization
 988 # functions can call back into libc before thread initialization is
 989 # complete and this leads to segmentation violations and other problems.
 990 # Since libc contains no C++ code, linking with the minimal crti.o and
 991 # crtn.o modules is safe and avoids the problems described above.
 992 OBJECTS= $(CRTI) $(MOSTOBJS) $(CRTN)
 993 CRTSRCS= ../../common/amd64
 994 
 995 # include common library definitions
 996 include ../../Makefile.lib
 997 include ../../Makefile.lib.64
 998 
 999 CFLAGS64 += $(CTF_FLAGS)
1000 
1001 # This is necessary to avoid problems with calling _ex_unwind().
1002 # We probably don't want any inlining anyway.
1003 CFLAGS64 += -xinline=
1004 
1005 CERRWARN += -_gcc=-Wno-parentheses
1006 CERRWARN += -_gcc=-Wno-switch
1007 CERRWARN += -_gcc=-Wno-uninitialized
1008 CERRWARN += -_gcc=-Wno-unused-value
1009 CERRWARN += -_gcc=-Wno-unused-label
1010 CERRWARN += -_gcc=-Wno-unused-variable
1011 CERRWARN += -_gcc=-Wno-type-limits
1012 CERRWARN += -_gcc=-Wno-char-subscripts
1013 CERRWARN += -_gcc=-Wno-clobbered




 964         $(AIOOBJS)              \
 965         $(RTOBJS)               \
 966         $(SECFLAGSOBJS)         \
 967         $(TPOOLOBJS)            \
 968         $(THREADSOBJS)          \
 969         $(THREADSMACHOBJS)      \
 970         $(THREADSASMOBJS)       \
 971         $(UNICODEOBJS)          \
 972         $(UNWINDMACHOBJS)       \
 973         $(UNWINDASMOBJS)        \
 974         $(COMSYSOBJS)           \
 975         $(SYSOBJS)              \
 976         $(COMSYSOBJS64)         \
 977         $(SYSOBJS64)            \
 978         $(VALUES)
 979 
 980 TRACEOBJS=                      \
 981         plockstat.o
 982 
 983 # NOTE: libc.so.1 must be linked with the minimal crti.o and crtn.o
 984 # modules whose source is provided in the $(SRC)/lib/crt directory.
 985 # This must be done because otherwise the Sun C compiler would insert
 986 # its own versions of these modules and those versions contain code
 987 # to call out to C++ initialization functions.  Such C++ initialization
 988 # functions can call back into libc before thread initialization is
 989 # complete and this leads to segmentation violations and other problems.
 990 # Since libc contains no C++ code, linking with the minimal crti.o and
 991 # crtn.o modules is safe and avoids the problems described above.
 992 OBJECTS= $(CRTI) $(MOSTOBJS) $(CRTN)
 993 CRTSRCS= ../../crt/amd64
 994 
 995 # include common library definitions
 996 include ../../Makefile.lib
 997 include ../../Makefile.lib.64
 998 
 999 CFLAGS64 += $(CTF_FLAGS)
1000 
1001 # This is necessary to avoid problems with calling _ex_unwind().
1002 # We probably don't want any inlining anyway.
1003 CFLAGS64 += -xinline=
1004 
1005 CERRWARN += -_gcc=-Wno-parentheses
1006 CERRWARN += -_gcc=-Wno-switch
1007 CERRWARN += -_gcc=-Wno-uninitialized
1008 CERRWARN += -_gcc=-Wno-unused-value
1009 CERRWARN += -_gcc=-Wno-unused-label
1010 CERRWARN += -_gcc=-Wno-unused-variable
1011 CERRWARN += -_gcc=-Wno-type-limits
1012 CERRWARN += -_gcc=-Wno-char-subscripts
1013 CERRWARN += -_gcc=-Wno-clobbered