8160630: libjimage.so and others should link statically to libgcc
Reviewed-by: ihse, tbell
--- a/hotspot/make/lib/CompileGtest.gmk Thu Sep 29 17:23:47 2016 +0000
+++ b/hotspot/make/lib/CompileGtest.gmk Fri Sep 30 09:06:02 2016 +0200
@@ -55,7 +55,7 @@
# Disabling switch warning for clang because of test source.
$(eval $(call SetupNativeCompilation, BUILD_GTEST_LIBJVM, \
- TOOLCHAIN := $(JVM_TOOLCHAIN), \
+ TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
LIBRARY := jvm, \
OUTPUT_DIR := $(JVM_OUTPUTDIR)/gtest, \
OBJECT_DIR := $(JVM_OUTPUTDIR)/gtest/objs, \
@@ -95,7 +95,7 @@
################################################################################
$(eval $(call SetupNativeCompilation, BUILD_GTEST_LAUNCHER, \
- TOOLCHAIN := $(JVM_TOOLCHAIN), \
+ TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
PROGRAM := gtestLauncher, \
OUTPUT_DIR := $(JVM_OUTPUTDIR)/gtest, \
EXTRA_FILES := $(GTEST_LAUNCHER_SRC), \
--- a/hotspot/make/lib/CompileJvm.gmk Thu Sep 29 17:23:47 2016 +0000
+++ b/hotspot/make/lib/CompileJvm.gmk Fri Sep 30 09:06:02 2016 +0200
@@ -143,13 +143,6 @@
JVM_PRECOMPILED_HEADER := $(HOTSPOT_TOPDIR)/src/share/vm/precompiled/precompiled.hpp
endif
-ifneq ($(filter $(OPENJDK_TARGET_OS), macosx aix solaris), )
- # On macosx, aix and solaris we have to link with the C++ compiler
- JVM_TOOLCHAIN := TOOLCHAIN_LINK_CXX
-else
- JVM_TOOLCHAIN := TOOLCHAIN_DEFAULT
-endif
-
ifeq ($(OPENJDK_TARGET_CPU), x86)
JVM_EXCLUDE_PATTERNS += x86_64
else ifeq ($(OPENJDK_TARGET_CPU), x86_64)
@@ -194,7 +187,7 @@
# Now set up the actual compilation of the main hotspot native library
$(eval $(call SetupNativeCompilation, BUILD_LIBJVM, \
- TOOLCHAIN := $(JVM_TOOLCHAIN), \
+ TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
LIBRARY := jvm, \
OUTPUT_DIR := $(JVM_OUTPUTDIR), \
SRC := $(JVM_SRC_DIRS), \