re PR libgcj/30999 (support for GCC4.0's fvisibility option in JNIEXPORT macro)

2007-06-28  Jan Nijtmans  <nijtmans@users.sourceforge.net>

	PR libgcj/30999:
	* jni_md.h: Add the possibility to compile jni code with.
	-fvisibility=hidden. This causes all symbols to be hidden
	except the JNI functions which need to be exported.

From-SVN: r126090
This commit is contained in:
Jan Nijtmans 2007-06-28 19:35:25 +00:00 committed by Tom Tromey
parent 83f4c19f67
commit c9640b919d
2 changed files with 20 additions and 10 deletions

View File

@ -1,3 +1,10 @@
2007-06-28 Jan Nijtmans <nijtmans@users.sourceforge.net>
PR libgcj/30999:
* jni_md.h: Add the possibility to compile jni code with.
-fvisibility=hidden. This causes all symbols to be hidden
except the JNI functions which need to be exported.
2007-06-28 Andreas Tobler <a.tobler@schweiz.org>
* testsuite/libjava.jvmti/jvmti-interp.exp (gij_jvmti_test_one): Pass

View File

@ -124,6 +124,19 @@ typedef uint16_t jchar;
#define JNICALL __stdcall
#else /* !( _WIN32 || __WIN32__ || WIN32) */
#define JNIIMPORT
#if defined(__GNUC__) && __GNUC__ > 3
#define JNIEXPORT __attribute__ ((visibility("default")))
#else
#define JNIEXPORT
#endif
#define JNICALL
#endif /* !( _WIN32 || __WIN32__ || WIN32) */
/* These defines apply to symbols in libgcj */
#ifdef __GCJ_DLL__
# ifdef __GCJ_JNI_IMPL__
@ -135,14 +148,4 @@ typedef uint16_t jchar;
# define _CLASSPATH_JNIIMPEXP
#endif /* __GCJ_DLL__ */
#else /* !( _WIN32 || __WIN32__ || WIN32) */
#define JNIIMPORT
#define JNIEXPORT
#define JNICALL
#define _CLASSPATH_JNIIMPEXP
#endif /* !( _WIN32 || __WIN32__ || WIN32) */
#endif /* __GCJ_JNI_MD_H__ */