RFR: JDK-8200738 Use --hash-style=gnu for gcc

Ioi Lam ioi.lam at oracle.com
Tue Jun 16 22:43:09 UTC 2020



On 6/15/20 2:08 AM, Magnus Ihse Bursie wrote:
> On 2020-06-15 07:46, David Holmes wrote:
>> Hi Magnus,
>>
>> On 13/06/2020 1:42 am, Magnus Ihse Bursie wrote:
>>> When support for gnu hash tables were added to the gcc toolchains, 
>>> the OpenJDK build system added a hack to change --hash-style=gnu to 
>>> --hash-style=both unconditionally, citing compatibility concerns.
>>
>> Exactly how are these "hash styles" used? What difference does it 
>> make what style is used? Who raised the compatibility concerns?
> It's how the hash table for the dynamic linker is implemented. "sysv" 
> is the original, old-style hash table, which has several deficits. [1] 
> The modern gnu-style hash table has been existing in the dynamic 
> linker for ages. The compatibility concerns were likely raised due to 
> Solaris, or that this was a new thing back in the days. I have not 
> heard about who originally claimed there was an issue, but when I 
> wanted to remove it years ago when we created the new build system, 

Looks good to me.

> someone said like "eh, I dunno, I think someone said it needed to be 
> there but he's no longer with the company, but I'd leave it in place 
> if I were you", or something along those lines.
>

I think we should go with "if it breaks anything, we can always change 
it back" :-)

Thanks
- Ioi


> /Magnus
> [1] https://www.akkadia.org/drepper/dsohowto.pdf
>
>>
>> Thanks,
>> David
>>
>>> --hash-style=gnu has a very slight performance advantage over 
>>> --hash-style=both (very small static footprint reductions, tiny 
>>> startup cost differences). Both --hash-style=gnu and 
>>> --hash-style=both have a small to potentially large performance 
>>> advantage over --hash-style=sysv
>>>
>>> We should only use --hash-style=gnu. It's been the default in 
>>> Ubuntu's build of gcc since gcc 4.4[1], and likely similar in other 
>>> distros.
>>>
>>> I also removed LIBJSIG_NOEXECSTACK_LDFLAGS which is no longer used.
>>>
>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8200738
>>> WebRev: 
>>> http://cr.openjdk.java.net/~ihse/JDK-8200738-use-hash-style-gnu/webrev.01
>>>
>>> /Magnus
>>>
>>> [1] https://launchpad.net/ubuntu/maverick/+source/gcc-4.4/+changelog
>>>
>




More information about the build-dev mailing list