Building for mips

Daniel Santos daniel.santos at pobox.com
Mon Mar 25 08:46:51 UTC 2019


Thank you so much for your response! :)

On 3/25/19 3:08 AM, A. Wilcox wrote:
> [I am unable to send to the list for some reason; if you want to reply,
> you may reply to the list.]
>
>
> On 03/25/19 00:31, Daniel Santos wrote:
>> Hello,
>>
>> I'm new to the openjdk project, but I would like to build openjdk with
>> musl on mips (for a 24KEc which is a 32-bit little endian cpu).  Debian
>> has paved a bit of the way here, so I was hoping to pull in their
>> patches, but it seems there are a lot of differences between the portola
>> project and the main line.
>
> You should be able to start with "vanilla" OpenJDK + the patches from
> Alpine / Adélie.  This way you can build up from GCJ (GCC 6 Java),
> instead of having to do a cross build (which is a bit tricky, especially
> for newcomers).

Interesting.  I don't currently have a cross toolchain for gcc 6 with
gcj support, but that's on my list (to explore natively compiling some
java instead of running it via zero).  Can you tell me where I can find
the OpenJDK patches from Alpine?

I seem to have gotten through all of the configure issues with doing a
cross compile, it was quite unnecessarily difficult.  It kept telling me
it was checking for my compiler, printing the exact full path of it, and
then saying it wasn't there.  It turned out that passing CC and CXX with
the full path to the compiler instead of just the executable name and a
TOOLS_DIR set was the problem, but the configure test is just terribly
written.  I've got a todo for going back and seeing if I can clean that
up, but I'm not an m4 expert.

So exactly which repository is the "vanilla" OpenJDK?  Would that be
jdk/jdk?  I'm used to a repository having tags and branches for various
major and minor versions and revisions.  I find myself a bit bewildered
by the repo structure. :)

I'm currently using GCC 7.3 from OpenWRT's build system (buildroot) and
fixing a few issues with that (new warnings and such).

>> My first question is to better understand how the OpenJDK repositories
>> work -- this is my first experience with mercurial and I'm used to git. 
>> Is Portola a set of patches that are rebased on to the main line
>> openjdk, or are patches from the main line imported into Portola upon
>> each release?
>
> The patches are merged in to the Portola repositories regularly from
> mainline JDK.  An example merge commit:
>
> https://hg.openjdk.java.net/portola/jdk12/rev/d050b70ca89f

Ok, that's helpful to know.  I should have mentioned that I'm working
with jdk8 using the portola/portola project starting from the jdk8-b120
tag.  I've got about 40 patches on top of that, mostly from Debian since
they have openjdk for mipsel (but with glibc) working.

Oh crack!  So I started from the jdk8-b120 tag in one worktree and from
jdk13+11 in another -- so I'm just working from the vanilla tags w/o
Portola patches huh?  It would explain why there appears to have been so
little work done for musl, lol!


>> I didn't see a -musl handler in common/autoconf/build-aux/config.sub. 
>> What machine description do you guys use when building Portola on a
>> *-linux-musl machine, *-linux-gnu?
>
> https://hg.openjdk.java.net/portola/jdk12/file/d050b70ca89f/make/autoconf/build-aux/config.sub#l32
>
> Only x86_64-unknown-linux-musl is considered, as the official Portola
> builds are x86_64 only.  They work on at least PowerPC and ARM as well,
> in our testing.
>
>
> Best to you and yours,
> --arw

I'm using mipsel-openwrt-linux-musl, but the config.sub on jdk8 is quite
different.  How can I get to the jdk8 Portola tags and/or branches?

Thanks!
Daniel



More information about the portola-dev mailing list