make/lib/LibCommon.gmk
changeset 52812 fc54d27e58d8
parent 52022 804792ce736f
equal deleted inserted replaced
52811:ff04b71bf6f1 52812:fc54d27e58d8
    36 # Tell the compiler not to export any functions unless declared so in
    36 # Tell the compiler not to export any functions unless declared so in
    37 # the source code. On Windows, this is the default and cannot be changed.
    37 # the source code. On Windows, this is the default and cannot be changed.
    38 # On Mac, we have always exported all symbols, probably due to oversight
    38 # On Mac, we have always exported all symbols, probably due to oversight
    39 # and/or misunderstanding. To emulate this, don't hide any symbols
    39 # and/or misunderstanding. To emulate this, don't hide any symbols
    40 # by default.
    40 # by default.
    41 # On AIX/xlc we need at least xlc 13.1 for the symbol hiding
    41 # On AIX/xlc we need at least xlc 13.1 for the symbol hiding (see JDK-8214063)
    42 # Also provide an override for non-conformant libraries.
    42 # Also provide an override for non-conformant libraries.
    43 ifeq ($(TOOLCHAIN_TYPE), gcc)
    43 ifeq ($(TOOLCHAIN_TYPE), gcc)
    44   CFLAGS_JDKLIB += -fvisibility=hidden
    44   CFLAGS_JDKLIB += -fvisibility=hidden
    45   CXXFLAGS_JDKLIB += -fvisibility=hidden
    45   CXXFLAGS_JDKLIB += -fvisibility=hidden
    46   LDFLAGS_JDKLIB += -Wl,--exclude-libs,ALL
    46   LDFLAGS_JDKLIB += -Wl,--exclude-libs,ALL
    51   EXPORT_ALL_SYMBOLS := -fvisibility=default
    51   EXPORT_ALL_SYMBOLS := -fvisibility=default
    52 else ifeq ($(TOOLCHAIN_TYPE), solstudio)
    52 else ifeq ($(TOOLCHAIN_TYPE), solstudio)
    53   CFLAGS_JDKLIB += -xldscope=hidden
    53   CFLAGS_JDKLIB += -xldscope=hidden
    54   CXXFLAGS_JDKLIB += -xldscope=hidden
    54   CXXFLAGS_JDKLIB += -xldscope=hidden
    55   EXPORT_ALL_SYMBOLS := -xldscope=global
    55   EXPORT_ALL_SYMBOLS := -xldscope=global
    56 else ifeq ($(TOOLCHAIN_TYPE), xlc)
       
    57   ifneq ($(CC_VERSION_NUMBER), 12.1)
       
    58     CFLAGS_JDKLIB += -qvisibility=hidden
       
    59     CXXFLAGS_JDKLIB += -qvisibility=hidden
       
    60     EXPORT_ALL_SYMBOLS := -qvisibility=default
       
    61   endif
       
    62 endif
    56 endif
    63 
    57 
    64 # Put the libraries here.
    58 # Put the libraries here.
    65 INSTALL_LIBRARIES_HERE := $(call FindLibDirForModule, $(MODULE))
    59 INSTALL_LIBRARIES_HERE := $(call FindLibDirForModule, $(MODULE))
    66 
    60