Mercurial > hg > release > icedtea7-forest-2.0 > hotspot
changeset 2643:8e3defb263a9
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.
author | andrew |
---|---|
date | Fri, 29 Jul 2011 01:13:58 +0100 |
parents | d438a5890756 |
children | bc02ddf3890b |
files | make/linux/makefiles/gcc.make make/linux/makefiles/rules.make make/solaris/makefiles/rules.make |
diffstat | 3 files changed, 4 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- 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 =
--- 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 $<
--- 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 $<