[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 18:53:37 UTC 2012


On May 29, 2012, at 10:55 AM, Andrew Haley wrote:

> On 05/29/2012 06:12 PM, Kelly O'Hair wrote:
>> 
>> 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
> 
> No way: -fno-strict-aliasing has been in GCC for a very long time, and it's
> certainly in 4.0.  You'll need it in 4.3.

In which case, I'd rather not add this kind of ugly make logic.  Although I'm not sure
if we have anyone building with really old GCC versions anymore, or even if we have
a sanity check that says "FATAL: Please don;t build with older GCC versions than 4.3" :^(

I was just thinking how to handle new GCC options in Makefiles, didn't investigate GCC versions.

-kto

> 
> Andrew.




More information about the build-dev mailing list