Define JNIEXPORT as visibility default with GCC?

David DeHaven david.dehaven at
Thu Feb 28 18:57:06 UTC 2013

> Here's the latest version of the proposed patch:
> that has been tested, but only with gcc 4.6,
> but is also written to work with llvm.

This looks fine, however since 4.2.1 is still used for some builds we need to filter that specific version out or this will cause grief in other groups. The __has_attribute check is also redundant since clang by design pretends to be gcc so the __GNUC__ check should be sufficient (clang claims GCC compatibility as one of it's selling features). LLVM is the backend to the compiler, it doesn't see the source code.

My jawt_md.h fix (that I haven't touched in well over month) has a separate jni_md.h for Mac since it has to have it's own headers to properly fix the issue, it wouldn't affect Linux/Solaris builds at all though. I think that would be more appropriate for Mac users, who haven't used 4.2 in some time. If I can actually find some time this week I may be able to post it for review...

There's also the matter of the hotspot header being wrong.

Has a bug been filed for this?


More information about the core-libs-dev mailing list