Skip to content

WIP: Hurd porting - #2

Open
zamaudio wants to merge 15 commits into
icedtea-git:2.6from
zamaudio:hurd-porting
Open

WIP: Hurd porting#2
zamaudio wants to merge 15 commits into
icedtea-git:2.6from
zamaudio:hurd-porting

Conversation

@zamaudio

@zamaudio zamaudio commented Aug 2, 2026

Copy link
Copy Markdown

This is not ready yet, but I wanted to send it to you so we can discuss the changes.

zamaudio added 15 commits August 2, 2026 18:54
Author: Jeremie Koenig
Also-by: Damien Raude-Morvan

(Heavily rebased)
The current freetypecheck compares the version string:
a.b.c using strcmp which fails for version numbers.
Let's just skip the check for now.
Since we can obtain a javac 1.6 jar that runs on 1.5,
we should be able to bootstrap jdk7 using this developer
bootstrap toolchain compiled from jdk6.

Setting this value lower allows us to compile the 1.7 langtools
targeted at 1.5 jvm so that we can run enough of the tools
using the existing 1.5 jvm to bootstrap jdk7.
This enables bootstrapping of 1.6 -> 1.7 from a 1.5 gcj
that has compiled the rt.jar for 1.6
Not 100% sure this is correct but fixes the compile error.
There are duplicate symbols with jvmtiEnter.o and jvmtiEnterTrace.o
@gnu-andrew

Copy link
Copy Markdown
Member

I've just skimmed through so far but a few things stand out:

  • There is a mix here of changes for Hurd and hacks for bootstrapping, so we really need to separate those out. Of the latter, while there may be a few that would make sense to fix upstream, most seem to be temporary fixes for a bootstrap environment that you don't want in a final rebuild with itself. What is ../jdk6/build/linux-x86/langtools/dist/bootstrap? It doesn't seem like an OpenJDK 6 build if you are having to make some of these changes like changing the bootstrap JDK version. I would very strongly suggest using https://github.com/icedtea-git/icedtea/tree/2.6 to build rather than reinventing a lot of those bootstrapping changes here. This gives you a regular configure environment to work with, which OpenJDK gained with version 8. It also does a bootstrap run, where it applies some bootstrapping patches on the first run, and then rebuilds with the just built JDK on a clean tree. You should be able to use --with-openjdk-src-dir to build with an existing OpenJDK source tree rather than the tarballs it tries to download. I would also recommend trying first with the same build tools in a GNU/Linux environment rather than trying to get your head around both building OpenJDK and porting to a new OS in one step. On GNU/Linux, you should be able to build this tree with OpenJDK 6 or 7 without any mods, and with a Classpath-based solution like gcj using the IcedTea tree I just mentioned. Getting to that stage should make the Hurd stage a lot easier. Also, the fact that you're turning off CORBA, JAXP & JAXWS in your script suggests you won't get a complete JDK that can rebuild itself as it stands.
  • The Hurd changes in the HotSpot tree should start with their own copies and modify them, rather than altering the Linux ones. The Linux code is very stable and we don't really want to alter it for a port to another OS. This is the approach used by BSD, Solaris and AIX, all of which share a lot of the same code but maintain their own copies. It's not a goal to make the Linux files portable; that's why they are Linux files :)
  • Is the Hurd really identified as FreeBSD kernel? Would such changes also apply to a FreeBSD distribution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants