add __attribute__ ((externally_visible)) to EXPORT macros to facilitate whole-program optimization using GCC 4.5

This commit is contained in:
Joel Dice 2009-10-27 09:16:08 -06:00
parent a68742200b
commit 4570b86da0
3 changed files with 9 additions and 8 deletions

View File

@ -19,11 +19,12 @@
#if (defined __MINGW32__) || (defined _MSC_VER)
# define PLATFORM_WINDOWS
# define PATH_SEPARATOR ';'
# define JNIEXPORT __declspec(dllexport)
# define JNIEXPORT __declspec(dllexport) __attribute__ ((externally_visible))
#else
# define PLATFORM_POSIX
# define PATH_SEPARATOR ':'
# define JNIEXPORT __attribute__ ((visibility("default")))
# define JNIEXPORT __attribute__ ((visibility("default"))) \
__attribute__ ((externally_visible))
#endif
#ifdef _MSC_VER

View File

@ -27,10 +27,10 @@ extern "C" void __cxa_pure_virtual(void) { abort(); }
#ifdef BOOT_IMAGE
#if (defined __MINGW32__) || (defined _MSC_VER)
# define EXPORT __declspec(dllexport)
# define EXPORT __declspec(dllexport) __attribute__ ((externally_visible))
# define SYMBOL(x) binary_bootimage_bin_##x
#else
# define EXPORT __attribute__ ((visibility("default")))
# define EXPORT __attribute__ ((visibility("default"))) __attribute__ ((externally_visible))
# define SYMBOL(x) _binary_bootimage_bin_##x
#endif
@ -53,10 +53,10 @@ extern "C" {
#ifdef BOOT_CLASSPATH
#if (defined __MINGW32__) || (defined _MSC_VER)
# define EXPORT __declspec(dllexport)
# define EXPORT __declspec(dllexport) __attribute__ ((externally_visible))
# define SYMBOL(x) binary_classpath_jar_##x
#else
# define EXPORT __attribute__ ((visibility("default")))
# define EXPORT __attribute__ ((visibility("default"))) __attribute__ ((externally_visible))
# define SYMBOL(x) _binary_classpath_jar_##x
#endif

View File

@ -90,10 +90,10 @@ typedef uint64_t uintptr_t;
#undef JNIEXPORT
#ifdef PLATFORM_WINDOWS
# define JNIEXPORT __declspec(dllexport)
# define JNIEXPORT __declspec(dllexport) __attribute__ ((externally_visible))
# define PATH_SEPARATOR ';'
#else
# define JNIEXPORT __attribute__ ((visibility("default")))
# define JNIEXPORT __attribute__ ((visibility("default"))) __attribute__ ((externally_visible))
# define PATH_SEPARATOR ':'
#endif