Re: RFR: 8311846: Resolve duplicate 'Thread' related symbols with JDK static linking

2024-01-21 Thread Jiangli Zhou
On Sat, 20 Jan 2024 18:00:15 GMT, Andrew Haley  wrote:

> > > You could support one build by adding something like 
> > > -DSUPPORTS_STATIC_LINK for both .so and .a builds for Google, then use 
> > > that to protect the renaming.
> > 
> > 
> > Thanks, @coleenp. I think that could work for all different cases. I'll 
> > reflect that in this PR.
> > For longer term we probably still want to find a cleaner solution when the 
> > static support becomes more popular.
> 
> I think you should be able to use ld and objcopy to merge the .o files and 
> hide all of the symbols you don't want to export.

We also discussed about `objcopy` in 
https://github.com/openjdk/jdk/pull/14808#issuecomment-1631597197 and 
https://github.com/openjdk/jdk/pull/14808#issuecomment-1631611220. My main 
concern was the portability of `objcopy` approach.

-

PR Comment: https://git.openjdk.org/jdk/pull/17456#issuecomment-1903359606


Re: RFR: 8309044: Replace NULL with nullptr, final sweep of hotspot code [v2]

2024-01-21 Thread Julian Waters
On Tue, 30 May 2023 19:15:38 GMT, Johan Sjölen  wrote:

>> A final sweep of Hotspot to remove all re-added NULLs. With only 110 changes 
>> I'd appreciate if this was considered trivial.
>
> Johan Sjölen has updated the pull request incrementally with two additional 
> commits since the last revision:
> 
>  - Align
>  - Suggestions

For Visual C++, that would be #pragma deprecated("NULL")

To quote Microsoft:
"You can deprecate macro names. Place the macro name in quotes or else macro 
expansion will occur."

I have no idea how to achieve this with the xlc compiler

-

PR Comment: https://git.openjdk.org/jdk/pull/14198#issuecomment-1902611263


Re: RFR: 8309044: Replace NULL with nullptr, final sweep of hotspot code [v2]

2024-01-21 Thread Julian Waters
On Tue, 30 May 2023 19:15:38 GMT, Johan Sjölen  wrote:

>> A final sweep of Hotspot to remove all re-added NULLs. With only 110 changes 
>> I'd appreciate if this was considered trivial.
>
> Johan Sjölen has updated the pull request incrementally with two additional 
> commits since the last revision:
> 
>  - Align
>  - Suggestions

I'm an entire year late, but if poisoning NULL is desired, what about #pragma 
GCC poison?

-

PR Comment: https://git.openjdk.org/jdk/pull/14198#issuecomment-1902610611