JDK 9 fails to build on MIPS

Thomas Stüfe thomas.stuefe at gmail.com
Thu Dec 1 18:48:48 UTC 2016


On Thu, Dec 1, 2016 at 2:20 PM, David Holmes <david.holmes at oracle.com>
wrote:

> Hi James,
>
> On 1/12/2016 3:50 AM, James Cowgill wrote:
>
>> Hi,
>>
>> Firstly I have never submitted anything to OpenJDK before so apologies
>> if I haven't done things the right way. I also have no bug number for
>> this.
>>
>
> First let me say thanks for the contribution. Information on contributing
> is here:
>
> http://openjdk.java.net/contribute/
>
> For any non-trivial contribution to be accepted you would need to sign the
> OCA. Though in this case this is arguably a variation of the AIX code
> anyway.
>
> OpenJDK 9 does not build on MIPS machines and hasn't for some time. This
>> is due to code in hotspot which assumes NSIG <= 65 which is not the case
>> on MIPS since MIPS has 127 signal numbers.
>>
>
> Given MIPS is not supported and the MIPS porting project seems dormant, if
> not dead, I am surprised if this is the only thing that will prevent you
> from building on MIPS. And even if you do build okay I'm not sure what you
> can run - zero intepreter?
>
> I've attached an initial patch which converts the offending code in
>> hotspot/src/os/linux/vm/jsig.c to use sigset_t instead of an array to
>> store the used signals. I notice the AIX implementation of jsig.c
>> already does this.
>>
>
> In your patch, as Thomas pointed out, you use __attribute__((constructor))
> which is not something we use within the hotspot code (maybe we should and
> maybe someday we will, but that day is not today). Initialization can be
> handled as Thomas suggested and as already done in the AIX version. Is
> there any reason for the AIX and Linux versions to actually be different?
>

For the AIX port we used sigset_t over the handcoded bitmask. I think the
reason was the same, that we ran into the NSIG>64 problem James faces. It
is been a while though, so I am not sure, it may have been just aesthetic
considerations. I can check on the history if you are interested.

There is no technical reason for the implementations to be different. We
should use sigset_t on all Posix platforms. The reason is probably the same
as for all the other differences between AIX and the rest, that it is
sometimes easier to do AIX-local changes without changing shared sources.
But we try to consolidate this wherever possible.


> That said, given that this patch does nothing to fix the supported OpenJDK
> 9 platforms it would have to be considered an enhancement and we are closed
> to new enhancements for JDK 9. The JDK 10 repos will be opening very soon
> though, and I think consolidating the different versions of jsig.c might be
> worthwhile.
>
>
Not only jsig, we also use sigset_t in os_aix.cpp where the other platforms
use the hand-coded bitmask. Consolidation would make sense here.

But to address James' concern, it would probably be possible to backport
this change from 10 to 9, or?

Kind Regards, Thomas

Thanks,
> David
>
>
> Originally from: https://bugs.debian.org/841173
>>
>> Thanks,
>> James
>>
>>
>>


More information about the hotspot-dev mailing list