How to build openjdk7 for customized FreeBSD system
utisoft at gmail.com
Sat Jun 8 09:23:18 UTC 2013
On 8 Jun 2013 04:05, "Peter Xu" <xzpeter at gmail.com> wrote:
> I did this in a stupid way. I am sending this out in case someone met the
> same problem (or to say, you want to build openjdk on an platform that
> no older version of JDK supported).
> The main idea is, firstly find a generic FreeBSD 8.2 system, build the
> openjdk7 package (well, there is no problem on generic system, as long as
> you are using the port collections corresponding to that specific version
> suppose). Then, we can leverage all the Java-built output (includes
> *.class, *.jar, and some *.java/*.[ch] if they are auto-generated by the
> build system using JVM) in the generic systems, replacing all the
> $(JAVAC_CMD) and $(JAVAH_CMD) lines in Makefiles with something like (or
> can try direct copy of the object files, but sometimes we still need to do
> this since the dependencies of 'make' are not the JAR files sometimes):
> scp $GENERIC_BSD:$JAR_FILE_PATH $PRIVATE_BSD:$JAR_FILE_PATH
> Or to say, we do fetch the good 'jar' from the generic systems instead of
> invoking a sick JVM and build it until we met error and stop the make
> I suppose all these things need some knowledge on the Makefile structure
> openjdk. This is nasty work, but it did work for us.
> Another solution I thought about is cross-compile the whole JDK on a
> generic system, and copy all the private C libraries on the private system
> to the generic one before-hand (this may only be working when the generic
> system has cross-toolchain I suppose, or in my case that the two systems
> are using the same CPU arch). Just an idea, no need to try currently.
I'm really pleased you fixed it in the end; I'd just succeeded in making
you a package too, but never mind.
Now you have time to migrate your hacks to later FreeBSD, and even get some
of them committed ;)
More information about the freebsd-ports