37 # Tell the compiler not to export any functions unless declared so in |
37 # Tell the compiler not to export any functions unless declared so in |
38 # the source code. On Windows, this is the default and cannot be changed. |
38 # the source code. On Windows, this is the default and cannot be changed. |
39 # On Mac, we have always exported all symbols, probably due to oversight |
39 # On Mac, we have always exported all symbols, probably due to oversight |
40 # and/or misunderstanding. To emulate this, don't hide any symbols |
40 # and/or misunderstanding. To emulate this, don't hide any symbols |
41 # by default. |
41 # by default. |
42 # On AIX/xlc we need at least xlc 13.1 for the symbol hiding |
42 # On AIX/xlc we need at least xlc 13.1 for the symbol hiding (see JDK-8214063) |
43 # Also provide an override for non-conformant libraries. |
43 # Also provide an override for non-conformant libraries. |
44 ifeq ($(TOOLCHAIN_TYPE), gcc) |
44 ifeq ($(TOOLCHAIN_TYPE), gcc) |
45 CXXFLAGS_JDKEXE += -fvisibility=hidden |
45 CXXFLAGS_JDKEXE += -fvisibility=hidden |
46 LDFLAGS_JDKEXE += -Wl,--exclude-libs,ALL |
46 LDFLAGS_JDKEXE += -Wl,--exclude-libs,ALL |
47 else ifeq ($(TOOLCHAIN_TYPE), clang) |
47 else ifeq ($(TOOLCHAIN_TYPE), clang) |
48 ifneq ($(OPENJDK_TARGET_OS), macosx) |
48 ifneq ($(OPENJDK_TARGET_OS), macosx) |
49 CXXFLAGS_JDKEXE += -fvisibility=hidden |
49 CXXFLAGS_JDKEXE += -fvisibility=hidden |
50 endif |
50 endif |
51 else ifeq ($(TOOLCHAIN_TYPE), solstudio) |
51 else ifeq ($(TOOLCHAIN_TYPE), solstudio) |
52 CXXFLAGS_JDKEXE += -xldscope=hidden |
52 CXXFLAGS_JDKEXE += -xldscope=hidden |
53 else ifeq ($(TOOLCHAIN_TYPE), xlc) |
|
54 ifneq ($(CC_VERSION_NUMBER), 12.1) |
|
55 CXXFLAGS_JDKEXE += -qvisibility=hidden |
|
56 endif |
|
57 endif |
53 endif |
58 |
54 |
59 UNPACKEXE_SRC := $(TOPDIR)/src/jdk.pack/share/native/common-unpack \ |
55 UNPACKEXE_SRC := $(TOPDIR)/src/jdk.pack/share/native/common-unpack \ |
60 $(TOPDIR)/src/jdk.pack/share/native/unpack200 |
56 $(TOPDIR)/src/jdk.pack/share/native/unpack200 |
61 UNPACKEXE_CFLAGS := -I$(TOPDIR)/src/jdk.pack/share/native/common-unpack \ |
57 UNPACKEXE_CFLAGS := -I$(TOPDIR)/src/jdk.pack/share/native/common-unpack \ |