RFR: 8295435: Build failure with GCC7 after JDK-8294314 due to strict-overflow warnings

2022-10-17 Thread Jie Fu
Hi all, Let's disable `-Werror=strict-overflow` to get it build with gcc7 on Linux/x86. bytecodeAssembler.cpp instanceKlass.cpp klassVtable.cpp Thanks. Best regards, Jie - Commit messages: - 8295435: Build failure with GCC7 after JDK-8294314 due to strict-overflow warnings

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v7]

2022-10-17 Thread David Holmes
On Wed, 12 Oct 2022 17:00:15 GMT, Andrew Haley wrote: >> A bug in GCC causes shared libraries linked with -ffast-math to disable >> denormal arithmetic. This breaks Java's floating-point semantics. >> >> The bug is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55522 >> >> One solution is to

Re: RFR: 8294594: Fix cast-function-type warnings in signal handling code [v3]

2022-10-17 Thread David Holmes
On Mon, 17 Oct 2022 13:40:23 GMT, Aleksey Shipilev wrote: >> After [JDK-8294314](https://bugs.openjdk.org/browse/JDK-8294314), we would >> have signals_posix.cpp excluded with cast-function-type warning: > > Aleksey Shipilev has updated the pull request with a new target base due to a > merge

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v7]

2022-10-17 Thread David Holmes
On Wed, 12 Oct 2022 17:00:15 GMT, Andrew Haley wrote: >> A bug in GCC causes shared libraries linked with -ffast-math to disable >> denormal arithmetic. This breaks Java's floating-point semantics. >> >> The bug is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55522 >> >> One solution is to

Integrated: 8295231: Move all linking of native libraries to make

2022-10-17 Thread Julian Waters
On Mon, 10 Oct 2022 14:15:37 GMT, Julian Waters wrote: > Some external libraries required by native code are linked via linker > comments embedded in pragmas. Searching for which libraries are linked can > then become frustrating and confusing since they may be included in an > obscure place,

Re: RFR: 8294468: Fix char-subscripts warnings in Hotspot [v2]

2022-10-17 Thread Kim Barrett
On Mon, 17 Oct 2022 18:08:21 GMT, Aleksey Shipilev wrote: >> There seem to be the only place in Hotspot where this warning fires, yet the >> warning is disabled wholesale for Hotspot. This is not good. >> >> I can trace the addition of char-subscripts exclusion to >>

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v7]

2022-10-17 Thread Vladimir Ivanov
On Wed, 12 Oct 2022 17:00:15 GMT, Andrew Haley wrote: >> A bug in GCC causes shared libraries linked with -ffast-math to disable >> denormal arithmetic. This breaks Java's floating-point semantics. >> >> The bug is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55522 >> >> One solution is to

Re: RFR: 8294438: Fix misleading-indentation warnings in hotspot [v2]

2022-10-17 Thread Aleksey Shipilev
> There are number of places where misleading-indentation is reported by GCC. > Currently, the warning is disabled for the entirety of Hotspot, which is not > good. > > C1 does an unusual style here. Changing it globally would touch a lot of > lines. Instead of doing that, I fit the existing

Re: RFR: 8294467: Fix sequence-point warnings in Hotspot [v2]

2022-10-17 Thread Aleksey Shipilev
> There seem to be the only place in Hotspot where this warning fires, yet the > warning is disabled wholesale for Hotspot. This is not good. > > I can trace the addition of sequence-point exclusion to > [JDK-8211029](https://bugs.openjdk.org/browse/JDK-8211029) (Sep 2018), yet > the only

Re: RFR: 8294591: Fix cast-function-type warning in TemplateTable [v4]

2022-10-17 Thread Aleksey Shipilev
> After [JDK-8294314](https://bugs.openjdk.org/browse/JDK-8294314), we would > have `templateTable.cpp` excluded with cast-function-type warning. The > underlying cause for it is casting functions for `ldc` bytecodes, which take > `bool`-typed handlers: Aleksey Shipilev has updated the pull

Re: RFR: 8294468: Fix char-subscripts warnings in Hotspot [v2]

2022-10-17 Thread Aleksey Shipilev
> There seem to be the only place in Hotspot where this warning fires, yet the > warning is disabled wholesale for Hotspot. This is not good. > > I can trace the addition of char-subscripts exclusion to > [JDK-8211029](https://bugs.openjdk.org/browse/JDK-8211029) (Sep 2018). The > only place

Re: RFR: 8295231: Move all linking of native libraries to make [v6]

2022-10-17 Thread Alexey Semenyuk
On Mon, 17 Oct 2022 17:37:11 GMT, Erik Joelsson wrote: > I believe this is part of the effort for > https://bugs.openjdk.org/browse/JDK-8288293. Agree. I'd prefer to have a different description of the bug though to make it clear that this is necessary for decoupling a compiler and an OS.

Re: RFR: 8295231: Move all linking of native libraries to make [v6]

2022-10-17 Thread Erik Joelsson
On Mon, 17 Oct 2022 17:16:21 GMT, Alexey Semenyuk wrote: > The change looks harmless. Howevere I don't understand how searching for the > standard Windows libs can then become frustrating. I believe this is part of the effort for https://bugs.openjdk.org/browse/JDK-8288293. -

Re: RFR: 8295417: Pass $AR to binutils cross-build

2022-10-17 Thread Erik Joelsson
On Mon, 17 Oct 2022 15:46:11 GMT, Aleksey Shipilev wrote: > While adapting my CI to build hsdis automatically, I realized that sometimes > we miss the proper $AR for binutils cross-build. Configure would then fail > like: > > > $ CXX=aarch64-linux-gnu-g++ CC=aarch64-linux-gnu-gcc sh

Re: RFR: 8295231: Move all linking of native libraries to make [v6]

2022-10-17 Thread Erik Joelsson
On Mon, 17 Oct 2022 14:41:06 GMT, Julian Waters wrote: >> Some external libraries required by native code are linked via linker >> comments embedded in pragmas. Searching for which libraries are linked can >> then become frustrating and confusing since they may be included in an >> obscure

Re: RFR: 8295231: Move all linking of native libraries to make [v6]

2022-10-17 Thread Alexey Semenyuk
On Mon, 17 Oct 2022 14:41:06 GMT, Julian Waters wrote: >> Some external libraries required by native code are linked via linker >> comments embedded in pragmas. Searching for which libraries are linked can >> then become frustrating and confusing since they may be included in an >> obscure

RFR: 8295417: Pass $AR to binutils cross-build

2022-10-17 Thread Aleksey Shipilev
While adapting my CI to build hsdis automatically, I realized that sometimes we miss the proper $AR for binutils cross-build. Configure would then fail like: $ CXX=aarch64-linux-gnu-g++ CC=aarch64-linux-gnu-gcc sh ./configure --with-debug-level=fastdebug --openjdk-target=aarch64-linux-gnu

Re: RFR: 8295231: Move all linking of native libraries to make [v6]

2022-10-17 Thread Julian Waters
> Some external libraries required by native code are linked via linker > comments embedded in pragmas. Searching for which libraries are linked can > then become frustrating and confusing since they may be included in an > obscure place, and for all relevant compilers there is no difference

Re: RFR: 8295231: Move all linking of native libraries to make [v4]

2022-10-17 Thread Julian Waters
On Mon, 17 Oct 2022 14:31:46 GMT, Julian Waters wrote: >> Some external libraries required by native code are linked via linker >> comments embedded in pragmas. Searching for which libraries are linked can >> then become frustrating and confusing since they may be included in an >> obscure

Re: RFR: 8295231: Move all linking of native libraries to make [v5]

2022-10-17 Thread Julian Waters
> Some external libraries required by native code are linked via linker > comments embedded in pragmas. Searching for which libraries are linked can > then become frustrating and confusing since they may be included in an > obscure place, and for all relevant compilers there is no difference

Re: RFR: 8295231: Move all linking of native libraries to make [v4]

2022-10-17 Thread Julian Waters
> Some external libraries required by native code are linked via linker > comments embedded in pragmas. Searching for which libraries are linked can > then become frustrating and confusing since they may be included in an > obscure place, and for all relevant compilers there is no difference

Re: RFR: 8295231: Move all linking of native libraries to make [v3]

2022-10-17 Thread Julian Waters
> Some external libraries required by native code are linked via linker > comments embedded in pragmas. Searching for which libraries are linked can > then become frustrating and confusing since they may be included in an > obscure place, and for all relevant compilers there is no difference

Re: RFR: 8295231: Move all linking of native libraries to make [v3]

2022-10-17 Thread Julian Waters
On Sun, 16 Oct 2022 13:18:14 GMT, Alan Bateman wrote: >> Julian Waters has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update Guid.cpp > > src/java.base/windows/native/libnio/ch/FileDispatcherImpl.c line 38: > >> 36: >> 37: #include

Re: RFR: 8295231: Move all linking of native libraries to make [v2]

2022-10-17 Thread Julian Waters
> Some external libraries required by native code are linked via linker > comments embedded in pragmas. Searching for which libraries are linked can > then become frustrating and confusing since they may be included in an > obscure place, and for all relevant compilers there is no difference

Re: RFR: 8295231: Move all linking of native libraries to make

2022-10-17 Thread Julian Waters
On Mon, 17 Oct 2022 09:24:58 GMT, Magnus Ihse Bursie wrote: > @TheShermanTanker Question: is this a Windows-specific thing, or are there > pragma-loaded libraries for other compilers as well? To my knowledge only Visual C++ has the ability to perform linking through pragmas, the comment

Integrated: 8295262: Build binutils out of source tree

2022-10-17 Thread Ludovic Henry
On Thu, 13 Oct 2022 07:43:33 GMT, Ludovic Henry wrote: > Currently, when passing --with-binutils-src, binutils is built in the source > tree. That leads to conflicting targets when compiling for different > architectures (ex: amd64 on the host, and riscv64 or aarch64 for the target) > from

Re: RFR: 8294591: Fix cast-function-type warning in TemplateTable [v3]

2022-10-17 Thread Aleksey Shipilev
> After [JDK-8294314](https://bugs.openjdk.org/browse/JDK-8294314), we would > have `templateTable.cpp` excluded with cast-function-type warning. The > underlying cause for it is casting functions for `ldc` bytecodes, which take > `bool`-typed handlers: Aleksey Shipilev has updated the pull

Re: RFR: 8294594: Fix cast-function-type warnings in signal handling code [v3]

2022-10-17 Thread Aleksey Shipilev
On Mon, 17 Oct 2022 13:40:23 GMT, Aleksey Shipilev wrote: >> After [JDK-8294314](https://bugs.openjdk.org/browse/JDK-8294314), we would >> have signals_posix.cpp excluded with cast-function-type warning: > > Aleksey Shipilev has updated the pull request with a new target base due to a > merge

Re: RFR: 8294594: Fix cast-function-type warnings in signal handling code [v3]

2022-10-17 Thread Aleksey Shipilev
> After [JDK-8294314](https://bugs.openjdk.org/browse/JDK-8294314), we would > have signals_posix.cpp excluded with cast-function-type warning: Aleksey Shipilev has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains five commits: - Merge

Re: RFR: 8295262: Build binutils out of source tree [v3]

2022-10-17 Thread Ludovic Henry
> Currently, when passing --with-binutils-src, binutils is built in the source > tree. That leads to conflicting targets when compiling for different > architectures (ex: amd64 on the host, and riscv64 or aarch64 for the target) > from the same jdk source tree. > > The simplest solution is to

Re: RFR: 8295262: Build binutils out of source tree [v2]

2022-10-17 Thread Ludovic Henry
On Mon, 17 Oct 2022 09:17:09 GMT, Magnus Ihse Bursie wrote: >> Ludovic Henry has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains three additional

Integrated: 8295192: Use original configure command line when called from a script

2022-10-17 Thread Magnus Ihse Bursie
On Wed, 12 Oct 2022 08:07:35 GMT, Magnus Ihse Bursie wrote: > Sometimes, the configure script is not called directly, but indirectly, using > e.g. a wrapper script. This happens for instance in the case of using jib.sh. > > In such cases, calling "make reconfigure" will not re-execute the

Re: RFR: 8295231: Move all linking of native libraries to make

2022-10-17 Thread Magnus Ihse Bursie
On Mon, 10 Oct 2022 14:15:37 GMT, Julian Waters wrote: > Some external libraries required by native code are linked via linker > comments embedded in pragmas. Searching for which libraries are linked can > then become frustrating and confusing since they may be included in an > obscure place,

Re: RFR: 8295070: Introduce more target combinations for compiler flags [v3]

2022-10-17 Thread Magnus Ihse Bursie
On Mon, 10 Oct 2022 15:29:16 GMT, Julian Waters wrote: >> Several parts of the make system in the JDK has large parts of cluttered if >> branches dedicated to setting flags for the specific compiler used in the >> build. This could be more neatly accomplished by instead adding more target >>

Re: RFR: 8295262: Build binutils out of source tree [v2]

2022-10-17 Thread Magnus Ihse Bursie
On Thu, 13 Oct 2022 08:41:35 GMT, Ludovic Henry wrote: >> Currently, when passing --with-binutils-src, binutils is built in the source >> tree. That leads to conflicting targets when compiling for different >> architectures (ex: amd64 on the host, and riscv64 or aarch64 for the target) >>

Re: RFR: 8293422: DWARF emitted by Clang cannot be parsed [v4]

2022-10-17 Thread Magnus Ihse Bursie
On Tue, 11 Oct 2022 08:18:08 GMT, Christian Hagedorn wrote: >> The DWARF debugging symbols emitted by Clang is different from what GCC is >> emitting. While GCC produces a complete `.debug_aranges` section (which is >> required in the DWARF parser), Clang does not. As a result, the DWARF

Re: RFR: 8294314: Minimize disabled warnings in hotspot [v21]

2022-10-17 Thread Aleksey Shipilev
On Sat, 15 Oct 2022 08:11:39 GMT, Kim Barrett wrote: > Looks good. I think you want to do the actual "Approve" to supersede your previous "Request changes" review. Anyway, I think we are good for integration here, @magicus? - PR: https://git.openjdk.org/jdk/pull/10414

Re: RFR: 8295231: Move all linking of native libraries to make

2022-10-17 Thread Thomas Stuefe
On Mon, 10 Oct 2022 14:15:37 GMT, Julian Waters wrote: > Some external libraries required by native code are linked via linker > comments embedded in pragmas. Searching for which libraries are linked can > then become frustrating and confusing since they may be included in an > obscure place,