Define JNIEXPORT as visibility default with GCC? (original) (raw)

Anthony Petrov anthony.petrov at oracle.com
Tue Apr 9 00:25:04 PDT 2013


Hi Coleen, Martin,

[ cc'ing awt-dev@ ]

Probably gcc can't process typedefs with visibility attributes specified, hence the changes to AWT. Generally they look good.

However, I'm concerned with the compatibility impact of this change. I suppose that 3rd-party JNI libraries could use such a pattern, too. And now their compilation may fail. I understand that this is just a source compatibility issue, not a binary compatibility. But I just want to make sure we're aware of it.

I'm also wondering if this is something that should be reviewed by CCC as well (which is still Oracle-internal :( ). Phil?

-- best regards, Anthony

On 4/9/2013 5:49, Coleen Phillimore wrote:

Hi Martin, I'm sorry, I lost track of this and thought it was already pushed. The jnimd.h changes look good but I don't really understand why the awt changes were made, or what they do. Since the jdk doesn't usually push using JPRT, I'm afraid to push this directly myself without a review from someone from jdk8-dev at openjdk.com. I have cc'ed them. I think someone from the tools and libraries group should review and push this. Thanks, Coleen On 4/8/2013 7:35 PM, Martin Buchholz wrote: friendly ping. I'd like to have an approve to push this (or have someone jprt for me).

On Mon, Mar 11, 2013 at 4:57 PM, Martin Buchholz <martinrb at google.com_ _<mailto:martinrb at google.com>> wrote: The latest version of my webrev is here: http://cr.openjdk.java.net/~martin/webrevs/openjdk8/JNIEXPORT/ <http://cr.openjdk.java.net/%7Emartin/webrevs/openjdk8/JNIEXPORT/> It includes this line: Reviewed-by: coleenp, ddehaven, dcubed Ok to push?

On Fri, Mar 8, 2013 at 10:31 AM, Coleen Phillmore <coleen.phillimore at oracle.com_ _<mailto:coleen.phillimore at oracle.com>> wrote: The hotspot definitions of JNIEXPORT don't match in all the files to the JDK definition. I think a hotspot bug should be filed to fix the jni.h definitions which now none of them match. After someone in core-libs checks this in, we'll update the hotspot files to match the final version and retest -fvisibility=hidden. I don't remember why the JDK version wasn't fixed with the original -fvisibility=hidden work. Coleen On 2/28/2013 3:56 PM, Daniel D. Daugherty wrote: On 2/28/13 11:57 AM, David DeHaven wrote: Has a bug been filed for this? -DrD- As mentioned earlier in this thread... Dan On 2/19/13 5:21 PM, Daniel D. Daugherty wrote: I couldn't find a 'jdk' repo relevant bug for this issue so I filed: 8008509: 6588413 changed JNIEXPORT visibility for GCC on HSX, jdk's jnimd.h needs similar change http://bugs.sun.com/bugdatabase/viewbug.do?bugid=8008509 https://jbs.oracle.com/bugs/browse/JDK-8008509 Coleen did the original work on 6588413 so I added her to the "interest list" for the new bug. The need for an update to the jdk repo's jnimd.h file was raised during the code review for 6588413, but that detail appears to have been dropped. Dan



More information about the jdk8-dev mailing list