sizer compilation has been broken for cross-compiles

Erik Joelsson erik.joelsson at oracle.com
Mon Nov 26 05:21:05 PST 2012


Handling this is tricky. As I understand it, for cross compilation it 
works as long as the host and target are both 32-bit, which seems more 
like coincidence to me. Compiling the generators for the host platform 
doesn't make sense, it just happens to work in some cases.

The idea of only generating these when not cross compiling sounds weird 
to me too. The advantage is that when we aren't cross compiling these 
generators are validated. In reality, I don't think the output of the 
generators change often, if at all. This is still a reasonable compromise.

The third option would be to not generate them in the build at all, but 
to use the pre generated data.

/Erik

On 2012-11-26 13:52, David Holmes wrote:
> Hi Fredrik,
>
> I suspect it will of course solve the build problem because you won't 
> now be building anything. But is it the right solution? If we can do 
> this for cross-compiling why do we ever need to generate these files? 
> And why did you make the previous change? It still seems to me that 
> things were working fine before that.
>
> I don't have any means to actually validate this change.
>
> David
>
> On 26/11/2012 9:03 PM, Fredrik Öhrström wrote:
>> Hi David! Please apply the following patch, and let me know if it
>> solves your problems!
>>
>> //Fredrik
>>
>> Changeset: e599b2e1f052
>> Author:    ohrstrom
>> Date:      2012-11-26 11:54 +0100
>> URL:       
>> http://hg.openjdk.java.net/build-infra/jdk8/jdk/rev/e599b2e1f052
>>
>> Fix for problematic platform dependent sizes generation.
>>
>> ! makefiles/GensrcX11Wrappers.gmk
>> + src/solaris/classes/sun/awt/X11/generator/sizes.32
>> + src/solaris/classes/sun/awt/X11/generator/sizes.64
>> - src/solaris/classes/sun/awt/X11/generator/sizes.64-solaris-i386
>>
>>
>> 2012/11/26 David Holmes<david.holmes at oracle.com>:
>>> This changeset
>>>
>>> changeset:   6067:dcee387cde81
>>> user:        ohrstrom
>>> date:        Mon Oct 29 13:41:38 2012 -0700
>>> summary:     8001891: build-infra: Adding X_CFLAGS and X_LIBS to 
>>> lwawt and
>>> sizer compilation
>>>
>>> diff -r 5b29d6157504 -r dcee387cde81 makefiles/GensrcX11Wrappers.gmk
>>> --- a/makefiles/GensrcX11Wrappers.gmk
>>> +++ b/makefiles/GensrcX11Wrappers.gmk
>>> @@ -64,6 +64,8 @@
>>>          $(MKDIR) -p $(@D)
>>>          $(RM) $@ $@.tmp
>>>          (cd $(@D)&&  $(BUILD_CC) -m$* -o $@.tmp $<  \
>>> +              $(X_CFLAGS) \
>>> +              $(X_LIBS) \
>>>                 -I$(JDK_OUTPUTDIR)/include \
>>>                 -I$(JDK_TOPDIR)/src/share/javavm/export \
>>>
>>> -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/javavm/export \
>>>
>>> breaks cross-compilation as the values in X_CFLAGS and X_LIBS are 
>>> those of
>>> the cross-compiler, not the build machine compiler that will create the
>>> sizers executable.
>>>
>>> Not sure why sizers needs the above even when not cross-compiling - 
>>> it is a
>>> very basic program that just needs access to the right header files. 
>>> Does it
>>> need special compiler flags or lib options ??
>>>
>>> I've filed https://jbs.oracle.com/bugs/browse/JDK-8003958 to track 
>>> this as
>>> it has already 'escaped'. I'll have to pull it out of the profiles 
>>> forest
>>> for now.
>>>
>>> Thanks,
>>> David
>>> -----
>>>



More information about the build-infra-dev mailing list