view patches/hotspot/14.0b08/icedtea-text-relocations.patch @ 1287:557ccffda8c5

2008-12-19 Omair Majid <omajid@redhat.com> * patches/hotspot/14.0b08/icedtea-text-relocations.patch: Build libjvm.so as PIC.
author Omair Majid <omajid@redhat.com>
date Fri, 19 Dec 2008 09:35:19 -0500
parents 88c957e14fdd
children
line wrap: on
line source

diff -Nru openjdk.orig/hotspot/make/linux/makefiles/gcc.make openjdk/hotspot/make/linux/makefiles/gcc.make
--- openjdk.orig/hotspot/make/linux/makefiles/gcc.make	2008-07-17 08:40:27.000000000 +0100
+++ openjdk/hotspot/make/linux/makefiles/gcc.make	2008-07-21 23:10:50.000000000 +0100
@@ -46,7 +46,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   =
--- rules.make.orig	2008-12-12 11:23:31.000000000 -0500
+++ openjdk/hotspot/make/linux/makefiles/rules.make	2008-12-12 11:32:26.000000000 -0500
@@ -138,20 +138,10 @@
 include $(GAMMADIR)/make/pic.make
 endif
 
-# The non-PIC object files are only generated for 32 bit platforms.
-ifdef LP64
 %.o: %.cpp
 	@echo Compiling $<
 	$(QUIETLY) $(REMOVE_TARGET)
 	$(QUIETLY) $(COMPILE.CC) -o $@ $< $(COMPILE_DONE)
-else
-%.o: %.cpp
-	@echo Compiling $<
-	$(QUIETLY) $(REMOVE_TARGET)
-	$(QUIETLY) $(if $(findstring $@, $(NONPIC_OBJ_FILES)), \
-	   $(subst $(VM_PICFLAG), ,$(COMPILE.CC)) -o $@ $< $(COMPILE_DONE), \
-	   $(COMPILE.CC) -o $@ $< $(COMPILE_DONE))
-endif
 
 %.o: %.s
 	@echo Assembling $<
--- rules.make.orig	2008-12-12 11:42:55.000000000 -0500
+++ openjdk/hotspot/make/solaris/makefiles/rules.make	2008-12-12 11:44:01.000000000 -0500
@@ -138,20 +138,10 @@
 include $(GAMMADIR)/make/pic.make
 endif
 
-# 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) -o $@ $< $(COMPILE_DONE)
-else
-%.o: %.cpp
-	@echo Compiling $<
-	$(QUIETLY) $(REMOVE_TARGET)
-	$(QUIETLY) $(if $(findstring $@, $(NONPIC_OBJ_FILES)), \
-         $(subst $(VM_PICFLAG), ,$(COMPILE.CC)) -o $@ $< $(COMPILE_DONE), \
-         $(COMPILE.CC) -o $@ $< $(COMPILE_DONE))
-endif
 
 %.o: %.s
 	@echo Assembling $<