# HG changeset patch # User andrew # Date 1311898438 -3600 # Node ID 8e3defb263a995138ebf371b3c2fdada5f7bb9f8 # Parent d438a589075633f30bd04717e1e69f08dccc31c6 Pass appropriate PIC/pic flag depending on architecture. Added to IcedTea on 2007-06-18 by Thomas Fitzsimmons, and extended by Gary Benson and Matthias Klose. diff -r d438a5890756 -r 8e3defb263a9 make/linux/makefiles/gcc.make --- a/make/linux/makefiles/gcc.make Wed Jul 27 01:27:27 2011 +0100 +++ b/make/linux/makefiles/gcc.make Fri Jul 29 01:13:58 2011 +0100 @@ -62,7 +62,11 @@ # Compiler flags # position-independent code +ifneq ($(filter parisc ppc ppc64 s390 s390x sparc sparc64 sparcv9,$(ZERO_LIBARCH)),) PICFLAG = -fPIC +else +PICFLAG = -fpic +endif VM_PICFLAG/LIBJVM = $(PICFLAG) VM_PICFLAG/AOUT = diff -r d438a5890756 -r 8e3defb263a9 make/linux/makefiles/rules.make --- a/make/linux/makefiles/rules.make Wed Jul 27 01:27:27 2011 +0100 +++ b/make/linux/makefiles/rules.make Fri Jul 29 01:13:58 2011 +0100 @@ -156,20 +156,10 @@ include $(GAMMADIR)/make/altsrc.make -# The non-PIC object files are only generated for 32 bit platforms. -ifdef LP64 %.o: %.cpp @echo Compiling $< $(QUIETLY) $(REMOVE_TARGET) $(QUIETLY) $(COMPILE.CC) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE) -else -%.o: %.cpp - @echo Compiling $< - $(QUIETLY) $(REMOVE_TARGET) - $(QUIETLY) $(if $(findstring $@, $(NONPIC_OBJ_FILES)), \ - $(subst $(VM_PICFLAG), ,$(COMPILE.CC)) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE), \ - $(COMPILE.CC) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE)) -endif %.o: %.s @echo Assembling $< diff -r d438a5890756 -r 8e3defb263a9 make/solaris/makefiles/rules.make --- a/make/solaris/makefiles/rules.make Wed Jul 27 01:27:27 2011 +0100 +++ b/make/solaris/makefiles/rules.make Fri Jul 29 01:13:58 2011 +0100 @@ -148,20 +148,10 @@ include $(GAMMADIR)/make/altsrc.make -# Sun compiler for 64 bit Solaris does not support building non-PIC object files. -ifdef LP64 %.o: %.cpp @echo Compiling $< $(QUIETLY) $(REMOVE_TARGET) $(QUIETLY) $(COMPILE.CC) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE) -else -%.o: %.cpp - @echo Compiling $< - $(QUIETLY) $(REMOVE_TARGET) - $(QUIETLY) $(if $(findstring $@, $(NONPIC_OBJ_FILES)), \ - $(subst $(VM_PICFLAG), ,$(COMPILE.CC)) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE), \ - $(COMPILE.CC) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE)) -endif %.o: %.s @echo Assembling $<