* [PR PATCH] openjdk9-bootstrap: fix build with gcc12
@ 2022-10-15 9:20 oreo639
2022-10-15 10:21 ` [PR PATCH] [Updated] " oreo639
` (16 more replies)
0 siblings, 17 replies; 18+ messages in thread
From: oreo639 @ 2022-10-15 9:20 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1317 bytes --]
There is a new pull request by oreo639 against master on the void-packages repository
https://github.com/oreo639/void-packages openjdk9
https://github.com/void-linux/void-packages/pull/39963
openjdk9-bootstrap: fix build with gcc12
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly**
https://github.com/void-linux/void-packages/issues/39809
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/39963.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-openjdk9-39963.patch --]
[-- Type: text/x-diff, Size: 1807 bytes --]
From d8a83f4a02ba64018cdd065f208238c883cb2477 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 15 Oct 2022 02:16:25 -0700
Subject: [PATCH] openjdk9-bootstrap: fix build with gcc12
---
.../fix-pointer-comparison-gcc12.patch | 22 +++++++++++++++++++
1 file changed, 22 insertions(+)
create mode 100644 srcpkgs/openjdk9-bootstrap/patches/fix-pointer-comparison-gcc12.patch
diff --git a/srcpkgs/openjdk9-bootstrap/patches/fix-pointer-comparison-gcc12.patch b/srcpkgs/openjdk9-bootstrap/patches/fix-pointer-comparison-gcc12.patch
new file mode 100644
index 000000000000..19b0a58e50a8
--- /dev/null
+++ b/srcpkgs/openjdk9-bootstrap/patches/fix-pointer-comparison-gcc12.patch
@@ -0,0 +1,22 @@
+--- a/hotspot/src/share/vm/opto/lcm.cpp
++++ b/hotspot/src/share/vm/opto/lcm.cpp
+@@ -60,7 +60,7 @@
+ // Check whether val is not-null-decoded compressed oop,
+ // i.e. will grab into the base of the heap if it represents NULL.
+ static bool accesses_heap_base_zone(Node *val) {
+- if (Universe::narrow_oop_base() > 0) { // Implies UseCompressedOops.
++ if (Universe::narrow_oop_base() > (address)0) { // Implies UseCompressedOops.
+ if (val && val->is_Mach()) {
+ if (val->as_Mach()->ideal_Opcode() == Op_DecodeN) {
+ // This assumes all Decodes with TypePtr::NotNull are matched to nodes that
+--- a/hotspot/src/share/vm/memory/virtualspace.cpp
++++ b/hotspot/src/share/vm/memory/virtualspace.cpp
+@@ -581,7 +581,7 @@ ReservedHeapSpace::ReservedHeapSpace(siz
+ assert(markOopDesc::encode_pointer_as_mark(&_base[size])->decode_pointer() == &_base[size],
+ "area must be distinguishable from marks for mark-sweep");
+
+- if (base() > 0) {
++ if (base() > (char*)0) {
+ MemTracker::record_virtual_memory_type((address)base(), mtJavaHeap);
+ }
+ }
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PR PATCH] [Updated] openjdk9-bootstrap: fix build with gcc12
2022-10-15 9:20 [PR PATCH] openjdk9-bootstrap: fix build with gcc12 oreo639
@ 2022-10-15 10:21 ` oreo639
2022-10-17 2:07 ` [PR REVIEW] " sgn
` (15 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: oreo639 @ 2022-10-15 10:21 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1322 bytes --]
There is an updated pull request by oreo639 against master on the void-packages repository
https://github.com/oreo639/void-packages openjdk9
https://github.com/void-linux/void-packages/pull/39963
openjdk9-bootstrap: fix build with gcc12
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly**
https://github.com/void-linux/void-packages/issues/39809
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/39963.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-openjdk9-39963.patch --]
[-- Type: text/x-diff, Size: 1783 bytes --]
From 161563116f21e5b2d3371d3dcbc7d6cb819d54f2 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 15 Oct 2022 02:16:25 -0700
Subject: [PATCH] openjdk9-bootstrap: fix build with gcc12
---
.../fix-pointer-comparison-gcc12.patch | 22 +++++++++++++++++++
1 file changed, 22 insertions(+)
create mode 100644 srcpkgs/openjdk9-bootstrap/patches/fix-pointer-comparison-gcc12.patch
diff --git a/srcpkgs/openjdk9-bootstrap/patches/fix-pointer-comparison-gcc12.patch b/srcpkgs/openjdk9-bootstrap/patches/fix-pointer-comparison-gcc12.patch
new file mode 100644
index 000000000000..8213aad3d6c8
--- /dev/null
+++ b/srcpkgs/openjdk9-bootstrap/patches/fix-pointer-comparison-gcc12.patch
@@ -0,0 +1,22 @@
+--- a/hotspot/src/share/vm/opto/lcm.cpp
++++ b/hotspot/src/share/vm/opto/lcm.cpp
+@@ -60,7 +60,7 @@
+ // Check whether val is not-null-decoded compressed oop,
+ // i.e. will grab into the base of the heap if it represents NULL.
+ static bool accesses_heap_base_zone(Node *val) {
+- if (Universe::narrow_oop_base() > 0) { // Implies UseCompressedOops.
++ if (Universe::narrow_oop_base()) { // Implies UseCompressedOops.
+ if (val && val->is_Mach()) {
+ if (val->as_Mach()->ideal_Opcode() == Op_DecodeN) {
+ // This assumes all Decodes with TypePtr::NotNull are matched to nodes that
+--- a/hotspot/src/share/vm/memory/virtualspace.cpp
++++ b/hotspot/src/share/vm/memory/virtualspace.cpp
+@@ -581,7 +581,7 @@ ReservedHeapSpace::ReservedHeapSpace(siz
+ assert(markOopDesc::encode_pointer_as_mark(&_base[size])->decode_pointer() == &_base[size],
+ "area must be distinguishable from marks for mark-sweep");
+
+- if (base() > 0) {
++ if (base()) {
+ MemTracker::record_virtual_memory_type((address)base(), mtJavaHeap);
+ }
+ }
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PR REVIEW] openjdk9-bootstrap: fix build with gcc12
2022-10-15 9:20 [PR PATCH] openjdk9-bootstrap: fix build with gcc12 oreo639
2022-10-15 10:21 ` [PR PATCH] [Updated] " oreo639
@ 2022-10-17 2:07 ` sgn
2022-10-17 2:59 ` oreo639
` (14 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: sgn @ 2022-10-17 2:07 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 304 bytes --]
New review comment by sgn on void-packages repository
https://github.com/void-linux/void-packages/pull/39963#discussion_r996557235
Comment:
If the intention is compare to `nullptr` please explicit, or write the patch description.
As of it's, I assume `Universe::narrow_oop_base()` returns an integer.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PR REVIEW] openjdk9-bootstrap: fix build with gcc12
2022-10-15 9:20 [PR PATCH] openjdk9-bootstrap: fix build with gcc12 oreo639
2022-10-15 10:21 ` [PR PATCH] [Updated] " oreo639
2022-10-17 2:07 ` [PR REVIEW] " sgn
@ 2022-10-17 2:59 ` oreo639
2022-10-17 3:01 ` oreo639
` (13 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: oreo639 @ 2022-10-17 2:59 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 287 bytes --]
New review comment by oreo639 on void-packages repository
https://github.com/void-linux/void-packages/pull/39963#discussion_r996573559
Comment:
`Universe::narrow_oop_base()` returns a char pointer, that's why the comparison is invalid (since it is comparing a pointer and an integer).
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PR REVIEW] openjdk9-bootstrap: fix build with gcc12
2022-10-15 9:20 [PR PATCH] openjdk9-bootstrap: fix build with gcc12 oreo639
` (2 preceding siblings ...)
2022-10-17 2:59 ` oreo639
@ 2022-10-17 3:01 ` oreo639
2022-10-17 3:03 ` oreo639
` (12 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: oreo639 @ 2022-10-17 3:01 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 445 bytes --]
New review comment by oreo639 on void-packages repository
https://github.com/void-linux/void-packages/pull/39963#discussion_r996573559
Comment:
`Universe::narrow_oop_base()` returns a char pointer, that's why the comparison is invalid (since it is comparing a pointer and an integer).
pointers are unsigned so afaik `if (Universe::narrow_oop_base())` == `if (Universe::narrow_oop_base() != NULL)` == `if (Universe::narrow_oop_base() > 0)`.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PR REVIEW] openjdk9-bootstrap: fix build with gcc12
2022-10-15 9:20 [PR PATCH] openjdk9-bootstrap: fix build with gcc12 oreo639
` (3 preceding siblings ...)
2022-10-17 3:01 ` oreo639
@ 2022-10-17 3:03 ` oreo639
2022-10-17 3:06 ` [PR PATCH] [Updated] " oreo639
` (11 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: oreo639 @ 2022-10-17 3:03 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 462 bytes --]
New review comment by oreo639 on void-packages repository
https://github.com/void-linux/void-packages/pull/39963#discussion_r996573559
Comment:
`Universe::narrow_oop_base()` returns a char pointer, that's why the comparison is invalid (since it is comparing a pointer and an integer).
pointers are unsigned so, unless I am mistaken, `if (Universe::narrow_oop_base())` == `if (Universe::narrow_oop_base() != NULL)` == `if (Universe::narrow_oop_base() > 0)`.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PR PATCH] [Updated] openjdk9-bootstrap: fix build with gcc12
2022-10-15 9:20 [PR PATCH] openjdk9-bootstrap: fix build with gcc12 oreo639
` (4 preceding siblings ...)
2022-10-17 3:03 ` oreo639
@ 2022-10-17 3:06 ` oreo639
2022-10-17 3:09 ` oreo639
` (10 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: oreo639 @ 2022-10-17 3:06 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1322 bytes --]
There is an updated pull request by oreo639 against master on the void-packages repository
https://github.com/oreo639/void-packages openjdk9
https://github.com/void-linux/void-packages/pull/39963
openjdk9-bootstrap: fix build with gcc12
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly**
https://github.com/void-linux/void-packages/issues/39809
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/39963.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-openjdk9-39963.patch --]
[-- Type: text/x-diff, Size: 1799 bytes --]
From b7b5344700533de44f3a7c3eb9b5300cb553080a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 15 Oct 2022 02:16:25 -0700
Subject: [PATCH] openjdk9-bootstrap: fix build with gcc12
---
.../fix-pointer-comparison-gcc12.patch | 22 +++++++++++++++++++
1 file changed, 22 insertions(+)
create mode 100644 srcpkgs/openjdk9-bootstrap/patches/fix-pointer-comparison-gcc12.patch
diff --git a/srcpkgs/openjdk9-bootstrap/patches/fix-pointer-comparison-gcc12.patch b/srcpkgs/openjdk9-bootstrap/patches/fix-pointer-comparison-gcc12.patch
new file mode 100644
index 000000000000..82fc696e2cab
--- /dev/null
+++ b/srcpkgs/openjdk9-bootstrap/patches/fix-pointer-comparison-gcc12.patch
@@ -0,0 +1,22 @@
+--- a/hotspot/src/share/vm/opto/lcm.cpp
++++ b/hotspot/src/share/vm/opto/lcm.cpp
+@@ -60,7 +60,7 @@
+ // Check whether val is not-null-decoded compressed oop,
+ // i.e. will grab into the base of the heap if it represents NULL.
+ static bool accesses_heap_base_zone(Node *val) {
+- if (Universe::narrow_oop_base() > 0) { // Implies UseCompressedOops.
++ if (Universe::narrow_oop_base() != NULL) { // Implies UseCompressedOops.
+ if (val && val->is_Mach()) {
+ if (val->as_Mach()->ideal_Opcode() == Op_DecodeN) {
+ // This assumes all Decodes with TypePtr::NotNull are matched to nodes that
+--- a/hotspot/src/share/vm/memory/virtualspace.cpp
++++ b/hotspot/src/share/vm/memory/virtualspace.cpp
+@@ -581,7 +581,7 @@ ReservedHeapSpace::ReservedHeapSpace(siz
+ assert(markOopDesc::encode_pointer_as_mark(&_base[size])->decode_pointer() == &_base[size],
+ "area must be distinguishable from marks for mark-sweep");
+
+- if (base() > 0) {
++ if (base() != NULL) {
+ MemTracker::record_virtual_memory_type((address)base(), mtJavaHeap);
+ }
+ }
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PR PATCH] [Updated] openjdk9-bootstrap: fix build with gcc12
2022-10-15 9:20 [PR PATCH] openjdk9-bootstrap: fix build with gcc12 oreo639
` (5 preceding siblings ...)
2022-10-17 3:06 ` [PR PATCH] [Updated] " oreo639
@ 2022-10-17 3:09 ` oreo639
2022-10-17 3:12 ` [PR REVIEW] " oreo639
` (9 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: oreo639 @ 2022-10-17 3:09 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1322 bytes --]
There is an updated pull request by oreo639 against master on the void-packages repository
https://github.com/oreo639/void-packages openjdk9
https://github.com/void-linux/void-packages/pull/39963
openjdk9-bootstrap: fix build with gcc12
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly**
https://github.com/void-linux/void-packages/issues/39809
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/39963.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-openjdk9-39963.patch --]
[-- Type: text/x-diff, Size: 3368 bytes --]
From 2b1e204274e511a6546f2ef0935325105825948a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 15 Oct 2022 02:16:25 -0700
Subject: [PATCH] openjdk9-bootstrap: fix build with gcc12
---
.../fix-pointer-comparison-gcc12.patch | 51 +++++++++++++++++++
1 file changed, 51 insertions(+)
create mode 100644 srcpkgs/openjdk9-bootstrap/patches/fix-pointer-comparison-gcc12.patch
diff --git a/srcpkgs/openjdk9-bootstrap/patches/fix-pointer-comparison-gcc12.patch b/srcpkgs/openjdk9-bootstrap/patches/fix-pointer-comparison-gcc12.patch
new file mode 100644
index 000000000000..9cfd4a9044ad
--- /dev/null
+++ b/srcpkgs/openjdk9-bootstrap/patches/fix-pointer-comparison-gcc12.patch
@@ -0,0 +1,51 @@
+From 19af6364825a401c281e9831f892a033a6f597e8 Mon Sep 17 00:00:00 2001
+From: Martin Buchholz <martin@openjdk.org>
+Date: Thu, 24 Aug 2017 10:26:32 -0700
+Subject: [PATCH] 8174050: Compilation errors with clang-4.0
+
+Reviewed-by: kvn
+---
+ hotspot/src/share/vm/memory/virtualspace.cpp | 2 +-
+ hotspot/src/share/vm/opto/lcm.cpp | 2 +-
+ hotspot/src/share/vm/opto/loopPredicate.cpp | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/hotspot/src/share/vm/memory/virtualspace.cpp b/hotspot/src/share/vm/memory/virtualspace.cpp
+index 82787f8a024..a3289d9b043 100644
+--- a/hotspot/src/share/vm/memory/virtualspace.cpp
++++ b/hotspot/src/share/vm/memory/virtualspace.cpp
+@@ -582,7 +582,7 @@ ReservedHeapSpace::ReservedHeapSpace(size_t size, size_t alignment, bool large)
+ assert(markOopDesc::encode_pointer_as_mark(&_base[size])->decode_pointer() == &_base[size],
+ "area must be distinguishable from marks for mark-sweep");
+
+- if (base() > 0) {
++ if (base() != NULL) {
+ MemTracker::record_virtual_memory_type((address)base(), mtJavaHeap);
+ }
+ }
+diff --git a/hotspot/src/share/vm/opto/lcm.cpp b/hotspot/src/share/vm/opto/lcm.cpp
+index 049376cc709..3ed99872641 100644
+--- a/hotspot/src/share/vm/opto/lcm.cpp
++++ b/hotspot/src/share/vm/opto/lcm.cpp
+@@ -39,7 +39,7 @@
+ // Check whether val is not-null-decoded compressed oop,
+ // i.e. will grab into the base of the heap if it represents NULL.
+ static bool accesses_heap_base_zone(Node *val) {
+- if (Universe::narrow_oop_base() > 0) { // Implies UseCompressedOops.
++ if (Universe::narrow_oop_base() != NULL) { // Implies UseCompressedOops.
+ if (val && val->is_Mach()) {
+ if (val->as_Mach()->ideal_Opcode() == Op_DecodeN) {
+ // This assumes all Decodes with TypePtr::NotNull are matched to nodes that
+diff --git a/hotspot/src/share/vm/opto/loopPredicate.cpp b/hotspot/src/share/vm/opto/loopPredicate.cpp
+index a3030676335..0de17405ccc 100644
+--- a/hotspot/src/share/vm/opto/loopPredicate.cpp
++++ b/hotspot/src/share/vm/opto/loopPredicate.cpp
+@@ -912,7 +912,7 @@ bool PhaseIdealLoop::loop_predication_impl(IdealLoopTree *loop) {
+ Node* idx = cmp->in(1);
+ assert(!invar.is_invariant(idx), "index is variant");
+ Node* rng = cmp->in(2);
+- assert(rng->Opcode() == Op_LoadRange || _igvn.type(rng)->is_int() >= 0, "must be");
++ assert(rng->Opcode() == Op_LoadRange || iff->is_RangeCheck() || _igvn.type(rng)->is_int()->_lo >= 0, "must be");
+ assert(invar.is_invariant(rng), "range must be invariant");
+ int scale = 1;
+ Node* offset = zero;
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PR REVIEW] openjdk9-bootstrap: fix build with gcc12
2022-10-15 9:20 [PR PATCH] openjdk9-bootstrap: fix build with gcc12 oreo639
` (6 preceding siblings ...)
2022-10-17 3:09 ` oreo639
@ 2022-10-17 3:12 ` oreo639
2022-10-17 3:12 ` oreo639
` (8 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: oreo639 @ 2022-10-17 3:12 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 613 bytes --]
New review comment by oreo639 on void-packages repository
https://github.com/void-linux/void-packages/pull/39963#discussion_r996573559
Comment:
`Universe::narrow_oop_base()` returns a char pointer, that's why the comparison is invalid (since it is comparing a pointer and an integer).
pointers are unsigned so, unless I am mistaken, `if (Universe::narrow_oop_base())` == `if (Universe::narrow_oop_base() != NULL)` == `if (Universe::narrow_oop_base() > 0)`.
Also, `if (Universe::narrow_oop_base())` and `if (Universe::narrow_oop_base() != NULL)` are always equivalent regardless if it is signed or unsgined.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PR REVIEW] openjdk9-bootstrap: fix build with gcc12
2022-10-15 9:20 [PR PATCH] openjdk9-bootstrap: fix build with gcc12 oreo639
` (7 preceding siblings ...)
2022-10-17 3:12 ` [PR REVIEW] " oreo639
@ 2022-10-17 3:12 ` oreo639
2022-10-17 3:13 ` oreo639
` (7 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: oreo639 @ 2022-10-17 3:12 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 462 bytes --]
New review comment by oreo639 on void-packages repository
https://github.com/void-linux/void-packages/pull/39963#discussion_r996573559
Comment:
`Universe::narrow_oop_base()` returns a char pointer, that's why the comparison is invalid (since it is comparing a pointer and an integer).
pointers are unsigned so, unless I am mistaken, `if (Universe::narrow_oop_base())` == `if (Universe::narrow_oop_base() != NULL)` == `if (Universe::narrow_oop_base() > 0)`.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PR REVIEW] openjdk9-bootstrap: fix build with gcc12
2022-10-15 9:20 [PR PATCH] openjdk9-bootstrap: fix build with gcc12 oreo639
` (8 preceding siblings ...)
2022-10-17 3:12 ` oreo639
@ 2022-10-17 3:13 ` oreo639
2022-10-17 4:13 ` oreo639
` (6 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: oreo639 @ 2022-10-17 3:13 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 538 bytes --]
New review comment by oreo639 on void-packages repository
https://github.com/void-linux/void-packages/pull/39963#discussion_r996573559
Comment:
`Universe::narrow_oop_base()` returns a char pointer, that's why the comparison is invalid (since it is comparing a pointer and an integer).
pointers are unsigned so, unless I am mistaken, `if (Universe::narrow_oop_base())` == `if (Universe::narrow_oop_base() != NULL)` == `if (Universe::narrow_oop_base() > 0)`. The first two are always equivalent regardless if it is signed or unsigned.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PR REVIEW] openjdk9-bootstrap: fix build with gcc12
2022-10-15 9:20 [PR PATCH] openjdk9-bootstrap: fix build with gcc12 oreo639
` (9 preceding siblings ...)
2022-10-17 3:13 ` oreo639
@ 2022-10-17 4:13 ` oreo639
2022-10-18 11:17 ` sgn
` (5 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: oreo639 @ 2022-10-17 4:13 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 361 bytes --]
New review comment by oreo639 on void-packages repository
https://github.com/void-linux/void-packages/pull/39963#discussion_r996573559
Comment:
> As of it's, I assume Universe::narrow_oop_base() returns an integer.
`Universe::narrow_oop_base()` returns a char pointer, that's why the comparison is invalid (since it is comparing a pointer and an integer).
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PR REVIEW] openjdk9-bootstrap: fix build with gcc12
2022-10-15 9:20 [PR PATCH] openjdk9-bootstrap: fix build with gcc12 oreo639
` (10 preceding siblings ...)
2022-10-17 4:13 ` oreo639
@ 2022-10-18 11:17 ` sgn
2022-10-18 16:06 ` [PR PATCH] [Updated] " oreo639
` (4 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: sgn @ 2022-10-18 11:17 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 172 bytes --]
New review comment by sgn on void-packages repository
https://github.com/void-linux/void-packages/pull/39963#discussion_r998067375
Comment:
This needs revision bump, no?
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PR PATCH] [Updated] openjdk9-bootstrap: fix build with gcc12
2022-10-15 9:20 [PR PATCH] openjdk9-bootstrap: fix build with gcc12 oreo639
` (11 preceding siblings ...)
2022-10-18 11:17 ` sgn
@ 2022-10-18 16:06 ` oreo639
2022-10-18 16:06 ` [PR REVIEW] " oreo639
` (3 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: oreo639 @ 2022-10-18 16:06 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1322 bytes --]
There is an updated pull request by oreo639 against master on the void-packages repository
https://github.com/oreo639/void-packages openjdk9
https://github.com/void-linux/void-packages/pull/39963
openjdk9-bootstrap: fix build with gcc12
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly**
https://github.com/void-linux/void-packages/issues/39809
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/39963.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-openjdk9-39963.patch --]
[-- Type: text/x-diff, Size: 3885 bytes --]
From 8953c35e524752c19a5bf876eee22e11b81f4f12 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 15 Oct 2022 02:16:25 -0700
Subject: [PATCH] openjdk9-bootstrap: fix build with gcc12
---
.../fix-pointer-comparison-gcc12.patch | 51 +++++++++++++++++++
srcpkgs/openjdk9-bootstrap/template | 2 +-
2 files changed, 52 insertions(+), 1 deletion(-)
create mode 100644 srcpkgs/openjdk9-bootstrap/patches/fix-pointer-comparison-gcc12.patch
diff --git a/srcpkgs/openjdk9-bootstrap/patches/fix-pointer-comparison-gcc12.patch b/srcpkgs/openjdk9-bootstrap/patches/fix-pointer-comparison-gcc12.patch
new file mode 100644
index 000000000000..9cfd4a9044ad
--- /dev/null
+++ b/srcpkgs/openjdk9-bootstrap/patches/fix-pointer-comparison-gcc12.patch
@@ -0,0 +1,51 @@
+From 19af6364825a401c281e9831f892a033a6f597e8 Mon Sep 17 00:00:00 2001
+From: Martin Buchholz <martin@openjdk.org>
+Date: Thu, 24 Aug 2017 10:26:32 -0700
+Subject: [PATCH] 8174050: Compilation errors with clang-4.0
+
+Reviewed-by: kvn
+---
+ hotspot/src/share/vm/memory/virtualspace.cpp | 2 +-
+ hotspot/src/share/vm/opto/lcm.cpp | 2 +-
+ hotspot/src/share/vm/opto/loopPredicate.cpp | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/hotspot/src/share/vm/memory/virtualspace.cpp b/hotspot/src/share/vm/memory/virtualspace.cpp
+index 82787f8a024..a3289d9b043 100644
+--- a/hotspot/src/share/vm/memory/virtualspace.cpp
++++ b/hotspot/src/share/vm/memory/virtualspace.cpp
+@@ -582,7 +582,7 @@ ReservedHeapSpace::ReservedHeapSpace(size_t size, size_t alignment, bool large)
+ assert(markOopDesc::encode_pointer_as_mark(&_base[size])->decode_pointer() == &_base[size],
+ "area must be distinguishable from marks for mark-sweep");
+
+- if (base() > 0) {
++ if (base() != NULL) {
+ MemTracker::record_virtual_memory_type((address)base(), mtJavaHeap);
+ }
+ }
+diff --git a/hotspot/src/share/vm/opto/lcm.cpp b/hotspot/src/share/vm/opto/lcm.cpp
+index 049376cc709..3ed99872641 100644
+--- a/hotspot/src/share/vm/opto/lcm.cpp
++++ b/hotspot/src/share/vm/opto/lcm.cpp
+@@ -39,7 +39,7 @@
+ // Check whether val is not-null-decoded compressed oop,
+ // i.e. will grab into the base of the heap if it represents NULL.
+ static bool accesses_heap_base_zone(Node *val) {
+- if (Universe::narrow_oop_base() > 0) { // Implies UseCompressedOops.
++ if (Universe::narrow_oop_base() != NULL) { // Implies UseCompressedOops.
+ if (val && val->is_Mach()) {
+ if (val->as_Mach()->ideal_Opcode() == Op_DecodeN) {
+ // This assumes all Decodes with TypePtr::NotNull are matched to nodes that
+diff --git a/hotspot/src/share/vm/opto/loopPredicate.cpp b/hotspot/src/share/vm/opto/loopPredicate.cpp
+index a3030676335..0de17405ccc 100644
+--- a/hotspot/src/share/vm/opto/loopPredicate.cpp
++++ b/hotspot/src/share/vm/opto/loopPredicate.cpp
+@@ -912,7 +912,7 @@ bool PhaseIdealLoop::loop_predication_impl(IdealLoopTree *loop) {
+ Node* idx = cmp->in(1);
+ assert(!invar.is_invariant(idx), "index is variant");
+ Node* rng = cmp->in(2);
+- assert(rng->Opcode() == Op_LoadRange || _igvn.type(rng)->is_int() >= 0, "must be");
++ assert(rng->Opcode() == Op_LoadRange || iff->is_RangeCheck() || _igvn.type(rng)->is_int()->_lo >= 0, "must be");
+ assert(invar.is_invariant(rng), "range must be invariant");
+ int scale = 1;
+ Node* offset = zero;
diff --git a/srcpkgs/openjdk9-bootstrap/template b/srcpkgs/openjdk9-bootstrap/template
index 801f49142621..7fecb035d89e 100644
--- a/srcpkgs/openjdk9-bootstrap/template
+++ b/srcpkgs/openjdk9-bootstrap/template
@@ -2,7 +2,7 @@
_final_jdk_home="usr/lib/jvm/java-9-openjdk"
pkgname=openjdk9-bootstrap
version=9.0.4p12
-revision=2
+revision=3
_repo_ver=${version/p/+}
archs="x86_64* i686* aarch64* arm* ppc64*"
wrksrc="jdk9u-jdk-${_repo_ver}"
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PR REVIEW] openjdk9-bootstrap: fix build with gcc12
2022-10-15 9:20 [PR PATCH] openjdk9-bootstrap: fix build with gcc12 oreo639
` (12 preceding siblings ...)
2022-10-18 16:06 ` [PR PATCH] [Updated] " oreo639
@ 2022-10-18 16:06 ` oreo639
2022-10-18 16:06 ` oreo639
` (2 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: oreo639 @ 2022-10-18 16:06 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 160 bytes --]
New review comment by oreo639 on void-packages repository
https://github.com/void-linux/void-packages/pull/39963#discussion_r998440110
Comment:
Done, thanks.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PR REVIEW] openjdk9-bootstrap: fix build with gcc12
2022-10-15 9:20 [PR PATCH] openjdk9-bootstrap: fix build with gcc12 oreo639
` (13 preceding siblings ...)
2022-10-18 16:06 ` [PR REVIEW] " oreo639
@ 2022-10-18 16:06 ` oreo639
2022-10-18 16:51 ` [PR PATCH] [Updated] " oreo639
2022-10-19 1:34 ` [PR PATCH] [Merged]: " sgn
16 siblings, 0 replies; 18+ messages in thread
From: oreo639 @ 2022-10-18 16:06 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 154 bytes --]
New review comment by oreo639 on void-packages repository
https://github.com/void-linux/void-packages/pull/39963#discussion_r998440110
Comment:
Thanks.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PR PATCH] [Updated] openjdk9-bootstrap: fix build with gcc12
2022-10-15 9:20 [PR PATCH] openjdk9-bootstrap: fix build with gcc12 oreo639
` (14 preceding siblings ...)
2022-10-18 16:06 ` oreo639
@ 2022-10-18 16:51 ` oreo639
2022-10-19 1:34 ` [PR PATCH] [Merged]: " sgn
16 siblings, 0 replies; 18+ messages in thread
From: oreo639 @ 2022-10-18 16:51 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1322 bytes --]
There is an updated pull request by oreo639 against master on the void-packages repository
https://github.com/oreo639/void-packages openjdk9
https://github.com/void-linux/void-packages/pull/39963
openjdk9-bootstrap: fix build with gcc12
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly**
https://github.com/void-linux/void-packages/issues/39809
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/39963.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-openjdk9-39963.patch --]
[-- Type: text/x-diff, Size: 3885 bytes --]
From 305664f070269b6c3f8819c573dbf212fc491b99 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sat, 15 Oct 2022 02:16:25 -0700
Subject: [PATCH] openjdk9-bootstrap: fix build with gcc12
---
.../fix-pointer-comparison-gcc12.patch | 51 +++++++++++++++++++
srcpkgs/openjdk9-bootstrap/template | 2 +-
2 files changed, 52 insertions(+), 1 deletion(-)
create mode 100644 srcpkgs/openjdk9-bootstrap/patches/fix-pointer-comparison-gcc12.patch
diff --git a/srcpkgs/openjdk9-bootstrap/patches/fix-pointer-comparison-gcc12.patch b/srcpkgs/openjdk9-bootstrap/patches/fix-pointer-comparison-gcc12.patch
new file mode 100644
index 000000000000..9cfd4a9044ad
--- /dev/null
+++ b/srcpkgs/openjdk9-bootstrap/patches/fix-pointer-comparison-gcc12.patch
@@ -0,0 +1,51 @@
+From 19af6364825a401c281e9831f892a033a6f597e8 Mon Sep 17 00:00:00 2001
+From: Martin Buchholz <martin@openjdk.org>
+Date: Thu, 24 Aug 2017 10:26:32 -0700
+Subject: [PATCH] 8174050: Compilation errors with clang-4.0
+
+Reviewed-by: kvn
+---
+ hotspot/src/share/vm/memory/virtualspace.cpp | 2 +-
+ hotspot/src/share/vm/opto/lcm.cpp | 2 +-
+ hotspot/src/share/vm/opto/loopPredicate.cpp | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/hotspot/src/share/vm/memory/virtualspace.cpp b/hotspot/src/share/vm/memory/virtualspace.cpp
+index 82787f8a024..a3289d9b043 100644
+--- a/hotspot/src/share/vm/memory/virtualspace.cpp
++++ b/hotspot/src/share/vm/memory/virtualspace.cpp
+@@ -582,7 +582,7 @@ ReservedHeapSpace::ReservedHeapSpace(size_t size, size_t alignment, bool large)
+ assert(markOopDesc::encode_pointer_as_mark(&_base[size])->decode_pointer() == &_base[size],
+ "area must be distinguishable from marks for mark-sweep");
+
+- if (base() > 0) {
++ if (base() != NULL) {
+ MemTracker::record_virtual_memory_type((address)base(), mtJavaHeap);
+ }
+ }
+diff --git a/hotspot/src/share/vm/opto/lcm.cpp b/hotspot/src/share/vm/opto/lcm.cpp
+index 049376cc709..3ed99872641 100644
+--- a/hotspot/src/share/vm/opto/lcm.cpp
++++ b/hotspot/src/share/vm/opto/lcm.cpp
+@@ -39,7 +39,7 @@
+ // Check whether val is not-null-decoded compressed oop,
+ // i.e. will grab into the base of the heap if it represents NULL.
+ static bool accesses_heap_base_zone(Node *val) {
+- if (Universe::narrow_oop_base() > 0) { // Implies UseCompressedOops.
++ if (Universe::narrow_oop_base() != NULL) { // Implies UseCompressedOops.
+ if (val && val->is_Mach()) {
+ if (val->as_Mach()->ideal_Opcode() == Op_DecodeN) {
+ // This assumes all Decodes with TypePtr::NotNull are matched to nodes that
+diff --git a/hotspot/src/share/vm/opto/loopPredicate.cpp b/hotspot/src/share/vm/opto/loopPredicate.cpp
+index a3030676335..0de17405ccc 100644
+--- a/hotspot/src/share/vm/opto/loopPredicate.cpp
++++ b/hotspot/src/share/vm/opto/loopPredicate.cpp
+@@ -912,7 +912,7 @@ bool PhaseIdealLoop::loop_predication_impl(IdealLoopTree *loop) {
+ Node* idx = cmp->in(1);
+ assert(!invar.is_invariant(idx), "index is variant");
+ Node* rng = cmp->in(2);
+- assert(rng->Opcode() == Op_LoadRange || _igvn.type(rng)->is_int() >= 0, "must be");
++ assert(rng->Opcode() == Op_LoadRange || iff->is_RangeCheck() || _igvn.type(rng)->is_int()->_lo >= 0, "must be");
+ assert(invar.is_invariant(rng), "range must be invariant");
+ int scale = 1;
+ Node* offset = zero;
diff --git a/srcpkgs/openjdk9-bootstrap/template b/srcpkgs/openjdk9-bootstrap/template
index 801f49142621..7fecb035d89e 100644
--- a/srcpkgs/openjdk9-bootstrap/template
+++ b/srcpkgs/openjdk9-bootstrap/template
@@ -2,7 +2,7 @@
_final_jdk_home="usr/lib/jvm/java-9-openjdk"
pkgname=openjdk9-bootstrap
version=9.0.4p12
-revision=2
+revision=3
_repo_ver=${version/p/+}
archs="x86_64* i686* aarch64* arm* ppc64*"
wrksrc="jdk9u-jdk-${_repo_ver}"
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PR PATCH] [Merged]: openjdk9-bootstrap: fix build with gcc12
2022-10-15 9:20 [PR PATCH] openjdk9-bootstrap: fix build with gcc12 oreo639
` (15 preceding siblings ...)
2022-10-18 16:51 ` [PR PATCH] [Updated] " oreo639
@ 2022-10-19 1:34 ` sgn
16 siblings, 0 replies; 18+ messages in thread
From: sgn @ 2022-10-19 1:34 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1165 bytes --]
There's a merged pull request on the void-packages repository
openjdk9-bootstrap: fix build with gcc12
https://github.com/void-linux/void-packages/pull/39963
Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly**
https://github.com/void-linux/void-packages/issues/39809
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2022-10-19 1:34 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-15 9:20 [PR PATCH] openjdk9-bootstrap: fix build with gcc12 oreo639
2022-10-15 10:21 ` [PR PATCH] [Updated] " oreo639
2022-10-17 2:07 ` [PR REVIEW] " sgn
2022-10-17 2:59 ` oreo639
2022-10-17 3:01 ` oreo639
2022-10-17 3:03 ` oreo639
2022-10-17 3:06 ` [PR PATCH] [Updated] " oreo639
2022-10-17 3:09 ` oreo639
2022-10-17 3:12 ` [PR REVIEW] " oreo639
2022-10-17 3:12 ` oreo639
2022-10-17 3:13 ` oreo639
2022-10-17 4:13 ` oreo639
2022-10-18 11:17 ` sgn
2022-10-18 16:06 ` [PR PATCH] [Updated] " oreo639
2022-10-18 16:06 ` [PR REVIEW] " oreo639
2022-10-18 16:06 ` oreo639
2022-10-18 16:51 ` [PR PATCH] [Updated] " oreo639
2022-10-19 1:34 ` [PR PATCH] [Merged]: " sgn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).