Re: RFR: 8326583: Remove over-generalized DefineNativeToolchain solution [v4]

2024-03-13 Thread Magnus Ihse Bursie
On Tue, 27 Feb 2024 11:19:59 GMT, Magnus Ihse Bursie wrote: >> The idea of setting up general "toolchains" in the native build was good, >> but it turned out that we really only need a single toolchain, with a single >> twist: if it should use CC or CPP to link. This is better described by a >

Re: RFR: 8326583: Remove over-generalized DefineNativeToolchain solution [v4]

2024-03-04 Thread Claudio Nieder
On Tue, 27 Feb 2024 11:19:59 GMT, Magnus Ihse Bursie wrote: >> The idea of setting up general "toolchains" in the native build was good, >> but it turned out that we really only need a single toolchain, with a single >> twist: if it should use CC or CPP to link. This is better described by a >

Re: RFR: 8326583: Remove over-generalized DefineNativeToolchain solution [v4]

2024-03-04 Thread Magnus Ihse Bursie
On Mon, 4 Mar 2024 11:45:59 GMT, Julian Waters wrote: > I do hope that dropping ccache support isn't something that's planned though > :( Not really. The benefit of dropping it is quite small, and there might be use cases where it helps. But I think we should perhaps be more explicit in the

Re: RFR: 8326583: Remove over-generalized DefineNativeToolchain solution [v4]

2024-03-04 Thread Julian Waters
On Mon, 4 Mar 2024 12:58:28 GMT, Claudio Nieder wrote: > > Could I trouble you to mention what exactly was different? > > No trouble at all. > > `CCACHE_BASEDIR=/tmp/bceaed6d/jdk/`is completely missing. (The directory is > where I checked out OpenJDK) > > `CCACHE_SLOPPINESS` has the value `pc

Re: RFR: 8326583: Remove over-generalized DefineNativeToolchain solution [v4]

2024-03-04 Thread Claudio Nieder
On Mon, 4 Mar 2024 11:45:59 GMT, Julian Waters wrote: > Could I trouble you to mention what exactly was different? No trouble at all. `CCACHE_BASEDIR=/tmp/bceaed6d/jdk/`is completely missing. (The directory is where I checked out OpenJDK) `CCACHE_SLOPPINESS` has the value `pch_defines,time_m

Re: RFR: 8326583: Remove over-generalized DefineNativeToolchain solution [v4]

2024-03-04 Thread Julian Waters
On Mon, 4 Mar 2024 11:28:02 GMT, Magnus Ihse Bursie wrote: > > I wonder if it's the SetupToolchain changes that has caused this. ccache is > > collapsed into CC and CXX to my knowledge > > Yeah, it must have been. Would you like to take a look at it? Otherwise I'll > file a bug and fix it. Bre

Re: RFR: 8326583: Remove over-generalized DefineNativeToolchain solution [v4]

2024-03-04 Thread Magnus Ihse Bursie
On Mon, 4 Mar 2024 06:42:30 GMT, Julian Waters wrote: > I wonder if it's the SetupToolchain changes that has caused this. ccache is > collapsed into CC and CXX to my knowledge Yeah, it must have been. Would you like to take a look at it? Otherwise I'll file a bug and fix it. Breaking ccache wa

Re: RFR: 8326583: Remove over-generalized DefineNativeToolchain solution [v4]

2024-03-03 Thread Julian Waters
On Tue, 27 Feb 2024 11:19:59 GMT, Magnus Ihse Bursie wrote: >> The idea of setting up general "toolchains" in the native build was good, >> but it turned out that we really only need a single toolchain, with a single >> twist: if it should use CC or CPP to link. This is better described by a >

Re: RFR: 8326583: Remove over-generalized DefineNativeToolchain solution [v4]

2024-03-03 Thread Claudio Nieder
On Tue, 27 Feb 2024 11:19:59 GMT, Magnus Ihse Bursie wrote: >> The idea of setting up general "toolchains" in the native build was good, >> but it turned out that we really only need a single toolchain, with a single >> twist: if it should use CC or CPP to link. This is better described by a >

Re: RFR: 8326583: Remove over-generalized DefineNativeToolchain solution [v4]

2024-03-03 Thread Claudio Nieder
On Tue, 27 Feb 2024 11:19:59 GMT, Magnus Ihse Bursie wrote: >> The idea of setting up general "toolchains" in the native build was good, >> but it turned out that we really only need a single toolchain, with a single >> twist: if it should use CC or CPP to link. This is better described by a >

Re: RFR: 8326583: Remove over-generalized DefineNativeToolchain solution [v4]

2024-03-03 Thread Magnus Ihse Bursie
On Tue, 27 Feb 2024 11:19:59 GMT, Magnus Ihse Bursie wrote: >> The idea of setting up general "toolchains" in the native build was good, >> but it turned out that we really only need a single toolchain, with a single >> twist: if it should use CC or CPP to link. This is better described by a >

Re: RFR: 8326583: Remove over-generalized DefineNativeToolchain solution [v4]

2024-03-03 Thread Magnus Ihse Bursie
On Tue, 27 Feb 2024 11:19:59 GMT, Magnus Ihse Bursie wrote: >> The idea of setting up general "toolchains" in the native build was good, >> but it turned out that we really only need a single toolchain, with a single >> twist: if it should use CC or CPP to link. This is better described by a >

Re: RFR: 8326583: Remove over-generalized DefineNativeToolchain solution [v4]

2024-02-27 Thread Julian Waters
On Tue, 27 Feb 2024 11:19:59 GMT, Magnus Ihse Bursie wrote: >> The idea of setting up general "toolchains" in the native build was good, >> but it turned out that we really only need a single toolchain, with a single >> twist: if it should use CC or CPP to link. This is better described by a >

Re: RFR: 8326583: Remove over-generalized DefineNativeToolchain solution [v4]

2024-02-27 Thread Magnus Ihse Bursie
On Tue, 27 Feb 2024 11:44:31 GMT, Daniel Jeliński wrote: > FWIW, when I added -lstdc++ before both -static-libstdc++ and replaced LDCXX > with LD, the code compiled and linked just fine. Both GCC and G++ call the same linker, and the parameter differences are well documented. It's only a matter

Re: RFR: 8326583: Remove over-generalized DefineNativeToolchain solution [v4]

2024-02-27 Thread Daniel Jeliński
On Tue, 27 Feb 2024 11:19:59 GMT, Magnus Ihse Bursie wrote: >> The idea of setting up general "toolchains" in the native build was good, >> but it turned out that we really only need a single toolchain, with a single >> twist: if it should use CC or CPP to link. This is better described by a >

Re: RFR: 8326583: Remove over-generalized DefineNativeToolchain solution [v3]

2024-02-27 Thread Julian Waters
On Tue, 27 Feb 2024 11:09:26 GMT, Magnus Ihse Bursie wrote: > > can we get rid of LDCXX? > > Yeah, that is something I plan to look into. Linking C++ object files with > gcc will fail; and it might be that linking pure C with g++ might be > problematic. If this is the case, I hope we can at le

Re: RFR: 8326583: Remove over-generalized DefineNativeToolchain solution [v4]

2024-02-27 Thread Magnus Ihse Bursie
> The idea of setting up general "toolchains" in the native build was good, but > it turned out that we really only need a single toolchain, with a single > twist: if it should use CC or CPP to link. This is better described by a > specific argument to SetupNativeCompilation, LANG := C++ or LANG

Re: RFR: 8326583: Remove over-generalized DefineNativeToolchain solution [v3]

2024-02-27 Thread Magnus Ihse Bursie
On Tue, 27 Feb 2024 08:14:56 GMT, Julian Waters wrote: > can we get rid of LDCXX? Yeah, that is something I plan to look into. Linking C++ object files with gcc will fail; and it might be that linking pure C with g++ might be problematic. If this is the case, I hope we can at least determine

Re: RFR: 8326583: Remove over-generalized DefineNativeToolchain solution [v3]

2024-02-27 Thread Magnus Ihse Bursie
On Tue, 27 Feb 2024 08:29:44 GMT, Julian Waters wrote: > All those new parameters to SetupNativeCompilation, were they always there > and the comments about them were just missing from the documentation about > the function? Yep. The toolchain definition was a way to "package" multiple argumen

Re: RFR: 8326583: Remove over-generalized DefineNativeToolchain solution [v3]

2024-02-27 Thread Julian Waters
On Mon, 26 Feb 2024 20:21:55 GMT, Magnus Ihse Bursie wrote: >> The idea of setting up general "toolchains" in the native build was good, >> but it turned out that we really only need a single toolchain, with a single >> twist: if it should use CC or CPP to link. This is better described by a >

Re: RFR: 8326583: Remove over-generalized DefineNativeToolchain solution [v3]

2024-02-27 Thread Julian Waters
On Tue, 27 Feb 2024 08:07:38 GMT, Daniel Jeliński wrote: > can we get rid of LDCXX? On my system LDCXX is mapped to `g++` and LD is > `gcc`; I searched for the differences, and the only thing I could find is > that `g++` implicitly adds `-lstdc++ -shared-libgcc`; I suppose we could > explicitl

Re: RFR: 8326583: Remove over-generalized DefineNativeToolchain solution [v3]

2024-02-27 Thread Daniel Jeliński
On Mon, 26 Feb 2024 20:21:55 GMT, Magnus Ihse Bursie wrote: >> The idea of setting up general "toolchains" in the native build was good, >> but it turned out that we really only need a single toolchain, with a single >> twist: if it should use CC or CPP to link. This is better described by a >

Re: RFR: 8326583: Remove over-generalized DefineNativeToolchain solution [v3]

2024-02-26 Thread Julian Waters
On Mon, 26 Feb 2024 20:21:55 GMT, Magnus Ihse Bursie wrote: >> The idea of setting up general "toolchains" in the native build was good, >> but it turned out that we really only need a single toolchain, with a single >> twist: if it should use CC or CPP to link. This is better described by a >

Re: RFR: 8326583: Remove over-generalized DefineNativeToolchain solution

2024-02-26 Thread Magnus Ihse Bursie
On Sat, 24 Feb 2024 06:04:40 GMT, Julian Waters wrote: >> The idea of setting up general "toolchains" in the native build was good, >> but it turned out that we really only need a single toolchain, with a single >> twist: if it should use CC or CPP to link. This is better described by a >> spe

Re: RFR: 8326583: Remove over-generalized DefineNativeToolchain solution [v3]

2024-02-26 Thread Magnus Ihse Bursie
> The idea of setting up general "toolchains" in the native build was good, but > it turned out that we really only need a single toolchain, with a single > twist: if it should use CC or CPP to link. This is better described by a > specific argument to SetupNativeCompilation, LANG := C++ or LANG

Re: RFR: 8326583: Remove over-generalized DefineNativeToolchain solution [v2]

2024-02-26 Thread Magnus Ihse Bursie
> The idea of setting up general "toolchains" in the native build was good, but > it turned out that we really only need a single toolchain, with a single > twist: if it should use CC or CPP to link. This is better described by a > specific argument to SetupNativeCompilation, LANG := C++ or LANG

Re: RFR: 8326583: Remove over-generalized DefineNativeToolchain solution

2024-02-26 Thread Magnus Ihse Bursie
On Fri, 23 Feb 2024 16:23:43 GMT, Magnus Ihse Bursie wrote: > The idea of setting up general "toolchains" in the native build was good, but > it turned out that we really only need a single toolchain, with a single > twist: if it should use CC or CPP to link. This is better described by a > sp

Re: RFR: 8326583: Remove over-generalized DefineNativeToolchain solution

2024-02-26 Thread Magnus Ihse Bursie
On Fri, 23 Feb 2024 16:23:43 GMT, Magnus Ihse Bursie wrote: > The idea of setting up general "toolchains" in the native build was good, but > it turned out that we really only need a single toolchain, with a single > twist: if it should use CC or CPP to link. This is better described by a > sp

Re: RFR: 8326583: Remove over-generalized DefineNativeToolchain solution

2024-02-23 Thread Julian Waters
On Fri, 23 Feb 2024 16:23:43 GMT, Magnus Ihse Bursie wrote: > The idea of setting up general "toolchains" in the native build was good, but > it turned out that we really only need a single toolchain, with a single > twist: if it should use CC or CPP to link. This is better described by a > sp

Re: RFR: 8326583: Remove over-generalized DefineNativeToolchain solution

2024-02-23 Thread Erik Joelsson
On Fri, 23 Feb 2024 16:23:43 GMT, Magnus Ihse Bursie wrote: > The idea of setting up general "toolchains" in the native build was good, but > it turned out that we really only need a single toolchain, with a single > twist: if it should use CC or CPP to link. This is better described by a > sp

Re: RFR: 8326583: Remove over-generalized DefineNativeToolchain solution

2024-02-23 Thread Magnus Ihse Bursie
On Fri, 23 Feb 2024 16:23:43 GMT, Magnus Ihse Bursie wrote: > The idea of setting up general "toolchains" in the native build was good, but > it turned out that we really only need a single toolchain, with a single > twist: if it should use CC or CPP to link. This is better described by a > sp

RFR: 8326583: Remove over-generalized DefineNativeToolchain solution

2024-02-23 Thread Magnus Ihse Bursie
The idea of setting up general "toolchains" in the native build was good, but it turned out that we really only need a single toolchain, with a single twist: if it should use CC or CPP to link. This is better described by a specific argument to SetupNativeCompilation, LANG := C++ or LANG := C (t