RFR: 7200065 Cross-compilation changes to support the new-build
david.holmes at oracle.com
Tue Sep 25 05:18:57 PDT 2012
For the record an updated webrev:
The original had a glitch as it seems there is no ?:= assignment
operator - though make doesn't complain it causes the variable to be
empty but defined. So reverted to Fredrik's original ifndef ARCH form.
Also filed 7200633 to fix adlc's use of the cflags.
This patch is now being pushed to hotspot-rt.
On 24/09/2012 12:15 PM, David Holmes wrote:
> On 24/09/2012 7:55 AM, David Holmes wrote:
>> On 23/09/2012 3:44 AM, Fredrik Öhrström wrote:
>>> The variable HOST.COMPILE.CXX points to the compiler used to create a
>>> binary that can be
>>> run on the build platform. But for unknown reasons it contains the
>>> standard CFLAGS and CXXFLAGS, which are used to create the binary for
>>> the platform where the jvm is going to be executed.
>> I'll have to look more closely at this because that is certainly not the
>> case for real cross-compilation builds in the existing build. If it were
>> the case then there is a lot more than just ARCHFLAG that would cause
>> the host gcc to spit the dummy.
> Okay, so it won't come as much of a surprise to most people that this is
> a bit of a mess.
> Bottom line: Fredrik's fix is necessary in the general case.
> Longer explanation ... ARCHFLAG nominally defines gcc flags for the
> target architecture and so, as Fredrik stated, these would cause build
> failures when running adlc because those same flags are getting appended
> to the flags used by adlc (which is itself wrong but a bigger problem to
> solve). This is mitigated by the fact that for our true
> cross-compilation builds we don't use ARCHFLAG to set these kinds of
> things but use EXTRA_CFLAGS. We also don't build C2 for all
> architectures hence some of the ARCHFLAGS that would cause a problem,
> don't today because adlc never gets built. So this change is presently
> only being exercised for 32-bit-on-64-bit "cross compilation" where the
> effect of not having the fix is harmless (adlc is built as a 32-bit
>>> Most of these flags do not hurt the compile for the build platform
>>> (though perhaps they are unnecessary) except the ARCHFLAG, which if not
>>> removed, will cross compile the adlc tool.
>>> Den fredagen den 21:e september 2012 skrev Kelly O'Hair:
>>> What bothers me on this adlc.make change is that there is no comment
>>> in the Makefile as to why ARCHFLAG is filtered out
>>> of the options. Why is this necessary?
>>> The defs.make file changes look fine.
>>> On Sep 20, 2012, at 11:40 PM, David Holmes wrote:
>>> > webrev:
>>> > http://cr.openjdk.java.net/~dholmes/7200065/webrev/
>>> > These are Fredrik's contributions from build-infra being moved to
>>> mainline (to join the changes Kelly pushed the other day). There is
>>> a slight change to Fredrik's original changeset due to a bug with
>>> the old build (PATH_SEP wouldn't get set) - and it's simpler to use
>>> ?:= than ifdef.
>>> > I'm acting as one reviewer but would welcome other eyes.
>>> > Thanks,
>>> > David
More information about the hotspot-dev