RFR: 8256829: GNU hash style is not available on MIPS

2020-11-22 Thread Aleksey Shipilev
For fun, I tried to build `linux-mips64el-zero-fastdebug`, and it cannot be 
built, because linker complains:


collect2: error: ld returned 1 exit status

I believe it is a regression in 16, as GNU hash style was forced with 
[JDK-8200738](https://bugs.openjdk.java.net/browse/JDK-8200738). The way out is 
to special-case MIPS hash-style to `sysv`. This enumerates all MIPS targets 
that `make/autoconf/platform.m4` knows about.

Testing:
 - [x] Linux mipsel zero fastdebug build (requires additional unrelated fixes)
 - [x] Linux mips64el zero fastdebug build

-

Commit messages:
 - 8256829: GNU hash style is not available on MIPS

Changes: https://git.openjdk.java.net/jdk/pull/1374/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1374&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8256829
  Stats: 11 lines in 1 file changed: 10 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1374.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1374/head:pull/1374

PR: https://git.openjdk.java.net/jdk/pull/1374


Re: RFR: 8256829: GNU hash style is not available on MIPS

2020-11-22 Thread John Paul Adrian Glaubitz
On Sun, 22 Nov 2020 14:19:04 GMT, Aleksey Shipilev  wrote:

> For fun, I tried to build `linux-mips64el-zero-fastdebug`, and it cannot be 
> built, because linker complains:
> 
> 
> collect2: error: ld returned 1 exit status
> 
> I believe it is a regression in 16, as GNU hash style was forced with 
> [JDK-8200738](https://bugs.openjdk.java.net/browse/JDK-8200738). The way out 
> is to special-case MIPS hash-style to `sysv`. This enumerates all MIPS 
> targets that `make/autoconf/platform.m4` knows about.
> 
> Attention @DamonFool, who must be running into this problem for their MIPS 
> builds?
> 
> Testing:
>  - [x] Linux mipsel zero fastdebug build (requires additional unrelated fixes)
>  - [x] Linux mips64el zero fastdebug build

Hi Aleksey!

> For fun, I tried to build `linux-mips64el-zero-fastdebug`, and it cannot be 
> built, because linker complains:

Thanks for looking to fixing the non-mainstream architectures. I'm surprised we 
don't need the sigset patch anymore for MIPS, looks like that has been 
upstreamed already.

If you are looking into fixing more of such issues, you can have a look at the 
patches we currently carry in Debian to address various of such issues:

> https://git.launchpad.net/~openjdk/ubuntu/+source/openjdk/+git/openjdk/tree/debian/patches

I'm currently busy with LLVM but I'm planning to get more active with OpenJDK 
in the future and get more of such fixes upstreamed.

Again, thanks for fixing this. We actually use OpenJDK on MIPS targets in 
Debian.

-

PR: https://git.openjdk.java.net/jdk/pull/1374


Re: RFR: 8256829: GNU hash style is not available on MIPS

2020-11-23 Thread Jie Fu
On Sun, 22 Nov 2020 14:47:07 GMT, John Paul Adrian Glaubitz 
 wrote:

>> For fun, I tried to build `linux-mips64el-zero-fastdebug`, and it cannot be 
>> built, because linker complains:
>> 
>> 
>> collect2: error: ld returned 1 exit status
>> 
>> I believe it is a regression in 16, as GNU hash style was forced with 
>> [JDK-8200738](https://bugs.openjdk.java.net/browse/JDK-8200738). The way out 
>> is to special-case MIPS hash-style to `sysv`. This enumerates all MIPS 
>> targets that `make/autoconf/platform.m4` knows about.
>> 
>> Attention @DamonFool, who must be running into this problem for their MIPS 
>> builds?
>> 
>> Testing:
>>  - [x] Linux mipsel zero fastdebug build (requires additional unrelated 
>> fixes)
>>  - [x] Linux mips64el zero fastdebug build
>
> Hi Aleksey!
> 
>> For fun, I tried to build `linux-mips64el-zero-fastdebug`, and it cannot be 
>> built, because linker complains:
> 
> Thanks for looking to fixing the non-mainstream architectures. I'm surprised 
> we don't need the sigset patch anymore for MIPS, looks like that has been 
> upstreamed already.
> 
> If you are looking into fixing more of such issues, you can have a look at 
> the patches we currently carry in Debian to address various of such issues:
> 
>> https://git.launchpad.net/~openjdk/ubuntu/+source/openjdk/+git/openjdk/tree/debian/patches
> 
> I'm currently busy with LLVM but I'm planning to get more active with OpenJDK 
> in the future and get more of such fixes upstreamed.
> 
> Again, thanks for fixing this. We actually use OpenJDK on MIPS targets in 
> Debian.

@theaoqi and @xiangzhai would you like to verify this fix?
Thanks.

-

PR: https://git.openjdk.java.net/jdk/pull/1374


Re: RFR: 8256829: GNU hash style is not available on MIPS

2020-11-23 Thread Ao Qi
On Sun, 22 Nov 2020 14:19:04 GMT, Aleksey Shipilev  wrote:

> For fun, I tried to build `linux-mips64el-zero-fastdebug`, and it cannot be 
> built, because linker complains:
> 
> 
> collect2: error: ld returned 1 exit status
> 
> I believe it is a regression in 16, as GNU hash style was forced with 
> [JDK-8200738](https://bugs.openjdk.java.net/browse/JDK-8200738). The way out 
> is to special-case MIPS hash-style to `sysv`. This enumerates all MIPS 
> targets that `make/autoconf/platform.m4` knows about.
> 
> Attention @DamonFool, who must be running into this problem for their MIPS 
> builds?
> 
> Testing:
>  - [x] Linux mipsel zero fastdebug build (requires additional unrelated fixes)
>  - [x] Linux mips64el zero fastdebug build

@shipilev Thanks for fixing this! I am testing the patch with native builds. 
When there is a result, I will reply.

-

PR: https://git.openjdk.java.net/jdk/pull/1374


Re: RFR: 8256829: GNU hash style is not available on MIPS

2020-11-23 Thread Magnus Ihse Bursie
On Sun, 22 Nov 2020 14:19:04 GMT, Aleksey Shipilev  wrote:

> For fun, I tried to build `linux-mips64el-zero-fastdebug`, and it cannot be 
> built, because linker complains:
> 
> 
> collect2: error: ld returned 1 exit status
> 
> I believe it is a regression in 16, as GNU hash style was forced with 
> [JDK-8200738](https://bugs.openjdk.java.net/browse/JDK-8200738). The way out 
> is to special-case MIPS hash-style to `sysv`. This enumerates all MIPS 
> targets that `make/autoconf/platform.m4` knows about.
> 
> Attention @DamonFool, who must be running into this problem for their MIPS 
> builds?
> 
> Testing:
>  - [x] Linux mipsel zero fastdebug build (requires additional unrelated fixes)
>  - [x] Linux mips64el zero fastdebug build

Given that it works on MIPS, it looks good to me. Too bad gnu hash style is not 
universally accepted. :(

-

Marked as reviewed by ihse (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/1374


Re: RFR: 8256829: GNU hash style is not available on MIPS

2020-11-23 Thread Ao Qi
On Mon, 23 Nov 2020 11:23:55 GMT, Magnus Ihse Bursie  wrote:

>> For fun, I tried to build `linux-mips64el-zero-fastdebug`, and it cannot be 
>> built, because linker complains:
>> 
>> 
>> collect2: error: ld returned 1 exit status
>> 
>> I believe it is a regression in 16, as GNU hash style was forced with 
>> [JDK-8200738](https://bugs.openjdk.java.net/browse/JDK-8200738). The way out 
>> is to special-case MIPS hash-style to `sysv`. This enumerates all MIPS 
>> targets that `make/autoconf/platform.m4` knows about.
>> 
>> Attention @DamonFool, who must be running into this problem for their MIPS 
>> builds?
>> 
>> Testing:
>>  - [x] Linux mipsel zero fastdebug build (requires additional unrelated 
>> fixes)
>>  - [x] Linux mips64el zero fastdebug build
>
> Given that it works on MIPS, it looks good to me. Too bad gnu hash style is 
> not universally accepted. :(

Sorry for the late reply. Monday is a busy day and I used a zero jdk as boot 
jdk, so the test took some time. The native build of 
linux-mips64el-zero-release has passed with this patch.

I noticed that there is some [work of MIPS support for GNU 
hash](https://sourceware.org/pipermail/binutils/2019-July/107496.html), but I 
don't know the latest progress. I tried [debian:latest 
images](https://hub.docker.com/_/debian), GNU hash is not supported yet. I 
think we should keep this patch until MIPS support for GUN hash is integrated 
into downstream toolchains one day.

@glaubitz , FYI, yes, the sigset problem was 
[solved](https://hg.openjdk.java.net/jdk/jdk/rev/3086f9259e97) :)

-

PR: https://git.openjdk.java.net/jdk/pull/1374


Re: RFR: 8256829: GNU hash style is not available on MIPS

2020-11-23 Thread Aleksey Shipilev
On Mon, 23 Nov 2020 16:52:07 GMT, Ao Qi  wrote:

>> Given that it works on MIPS, it looks good to me. Too bad gnu hash style is 
>> not universally accepted. :(
>
> Sorry for the late reply. Monday is a busy day and I used a zero jdk as boot 
> jdk, so the test took some time. The native build of 
> linux-mips64el-zero-release has passed with this patch.
> 
> I noticed that there is some [work of MIPS support for GNU 
> hash](https://sourceware.org/pipermail/binutils/2019-July/107496.html), but I 
> don't know the latest progress. I tried [debian:latest 
> images](https://hub.docker.com/_/debian), GNU hash is not supported yet. I 
> think we should keep this patch until MIPS support for GUN hash is integrated 
> into downstream toolchains one day.
> 
> @glaubitz , FYI, yes, the sigset problem was 
> [solved](https://hg.openjdk.java.net/jdk/jdk/rev/3086f9259e97) :)

Thanks folks! I rechecked MIPS Zero still builds after today's whirlwind.

-

PR: https://git.openjdk.java.net/jdk/pull/1374