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


 172 #
 173 # These files are particularly rich with references to global things.
 174 # Ordering is by number of got references per file of files that have
 175 # non-performance sensitive code in them.
 176 #
 177 # If you need to add more files and the GOT overflows with "pic" items,
 178 # then use the environment variable LD_OPTIONS=-Dgot,detail to have the
 179 # linker print out the list of GOT hogs..
 180 
 181 GOTHOGS =       dial.o print_obj.o clnt_perror.o nsl_stdio_prv.o netdir.o \
 182                 algs.o netselect.o
 183 BIGPICS =       $(GOTHOGS:%=pics/%)
 184 $(BIGPICS) :=   sparc_C_PICFLAGS = $(C_BIGPICFLAGS)
 185 $(BIGPICS) :=   i386_C_PICFLAGS = $(C_BIGPICFLAGS)
 186 
 187 # Compile C++ code without exceptions to avoid a dependence on libC.
 188 NOEXCEPTIONS= -noex
 189 CCFLAGS += $(NOEXCEPTIONS)
 190 CCFLAGS64 += $(NOEXCEPTIONS)
 191 
 192 CPPFLAGS +=     -I$(SRC)/lib/common/inc -I$(SRC)/lib/libnsl/include -D_REENTRANT
 193 CPPFLAGS +=     -I$(SRC)/lib/libnsl/dial
 194 
 195 CFLAGS +=       $(CCVERBOSE)
 196 
 197 # Make string literals read-only to save memory.
 198 CFLAGS +=       $(XSTRCONST)
 199 CFLAGS64 +=     $(XSTRCONST)
 200 CCFLAGS +=      -_CC=-features=conststrings
 201 CCFLAGS64 +=    -_CC=-features=conststrings
 202 
 203 CERRWARN +=     -_gcc=-Wno-char-subscripts
 204 CERRWARN +=     -_gcc=-Wno-parentheses
 205 CERRWARN +=     -_gcc=-Wno-uninitialized
 206 CERRWARN +=     -_gcc=-Wno-switch
 207 CERRWARN +=     -_gcc=-Wno-char-subscripts
 208 CERRWARN +=     -_gcc=-Wno-empty-body
 209 CERRWARN +=     -_gcc=-Wno-unused-variable
 210 CERRWARN +=     -_gcc=-Wno-clobbered
 211 
 212 LIBMP =         -lmp




 172 #
 173 # These files are particularly rich with references to global things.
 174 # Ordering is by number of got references per file of files that have
 175 # non-performance sensitive code in them.
 176 #
 177 # If you need to add more files and the GOT overflows with "pic" items,
 178 # then use the environment variable LD_OPTIONS=-Dgot,detail to have the
 179 # linker print out the list of GOT hogs..
 180 
 181 GOTHOGS =       dial.o print_obj.o clnt_perror.o nsl_stdio_prv.o netdir.o \
 182                 algs.o netselect.o
 183 BIGPICS =       $(GOTHOGS:%=pics/%)
 184 $(BIGPICS) :=   sparc_C_PICFLAGS = $(C_BIGPICFLAGS)
 185 $(BIGPICS) :=   i386_C_PICFLAGS = $(C_BIGPICFLAGS)
 186 
 187 # Compile C++ code without exceptions to avoid a dependence on libC.
 188 NOEXCEPTIONS= -noex
 189 CCFLAGS += $(NOEXCEPTIONS)
 190 CCFLAGS64 += $(NOEXCEPTIONS)
 191 
 192 CPPFLAGS +=     -I$(SRC)/lib/libnsl/include -D_REENTRANT
 193 CPPFLAGS +=     -I$(SRC)/lib/libnsl/dial
 194 
 195 CFLAGS +=       $(CCVERBOSE)
 196 
 197 # Make string literals read-only to save memory.
 198 CFLAGS +=       $(XSTRCONST)
 199 CFLAGS64 +=     $(XSTRCONST)
 200 CCFLAGS +=      -_CC=-features=conststrings
 201 CCFLAGS64 +=    -_CC=-features=conststrings
 202 
 203 CERRWARN +=     -_gcc=-Wno-char-subscripts
 204 CERRWARN +=     -_gcc=-Wno-parentheses
 205 CERRWARN +=     -_gcc=-Wno-uninitialized
 206 CERRWARN +=     -_gcc=-Wno-switch
 207 CERRWARN +=     -_gcc=-Wno-char-subscripts
 208 CERRWARN +=     -_gcc=-Wno-empty-body
 209 CERRWARN +=     -_gcc=-Wno-unused-variable
 210 CERRWARN +=     -_gcc=-Wno-clobbered
 211 
 212 LIBMP =         -lmp