Mercurial > hg > graal-jvmci-8
diff src/cpu/x86/vm/jni_x86.h @ 2191:d70fe6ab4436
6588413: Use -fvisibility=hidden for gcc compiles
Summary: Add option for gcc 4 and above, define JNIEXPORT and JNIIMPORT to visibility=default, add for jio_snprintf and others since -fvisibility=hidden overrides --version-script definitions.
Reviewed-by: kamg, never
author | coleenp |
---|---|
date | Tue, 01 Feb 2011 11:23:19 -0500 |
parents | f95d63e2154a |
children | 1d1603768966 |
line wrap: on
line diff
--- a/src/cpu/x86/vm/jni_x86.h Thu Jan 27 16:11:27 2011 -0800 +++ b/src/cpu/x86/vm/jni_x86.h Tue Feb 01 11:23:19 2011 -0500 @@ -27,10 +27,16 @@ #define _JAVASOFT_JNI_MD_H_ #if defined(SOLARIS) || defined(LINUX) + +#if defined(__GNUC__) && (__GNUC__ > 4) || (__GNUC__ == 4) && (__GNUC_MINOR__ > 2) + #define JNIEXPORT __attribute__((visibility("default"))) + #define JNIIMPORT __attribute__((visibility("default"))) +#else #define JNIEXPORT #define JNIIMPORT +#endif + #define JNICALL - typedef int jint; #ifdef _LP64