RFR: 8276672: Cannot build hsdis on WSL
Magnus Ihse Bursie
ihse at openjdk.java.net
Tue Nov 9 14:30:39 UTC 2021
On Fri, 5 Nov 2021 03:03:55 GMT, Yasumasa Suenaga <ysuenaga at openjdk.org> wrote:
> JDK-8275128 introduced new Makefile for hsdis to integrate it to normal build system, however it does not work on WSL 1 Ubuntu 20.04 and MinGW from Ubuntu.
>
> Hsdis.gmk has two problems:
>
> 1. MinGW version is fixed to "9.2.0"
> 2. Assumes sysroot for MinGW is located at /usr/$MINGW_BASE/sys-root
>
> I tested this change on WSL only, so it is appreciate to review on Cygwin.
Hi @YaSuenag,
Unfortunately this patch does not work out-of-the box on Cygwin, at least not on my machine. :-(
I found two issues:
1) The libraries are in $(MINGW_SYSROOT)/mingw/lib, not $(MINGW_SYSROOT)/lib. For `-L`, we can of course include both paths just to be safe rather than sorry, but that will not work for dllcrt2.o, so we need to verify which path works.
2) On the machine I'm testing, mingw 11.0.4 is installed, but MINGW_VERSION should need to be just 11. (It's worth noting that my original implementation would not have worked either, in this case.)
So here too I think we need to check both possibilities and verify them.
Also, there's no need to use eval to assign to variables. You can just use normal assignment :=.
I'll try to make this work for cygwin in a branch in my personal fork. I'll let you know when I'm done and then you can test if it works for you.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6269
More information about the build-dev
mailing list