Date: Sat, 8 Jun 2013 10:23:17 +0100 From: Chris Rees <utisoft@gmail.com> To: Peter Xu <xzpeter@gmail.com> Cc: ports@freebsd.org, java@freebsd.org Subject: Re: How to build openjdk7 for customized FreeBSD system Message-ID: <CADLo83-rOwTOfzDjKqHWMESMPzTjVjArsCxhxq_mMMbU1ZRmTA@mail.gmail.com> In-Reply-To: <CAGRNztA2ib9inneH-e25uhwmsj71JTk32%2BoGmAUGqoZoNV9o%2BQ@mail.gmail.com> References: <51ADA907.1020801@gmail.com> <CAGRNztA2ib9inneH-e25uhwmsj71JTk32%2BoGmAUGqoZoNV9o%2BQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 8 Jun 2013 04:05, "Peter Xu" <xzpeter@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 have > 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 I > 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 we > 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 > process. > > I suppose all these things need some knowledge on the Makefile structure of > 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 ;) Chris
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADLo83-rOwTOfzDjKqHWMESMPzTjVjArsCxhxq_mMMbU1ZRmTA>