--- gcc/config/sparc/t-sol2 2018/04/24 18:15:17 1.1.1.2 +++ gcc/config/sparc/t-sol2 2018/04/24 18:29:05 1.1.1.4 @@ -1,12 +1,8 @@ -# we need startup files for solaris, since we don't get them with the system - -EXTRA_PARTS=crt1.o crti.o crtn.o gmon.o crtbegin.o crtend.o - # we need to supply our own assembly versions of libgcc1.c files, # since the user may not have native 'cc' available -LIBGCC1 = libgcc1.null -CROSS_LIBGCC1 = libgcc1.null +LIBGCC1 = +CROSS_LIBGCC1 = # gmon build rule: gmon.o: $(srcdir)/config/sparc/gmon-sol2.c $(GCC_PASSES) $(CONFIG_H) @@ -20,3 +16,15 @@ crti.o: $(srcdir)/config/sparc/sol2-ci.a $(AS) -o crti.o $(srcdir)/config/sparc/sol2-ci.asm crtn.o: $(srcdir)/config/sparc/sol2-cn.asm $(AS) -o crtn.o $(srcdir)/config/sparc/sol2-cn.asm + +# 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. + +# Since the GNU assembler doesn't support PIC yet, we need to force gcc to +# use the native assembler when building crtstuff. If we're a +# cross-compiler, just give up on using PIC. + +CRTSTUFF_T_CFLAGS = `if [ -z "$(CROSS)" ]; then echo -fPIC -B/usr/ccs/bin/; fi`