[OpenJDK 2D-Dev] [PATCH FOR REVIEW] Building ExtensionSubtables.cpp should use -fno-strict-aliasing

Kelly O'Hair kelly.ohair at oracle.com
Tue May 29 17:12:29 UTC 2012


You should be able to do something like:

# Turn off aliasing with GCC for ExtensionSubtables.cpp
ifeq ($(PLATFORM), linux)
  CXXFLAGS += $(CXXFLAGS_$(@F))
  CC_NEWER_THAN_43 := \
        $(shell $(EXPR) $(CC_MAJORVER) \> 4 \| \
            \( $(CC_MAJORVER) = 4 \& $(CC_MINORVER) \> 3 \) )
   ifeq ($(CC_NEWER_THAN_43),1)
       CXXFLAGS_ExtensionSubtables.o = -fno-strict-aliasing
   endif
endif

-kto

On May 29, 2012, at 6:50 AM, Phil Race wrote:

> I have one concern
> 
> It sounds like the option is new in gcc 4.4 : http://gcc.gnu.org/gcc-4.4/porting_to.html
> 
> I am not sure you can assume that since ..
> 
> http://hg.openjdk.java.net/jdk8/jdk8/raw-file/tip/README-builds.html#gcc
> " The GNU gcc compiler version should be 4.3 or newer."
> 
> And I suggest a push to 2d-dev since its in the 2d code we get
> a warning and the "build" change is in 2D build files, specifically to work
> around that warning .. its really precious little to do with the build system.
> 
> -phil.
> 
> On 5/29/12 6:13 AM, Andrew Hughes wrote:
>> 
>> ----- Original Message -----
>>> In anticipation of the updated fix I created
>>> 7171223 : Building ExtensionSubtables.cpp should use
>>> -fno-strict-aliasing
>>> 
>>> -phil.
>>> 
>>>> Ok for jdk8?  If so, can I have a bug ID for this please?
>>>> 
>>>> Thanks,
>>> 
>> Thanks for the bug ID, Phil.
>> 
>> Here's the revised webrev:
>> 
>> http://cr.openjdk.java.net/~andrew/no-strict-aliasing/webrev.02/
>> 
>> Sorry for the delay.  I found when trying to build the build tree
>> that HotSpot had regressed and become unbuildable:
>> 
>> http://mail.openjdk.java.net/pipermail/hotspot-dev/2012-May/005945.html
>> 
>> All patched now.  Is build the preferred tree to push this too,
>> or would you prefer somewhere else?
>> 
>> Thanks,
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/build-dev/attachments/20120529/da17998d/attachment.html>


More information about the build-dev mailing list