hotspot/make/linux/makefiles/gcc.make
changeset 8106 19106a0203fb
parent 7445 57d387675180
child 8868 1bae515b806b
--- a/hotspot/make/linux/makefiles/gcc.make	Thu Jan 27 16:11:27 2011 -0800
+++ b/hotspot/make/linux/makefiles/gcc.make	Tue Feb 01 11:23:19 2011 -0500
@@ -75,6 +75,11 @@
 CFLAGS += -fno-exceptions
 CFLAGS += -D_REENTRANT
 CFLAGS += -fcheck-new
+# version 4 and above support fvisibility=hidden (matches jni_x86.h file)
+# except 4.1.2 gives pointless warnings that can't be disabled (afaik)
+ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0"
+CFLAGS += -fvisibility=hidden
+endif
 
 ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))
 ARCHFLAG/i486    = -m32 -march=i586