Merge
authordholmes
Tue, 20 Dec 2016 21:45:13 +0000
changeset 42902 380b1219139f
parent 42899 b9ae8968fce6 (current diff)
parent 42901 3da41dfcadf8 (diff)
child 42903 18a38b851fee
Merge
--- a/hotspot/make/lib/CompileGtest.gmk	Tue Dec 20 11:50:40 2016 -0800
+++ b/hotspot/make/lib/CompileGtest.gmk	Tue Dec 20 21:45:13 2016 +0000
@@ -54,6 +54,13 @@
 
 # Disabling switch warning for clang because of test source.
 
+# Note: On AIX, the gtest test classes linked into the libjvm.so push the TOC
+# size beyond 64k, so we need to link with bigtoc. However, this means that
+# -qpic=large would be advisable to lessen the performance effect of bigtoc.
+# But we want to avoid imposing -qpic=large onto the regular libjvm.so, which
+# has no problem with its TOC, so do this only for object files which are
+# exclusive to the gtest libjvm.so.
+
 $(eval $(call SetupNativeCompilation, BUILD_GTEST_LIBJVM, \
     TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
     LIBRARY := jvm, \
@@ -72,6 +79,7 @@
     CFLAGS_windows := -EHsc, \
     CFLAGS_solaris := -DGTEST_HAS_EXCEPTIONS=0 -library=stlport4, \
     CFLAGS_macosx := -DGTEST_OS_MAC=1, \
+    CFLAGS_aix := -qpic=large, \
     CFLAGS_DEBUG_SYMBOLS := $(JVM_CFLAGS_SYMBOLS), \
     CXXFLAGS_DEBUG_SYMBOLS := $(JVM_CFLAGS_SYMBOLS), \
     DISABLED_WARNINGS_gcc := undef, \
@@ -80,6 +88,7 @@
     DISABLED_WARNINGS_solstudio := identexpected, \
     LDFLAGS := $(JVM_LDFLAGS), \
     LDFLAGS_solaris := -library=stlport4 $(call SET_SHARED_LIBRARY_ORIGIN), \
+    LDFLAGS_aix := -bbigtoc, \
     LIBS := $(JVM_LIBS), \
     OPTIMIZATION := $(JVM_OPTIMIZATION), \
     MAPFILE := $(GTEST_JVM_MAPFILE), \
--- a/hotspot/test/native/utilities/test_linkedlist.cpp	Tue Dec 20 11:50:40 2016 -0800
+++ b/hotspot/test/native/utilities/test_linkedlist.cpp	Tue Dec 20 21:45:13 2016 +0000
@@ -74,7 +74,7 @@
   ASSERT_EQ(six.value(), i->value()) << "Should be 6";
 
   i = ll.find(three);
-  ASSERT_EQ(NULL, i) << "Not in the list";
+  ASSERT_TRUE(i == NULL) << "Not in the list";
 
   LinkedListNode<Integer>* node = ll.find_node(six);
   ASSERT_TRUE(node != NULL) << "6 is in the list";