RFR (XS) 8031064: build_vm_def.sh not working correctly for new build cross compile
dean.long at oracle.com
Thu Jan 15 08:05:51 UTC 2015
On 1/14/2015 11:01 PM, David Holmes wrote:
> 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).
> 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:
>>>> 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 ...
>> 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 ??
That would be my guess. A compromise solution would have been to do the
"nm" in vm.make, and just do the "awk" part in
build_vm_def.sh (or perhaps build_vm_def.awk).
More information about the build-dev