make/lib/LibCommon.gmk
changeset 50126 98f57dff16f3
parent 49440 396ea30afbd5
child 50471 f0aeede1b855
child 56687 f0d5c39dfbc1
equal deleted inserted replaced
50125:2d9dd2b876a0 50126:98f57dff16f3
    39 # Tell the compiler not to export any functions unless declared so in
    39 # Tell the compiler not to export any functions unless declared so in
    40 # the source code. On Windows, this is the default and cannot be changed.
    40 # the source code. On Windows, this is the default and cannot be changed.
    41 # On Mac, we have always exported all symbols, probably due to oversight
    41 # On Mac, we have always exported all symbols, probably due to oversight
    42 # and/or misunderstanding. To emulate this, don't hide any symbols
    42 # and/or misunderstanding. To emulate this, don't hide any symbols
    43 # by default.
    43 # by default.
       
    44 # On AIX/xlc we need at least xlc 13.1 for the symbol hiding
    44 # Also provide an override for non-conformant libraries.
    45 # Also provide an override for non-conformant libraries.
    45 ifeq ($(TOOLCHAIN_TYPE), gcc)
    46 ifeq ($(TOOLCHAIN_TYPE), gcc)
    46   CFLAGS_JDKLIB += -fvisibility=hidden
    47   CFLAGS_JDKLIB += -fvisibility=hidden
    47   CXXFLAGS_JDKLIB += -fvisibility=hidden
    48   CXXFLAGS_JDKLIB += -fvisibility=hidden
    48   LDFLAGS_JDKLIB += -Wl,--exclude-libs,ALL
    49   LDFLAGS_JDKLIB += -Wl,--exclude-libs,ALL
    56 else ifeq ($(TOOLCHAIN_TYPE), solstudio)
    57 else ifeq ($(TOOLCHAIN_TYPE), solstudio)
    57   CFLAGS_JDKLIB += -xldscope=hidden
    58   CFLAGS_JDKLIB += -xldscope=hidden
    58   CXXFLAGS_JDKLIB += -xldscope=hidden
    59   CXXFLAGS_JDKLIB += -xldscope=hidden
    59   EXPORT_ALL_SYMBOLS := -xldscope=global
    60   EXPORT_ALL_SYMBOLS := -xldscope=global
    60 else ifeq ($(TOOLCHAIN_TYPE), xlc)
    61 else ifeq ($(TOOLCHAIN_TYPE), xlc)
    61   CFLAGS_JDKLIB += -qvisibility=hidden
    62   ifneq ($(CC_VERSION_NUMBER), 12.1)
    62   CXXFLAGS_JDKLIB += -qvisibility=hidden
    63     CFLAGS_JDKLIB += -qvisibility=hidden
    63   EXPORT_ALL_SYMBOLS := -qvisibility=default
    64     CXXFLAGS_JDKLIB += -qvisibility=hidden
       
    65     EXPORT_ALL_SYMBOLS := -qvisibility=default
       
    66   endif
    64 endif
    67 endif
    65 
    68 
    66 ################################################################################
    69 ################################################################################
    67 # Find the default set of src dirs for a native library.
    70 # Find the default set of src dirs for a native library.
    68 # Param 1 - module name
    71 # Param 1 - module name