RFR(S): JDK-8026964 Building with an IBM J9 boot jdk requires special settings for BOOT_RTJAR

Volker Simonis volker.simonis at gmail.com
Mon Nov 18 13:59:28 UTC 2013


On Mon, Nov 18, 2013 at 2:43 PM, Magnus Ihse Bursie
<magnus.ihse.bursie at oracle.com> wrote:
> On 2013-11-15 17:23, Volker Simonis wrote:
>>
>> Hi,
>>
>> could you please review the following small webrev:
>>
>> http://cr.openjdk.java.net/~simonis/webrevs/8026964/
>>
>> It not only fixes bug 8026964 on AIX, but is changes the general way
>> of how to compute BOOT_RTJAR.
>>
>> With the new solution, BOOT_RTJAR is computed right from the system
>> property 'sun.boot.class.path'. The new solution should be more robust
>> and more portable as it doesn't depend on the name of the jar file
>> which contains the boot classes and it also doesn't depend on the fact
>> that all these classes are located in a single jar file.
>>
>> In order to avoid build warnings, I've taken extra care to remove jar
>> files and paths from the 'sun.boot.class.path' output which do not
>> exist (e.g. jfr.jar is not available in an OpenJDK build but appears
>> in 'sun.boot.class.path' anyway - maybe this is another bug that
>> should be fixed; also jre/classes appears in 'sun.boot.class.path'
>> although it is not present in the file system - maybe we should fix
>> that as well).
>
> I like the general idea, but the code is quite complex. :-/ Maybe it's just
> me that's bad at awk syntax...
>
>>
>> If we are building on Windows, I convert the content of
>> 'sun.boot.class.path'  to Unix form to avoid problems with the FIXPATH
>> utility. Later, during the build, FIXPATH will convert the path list
>> back to Windows form.
>
> cygpath is only available on cygwin, not msys. :-(
>
> Also, we have tried to restrict the usage of cygpath in favour of the
> platform-independent BASIC_WINDOWS_* macros. Unfortunately, there is
> currently no such macro which does what you want. On the other hand; it is
> just a simple character replacement. In fact, if I understand the code
> correctly, you first put the value of path.separator in the path, and then
> replace it. I believe we have a PATH_SEP (or so..?) defined, that you could
> probably use directly instead.
>

The problem is that 'sun.boot.class.path' gives you a native Windows
path list. Later during the build, BOOT_RTJAR is used with an appended
tools.jar file which is in Unix form already. So in order to make
FIXPATH work, we need to have BOOT_RTJAR in Unix form with Windows
path separators. And we need to quote the uses of BOOT_RTJAR now
because it is a path list and not a single file anymore. My next
webrev will do just that.

> /Magnus



More information about the build-dev mailing list