6799141: Build with --hash-style=both so that binaries can work on SuSE 10
authorohair
Sat, 31 Jan 2009 17:19:42 -0800
changeset 2102 4a1023ae7252
parent 1795 5843778bda89
child 2103 1c96ff6b4fc7
child 2115 28000d78abfa
6799141: Build with --hash-style=both so that binaries can work on SuSE 10 Reviewed-by: tbell
hotspot/make/linux/makefiles/gcc.make
--- a/hotspot/make/linux/makefiles/gcc.make	Wed Jul 05 16:45:38 2017 +0200
+++ b/hotspot/make/linux/makefiles/gcc.make	Sat Jan 31 17:19:42 2009 -0800
@@ -131,6 +131,14 @@
 # Enable linker optimization
 LFLAGS += -Xlinker -O1
 
+# If this is a --hash-style=gnu system, use --hash-style=both
+#   The gnu .hash section won't work on some Linux systems like SuSE 10.
+_HAS_HASH_STYLE_GNU:=$(shell $(CC) -dumpspecs | grep -- '--hash-style=gnu')
+ifneq ($(_HAS_HASH_STYLE_GNU),)
+  LDFLAGS_HASH_STYLE = -Wl,--hash-style=both
+endif
+LFLAGS += $(LDFLAGS_HASH_STYLE)
+
 # Use $(MAPFLAG:FILENAME=real_file_name) to specify a map file.
 MAPFLAG = -Xlinker --version-script=FILENAME