Created attachment 218660 [details]
Fix java/openjdk12 build with clang 11
As reported on the freebsd-ports mailing list, java/openjdk1[2-5] do not build with clang 11, which is in 13-CURRENT.
For openjdk 12 through 14, this is due to duplicated symbols, and because clang 11 (like gcc 10) defaults to -fno-common now.
For openjdk 12 through 15, there is also a problem in the return type of the awt wrapper for the Xlib XSynchronize(3) function: since this returns a pointer, the return type should be a jlong, not a jint.
In this bug I will post patches for each of these openjdk versions.
Created attachment 218661 [details]
Fix java/openjdk13 build with clang 11
Created attachment 218662 [details]
Fix java/openjdk14 build with clang 11
Created attachment 218663 [details]
Fix java/openjdk15 build with clang 11
I've only built openjdk12, but the changes are identical for all of them, so this looks good to me. Upstream I've pulled the changes from jdk15 back into 14, 13, and 12. I haven't pulled in the X wrapper changes yet.
(In reply to Greg Lewis from comment #4)
> Upstream I've pulled the changes from jdk15 back into 14, 13, and 12. I haven't pulled in the X wrapper changes yet.
Is there a reason those patches are not yet committed ?
(In reply to Dimitry Andric from comment #1)
This fails make patch on jdk13 -- should this still work ?
(In reply to Kurt Jaeger from comment #7)
I haven't checked recently. Since Greg posted in comment 4 "Upstream I've pulled the changes from jdk15 back into 14, 13, and 12", I expect that in the mean time some of the patches have already been applied in the upstream sources.