--- a/hotspot/make/solaris/makefiles/saproc.make Fri Apr 29 21:13:00 2011 +0400
+++ b/hotspot/make/solaris/makefiles/saproc.make Mon May 02 14:53:49 2011 -0700
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -56,6 +56,30 @@
SA_LFLAGS += -mt -xnolib -norunpath
endif
+# The libproc Pstack_iter() interface changed in Nevada-B159.
+# This logic needs to match
+# agent/src/os/solaris/proc/saproc.cpp: set_has_newer_Pstack_iter():
+# - skip SunOS 4 or older
+# - skip Solaris 10 or older
+# - skip two digit Nevada builds
+# - skip three digit Nevada builds thru 149
+# - skip Nevada builds 150-158
+SOLARIS_11_B159_OR_LATER := \
+$(shell uname -r -v \
+ | sed -n ' \
+ /^[0-3]\. /b \
+ /^5\.[0-9] /b \
+ /^5\.10 /b \
+ / snv_[0-9][0-9]$/b \
+ / snv_[01][0-4][0-9]$/b \
+ / snv_15[0-8]$/b \
+ s/.*/-DSOLARIS_11_B159_OR_LATER/p \
+ ')
+
+# Uncomment the following to simulate building on Nevada-B159 or later
+# when actually building on Nevada-B158 or earlier:
+#SOLARIS_11_B159_OR_LATER=-DSOLARIS_11_B159_OR_LATER
+
$(LIBSAPROC): $(SASRCFILES) $(SAMAPFILE)
$(QUIETLY) if [ "$(BOOT_JAVA_HOME)" = "" ]; then \
echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \
@@ -68,6 +92,7 @@
-I$(GENERATED) \
-I$(BOOT_JAVA_HOME)/include \
-I$(BOOT_JAVA_HOME)/include/$(Platform_os_family) \
+ $(SOLARIS_11_B159_OR_LATER) \
$(SASRCFILES) \
$(SA_LFLAGS) \
-o $@ \