Commit Graph

19 Commits

Author SHA1 Message Date
Sean Farley 0de164bdb5 java/openjdk17: Fix an NPE when using a multi-screen X11 setup
PR:		264356
Reported by:	scf@
2022-05-30 17:42:52 -07:00
Rene Ladan c7d1c247d8 cleanup: remove expired versions of OpenJDK (12 through 16)
Adjust ports depending on expired versions of OpenJDK:
- biology/snpeff: 12+ -> 17+
- devel/RStudio: 12 -> 11
- www/closure-compiler: 13 -> 11+

Allow java/openjdk17 to use java/openjdk17-bootstrap on i386
too, this builds just fine on 13.1-i386

Remove jdk12-doc as it is no longer relevant.

Clean up Java version calculations in bsd.java.mk

Reviewed by: jwb, java (glewis)

Differential Revision: https://reviews.freebsd.org/D35280
2022-05-24 22:09:35 +02:00
Greg Lewis 49c485c6c1 java/openjdk17: Update to 17.0.3 GA 2022-05-04 19:06:32 -07:00
Dimitry Andric e406118f77 java/openjdk13 java/openjdk14 java/openjdk15 java/openjdk16 java/openjdk17 java/openjdk17-jre: fix build with clang 14
During an exp-run for llvm 14 (see bug 261742), it turned out that
java/openjdk13 and java/openjdk17 fail to build with clang 14 (but this
also affects openjdk14 through 16):

=== Output from failing command(s) repeated here ===
* For target hotspot_variant-server_libjvm_objs_serviceThread.o:
/wrkdirs/usr/ports/java/openjdk13/work/jdk13u-jdk-13.0.10-5-1/src/hotspot/share/runtime/serviceThread.cpp:133:15: error: use of bitwise '|' with boolean operands [-Werror,-Wbitwise-instead-of-logical]
      while (((sensors_changed = LowMemoryDetector::has_pending_requests()) |
             ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/wrkdirs/usr/ports/java/openjdk13/work/jdk13u-jdk-13.0.10-5-1/src/hotspot/share/runtime/serviceThread.cpp:133:15: note: cast one or both operands to int to silence this warning
/wrkdirs/usr/ports/java/openjdk13/work/jdk13u-jdk-13.0.10-5-1/src/hotspot/share/runtime/serviceThread.cpp:133:15: error: use of bitwise '|' with boolean operands [-Werror,-Wbitwise-instead-of-logical]
      while (((sensors_changed = LowMemoryDetector::has_pending_requests()) |
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/wrkdirs/usr/ports/java/openjdk13/work/jdk13u-jdk-13.0.10-5-1/src/hotspot/share/runtime/serviceThread.cpp:133:15: note: cast one or both operands to int to silence this warning
/wrkdirs/usr/ports/java/openjdk13/work/jdk13u-jdk-13.0.10-5-1/src/hotspot/share/runtime/serviceThread.cpp:133:15: error: use of bitwise '|' with boolean operands [-Werror,-Wbitwise-instead-of-logical]
      while (((sensors_changed = LowMemoryDetector::has_pending_requests()) |
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/wrkdirs/usr/ports/java/openjdk13/work/jdk13u-jdk-13.0.10-5-1/src/hotspot/share/runtime/serviceThread.cpp:133:15: note: cast one or both operands to int to silence this warning
/wrkdirs/usr/ports/java/openjdk13/work/jdk13u-jdk-13.0.10-5-1/src/hotspot/share/runtime/serviceThread.cpp:133:15: error: use of bitwise '|' with boolean operands [-Werror,-Wbitwise-instead-of-logical]
      while (((sensors_changed = LowMemoryDetector::has_pending_requests()) |
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ... (rest of output omitted)

Although the warning is normally an indication of a potential problem,
in this case a comment just before the affected code explictly mentions
the reason for using bitwise '|' instead of logical '||':

      // Process all available work on each (outer) iteration, rather than
      // only the first recognized bit of work, to avoid frequently true early
      // tests from potentially starving later work.  Hence the use of
      // arithmetic-or to combine results; we don't want short-circuiting.

(See
<https://github.com/openjdk/jdk/blob/master/src/hotspot/share/runtime/serviceThread.cpp#L140>)

Therefore, we should suppress -Wbitwise-instead-of-logical for clang 14
and higher.

PR:		262845
Approved by:	portmgr (build fix blanket)
MFH:		2022Q2
2022-04-04 09:56:40 +02:00
Greg Lewis 57a7e706e6 java/openjdk17: Update to 17.0.2 GA 2022-02-05 20:41:36 -08:00
Jung-uk Kim 701f037632 java/openjdk17-jre: Add JRE-only package for java/openjdk17 2022-01-12 21:43:58 -05:00
Greg Lewis 4807e7f988 java/openjdk17: Add i386 support 2021-12-31 01:09:54 -08:00
Piotr Kubaj 69cdd4b12e java/openjdk17: allow bootstrapping on powerpc64le with bootstrap-openjdk17 2021-12-20 12:45:04 +00:00
Piotr Kubaj 9089fb036d java/openjdk17: use java/bootstrap-openjdk17 on powerpc64 elfv2 2021-12-20 01:56:41 +00:00
Greg Lewis 11b6514a01 java/openjdk17: Use the bootstrap port on supported ARCHs 2021-11-27 08:50:26 -08:00
Greg Lewis c6c4d2ead2 java/openjdk17: Fix WWW link to point to JDK 17
PR:		259167
Reported by:	cedric@precidata.com
2021-11-23 22:42:07 -08:00
Greg Lewis a9d52e329d java/openjdk17: Update to 17.0.1 2021-10-31 11:07:41 -07:00
Dimitry Andric 3822416493 java/openjdk*: work around UB in markOopDesc, fix builds with clang 13
During an exp-run for llvm 13 (see bug 258209), it turned out that
java/openjdk11 through openjdk13 fail to build with clang 13:

=== Output from failing command(s) repeated here ===
* For target jdk__packages_attribute.done:

These crashes are all caused by the markOop/markOopDesc classes, which
are used to keep track of objects, and which are 'marked' using the low
few bits. (See
https://github.com/openjdk/jdk13u/blob/master/src/hotspot/share/oops/markOop.hpp
).

After some laborious bisecting, I found out that these crashes start
occuring after the upstream commit https://github.com
/llvm/llvm-project/commit/16d03818412 (Return "[CGCall] Annotate this
argument with alignment").

What happens afterwards, is that clang considers the "this" pointer to
always be aligned to the alignment of the actual object, and then
masking or adding a few low bits is not working as expected.

The reason openjdk14 and higher work fine with clang 13, and don't crash
similarly, is that the OpenJDK people completely redid the
markOop/markOopDesc classes in
https://github.com/openjdk/jdk/commit/ae5615c6142a4dc0d9033462f4880d7b3c127e26
("8229258: Rework markOop and markOopDesc into a simpler mark word value
carrier"). E.g, the markOopDesc class was renamed to markWord, and
*stores* a pointer-like value instead of *being* a pointer-like value.
This is a much safer way of handling things.

However, this upstream commit is *very* large, as are a few of its
follow-ups, which is probably the reason why it has not been backported
to JDKs <= 13. I tried manually backporting it, but got lost in many
nasty patch conflicts and problems.

As a workaround, build openjdk8 through 13 with clang12 from the
devel/llvm12 port, for the time being.

In addition, allow openjdk14 through 17 to be built with clang 13, by
adding -Wno-unused-but-set-parameter to the compilation flags.

PR:		258954
Approved by:	maintainer timeout (2 weeks)
MFH:		2021Q4
2021-10-16 14:22:03 +02:00
Greg Lewis c1b344b011 java/openjdk17: Fix libfontmanager linkage
* Backport the fix from jdk17u so that --with-harfbuzz=system adds
  -lharfbuzz when linking libfontmanager.so

Reported by:	barulheira@gmail.com
2021-10-09 17:28:41 -07:00
Mikael Urankar fb734e4565 java/openjdk17: Fix build on aarch64.
Fully initialize FrameForm: Corrects adlc segfault when malloc junk options are set.

Approved by:	portmgr (build fix blanket)
2021-10-05 14:06:38 +02:00
Mikael Urankar 9c7b32b9b7 java/openjdk17: Remove enable-aot configure argument.
The Experimental AOT and JIT Compiler were remove in OpenJDK17:
https://openjdk.java.net/jeps/410

Remove this configure argument as it causes build failure on aarch64:
configure: error: unrecognized options: --enable-aot

Approved by:	portmgr (build fix blanket)
2021-10-05 14:00:36 +02:00
Piotr Kubaj 225ed0ac76 java/openjdk17: enable on powerpc64
While here, sort ONLY_FOR_ARCHS.
2021-09-30 22:19:01 +00:00
Piotr Kubaj 670c3c8cd9 java/openjdk17: port to powerpc64le 2021-09-29 21:55:53 +00:00
Greg Lewis 1b1bfbaab2 java/openjdk17: Add a port of OpenJDK 17
* Add a port of OpenJDK 17
* Restrict to amd64 and aarch64 until more platforms are tested
2021-09-25 11:28:38 -07:00