changeset 2744:57f0579fbe09

6837224: libsaproc.so on linux needs version of 6799141 Reviewed-by: kvn
author never
date Mon, 04 May 2009 22:06:47 -0700
parents a15982b3cd69
children 60853c6a93b7
files hotspot/agent/src/os/linux/Makefile
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hotspot/agent/src/os/linux/Makefile	Thu Apr 30 15:57:29 2009 -0700
+++ b/hotspot/agent/src/os/linux/Makefile	Mon May 04 22:06:47 2009 -0700
@@ -60,6 +60,14 @@
   LFLAGS_LIBSA = -Xlinker --version-script=mapfile
 endif
 
+# 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_LIBSA += $(LDFLAGS_HASH_STYLE)
+
 $(LIBSA): $(OBJS) mapfile
 	if [ ! -d $(ARCH) ] ; then mkdir $(ARCH) ; fi
 	$(GCC) -shared $(LFLAGS_LIBSA) -o $(LIBSA) $(OBJS) $(LIBS)