RFR (XS) 8031064: build_vm_def.sh not working correctly for new build cross compile

David Holmes david.holmes at oracle.com
Thu Jan 15 07:01:48 UTC 2015

On 15/01/2015 4:40 PM, Dean Long wrote:
> On 1/14/2015 10:31 PM, David Holmes wrote:
>> Hi Dean,
>> Code reviews don't go to jdk9-dev. Build-infra is not relevant to this
>> either. You only need hotspot-dev for a hotspot build issue (though
>> build-dev might be useful for more complex changes).
> OK.

That was also a hint to drop them from follow ups - which I now have but 
added build-dev. :)

>> On 15/01/2015 9:23 AM, Dean Long wrote:
>>> https://bugs.openjdk.java.net/browse/JDK-8031064
>>> http://cr.openjdk.java.net/~dlong/8031064/webrev/
>>> This change allows the build_vm_def.sh script to use the $NM chosen by
>>> configure rather than "nm",
>>> which makes things better if you're cross-compiling.
>> I'm always wary of things that might be shell specific:
>>   vm.def: $(Res_Files) $(Obj_Files)
>> !         NM=$(NM) sh $(GAMMADIR)/make/linux/makefiles/build_vm_def.sh
>> *.o > $@
>> I use this style of shell script invocation a lot from bash, where it
>> works, but I was under the impression not all shells support it.
> I thought we require bash, but maybe that's just for confignure. The
> above should work on all Bourne shell variants,
> but not csh variants.  Any time we use something like '2> /dev/null',
> it's Bourne-shell specific, so I don't think our
> linux makefiles will work with csh.  However, I can change it to any of
> the following:

If the build-dev guys confirm we already assume bash that is fine.

BTW the aix and bsd versions of this file have the same flawed logic, 
but probably don't expect to ever be cross-compiling.

> 1. env NM=$(NM) sh ...
> 2. NM=$(NM); export NM; sh ...
> 3.
> export NM
> vm.def: $(Res_Files) $(Obj_Files)
>            sh ...
> I have another version that moves the awk code from build_vm_def.sh up
> into vm.make, but I wanted to keep the changes to a minimum.

I must admit I have no idea why this nm invocation has been farmed out 
to a shell script - perhaps the $ escaping became problematic ??

> dl
>> David
>>> dl

More information about the hotspot-dev mailing list