--- gcc/config/t-svr4 2018/04/24 17:51:38 1.1 +++ gcc/config/t-svr4 2018/04/24 18:27:36 1.1.1.3 @@ -1,8 +1,7 @@ -# For svr4 we build crtbegin.o and crtend.o which serve to add begin and -# end labels to the .ctors and .dtors section when we link using gcc. +# We need to use -fPIC when we are using gcc to compile the routines in +# crtstuff.c. This is only really needed when we are going to use gcc/g++ +# to produce a shared library, but since we don't know ahead of time when +# we will be doing that, we just always use -fPIC when compiling the +# routines in crtstuff.c. -EXTRA_PARTS=crtbegin.o crtend.o - -# For svr4 we run the special svr4 fixincludes script. - -FIXINCLUDES=fixinc.svr4 +CRTSTUFF_T_CFLAGS = -fPIC