Fix compiler flags for all compilers. ihse-remove-mapfiles-branch
authorihse
Tue, 13 Feb 2018 14:54:44 +0100
branchihse-remove-mapfiles-branch
changeset 56113 02cec376750e
parent 56112 39286667d14e
child 56114 0d38468d211c
Fix compiler flags for all compilers.
make/autoconf/flags.m4
make/hotspot/lib/CompileLibjsig.gmk
make/lib/LibCommon.gmk
--- a/make/autoconf/flags.m4	Tue Feb 13 14:07:56 2018 +0100
+++ b/make/autoconf/flags.m4	Tue Feb 13 14:54:44 2018 +0100
@@ -852,7 +852,7 @@
       $2JVM_CFLAGS="[$]$2JVM_CFLAGS -march=i586"
     fi
     $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS [$]$2COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
-        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
+        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -fvisibility=hidden"
     case $OPENJDK_$1_CPU_ARCH in
       arm )
         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
@@ -875,6 +875,7 @@
     TOOLCHAIN_CHECK_COMPILER_VERSION(VERSION: 6, PREFIX: $2, IF_AT_LEAST: FLAGS_SETUP_GCC6_COMPILER_FLAGS($2))
   elif test "x$TOOLCHAIN_TYPE" = xclang; then
     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D_GNU_SOURCE"
+    $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -fvisibility=hidden"
 
     # Restrict the debug information created by Clang to avoid
     # too big object files and speed the build up a little bit
@@ -902,7 +903,7 @@
     fi
   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -DSPARC_WORKS"
-    $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS [$]$2COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
+    $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS [$]$2COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS -xldscope=hidden"
     if test "x$OPENJDK_$1_CPU_ARCH" = xx86; then
       $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_$1_CPU_LEGACY_LIB"
     fi
@@ -913,6 +914,7 @@
     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D_REENTRANT"
     $2CFLAGS_JDK="[$]$2CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
     $2CXXFLAGS_JDK="[$]$2CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
+    $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -qvisibility=hidden"
   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
     $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS [$]$2COMMON_CCXXFLAGS_JDK \
         -MD -Zc:wchar_t- -W3 -wd4800 \
--- a/make/hotspot/lib/CompileLibjsig.gmk	Tue Feb 13 14:07:56 2018 +0100
+++ b/make/hotspot/lib/CompileLibjsig.gmk	Tue Feb 13 14:54:44 2018 +0100
@@ -66,7 +66,7 @@
       SET_SHARED_LIBRARY_NAME :=
 
     else ifeq ($(OPENJDK_TARGET_OS), aix)
-      LIBJSIG_CFLAGS := -fvisibility=hidden -q64 -D_GNU_SOURCE -D_REENTRANT -qpic=large
+      LIBJSIG_CFLAGS := -qvisibility=hidden -q64 -D_GNU_SOURCE -D_REENTRANT -qpic=large
       LIBJSIG_LDFLAGS := -b64 -bexpall -G -bnoentry -qmkshrobj -brtl -bnolibpath -bernotok
       LIBJSIG_LIBS := $(LIBDL)
 
--- a/make/lib/LibCommon.gmk	Tue Feb 13 14:07:56 2018 +0100
+++ b/make/lib/LibCommon.gmk	Tue Feb 13 14:54:44 2018 +0100
@@ -37,7 +37,6 @@
 WIN_JAVA_LIB := $(SUPPORT_OUTPUTDIR)/native/java.base/libjava/java.lib
 
 DISABLE_MAPFILES := true
-CFLAGS_JDKLIB := -fvisibility=hidden $(CFLAGS_JDKLIB)
 
 ifneq ($(findstring $(OPENJDK_TARGET_OS), macosx windows), )
   DISABLE_MAPFILES := true