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

2012-05-30 Thread Andrew Hughes
- Original Message - > > 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

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

2012-05-29 Thread Kelly O'Hair
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 := \ >

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

2012-05-29 Thread Damon Hart-Davis
That is indeed the sort of horror we used to implement out DontOptimise(something.cpp) and DontOptimiseMuch(somethingelse.cpp) macros at a now-famously-defunct investment bank. The code outlived the bank... B^> Rgds Damon On 29 May 2012, at 18:12, Kelly O'Hair wrote: > > You should be abl

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

2012-05-29 Thread Andrew Haley
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 \| \ >

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

2012-05-29 Thread Kelly O'Hair
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

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

2012-05-29 Thread Phil Race
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 sugges

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

2012-05-29 Thread Andrew Hughes
- 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 revi

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

2012-05-25 Thread Damon Hart-Davis
Hi, FWIW, and I have not looked at any of the build system for this, when building large optimised cross-platform critical C++ projects I had the option to turn down or off optimisation for individual files for individual compilers/platforms. At worst you might accomplish that (with other main

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

2012-05-23 Thread Andrew Hughes
- Original Message - > > > > On May 23, 2012, at 9:32 AM, Andrew Hughes wrote: > > > Yes, I thought the same. But I don't see how you can direct flags to > one specific file in the Makefiles. Any ideas? > > You can add something like this to CFLAGS: > CFLAGS += $(CFLAGS_$(@F)) > >

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

2012-05-23 Thread Kelly O'Hair
On May 23, 2012, at 9:32 AM, Andrew Hughes wrote: > Yes, I thought the same. But I don't see how you can direct flags to > one specific file in the Makefiles. Any ideas? You can add something like this to CFLAGS: CFLAGS += $(CFLAGS_$(@F)) Then: CFLAGS_foobar.o = -someoptions -kto

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

2012-05-23 Thread Phil Race
On 5/23/2012 9:32 AM, Andrew Hughes wrote: - Original Message - I suppose the problem that some new version of GCC enables this option by default and we could run into a problem at run time if we don't disable it ? Yes, 4.4 to be precise. It's not particularly new; it came out on Apr

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

2012-05-23 Thread Andrew Hughes
- Original Message - > > > - Original Message - > > I suppose the problem that some new version of GCC enables this > > option > > by default and > > we could run into a problem at run time if we don't disable it ? > > > > Yes, 4.4 to be precise. It's not particularly new; it

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

2012-05-23 Thread Andrew Hughes
- Original Message - > I suppose the problem that some new version of GCC enables this > option > by default and > we could run into a problem at run time if we don't disable it ? > Yes, 4.4 to be precise. It's not particularly new; it came out on April 21st, 2009. > But this patch wo

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

2012-05-23 Thread Phil Race
It may not be easy but its worth investigating. BTW .. I have not recently tried the new build mechanism, but does anyone on the build list know what kinds of build changes will very probably just work with that too, and which will need to be tested separately ? -phil. On 5/23/2012 9:12 AM, D

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

2012-05-23 Thread Phil Race
I suppose the problem that some new version of GCC enables this option by default and we could run into a problem at run time if we don't disable it ? But this patch would appear to disable it for the whole ICU library .. and any other C++ code in the .so which I would have to suppose impacts t

[PATCH FOR REVIEW] Building ExtensionSubtables.cpp should use -fno-strict-aliasing

2012-05-23 Thread Andrew Hughes
At present, the building of ExtensionSubtables.cpp produces a warning: ../../../src/share/native/sun/font/layout/ExtensionSubtables.cpp:57:31: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] due to this code: // read a 32-bit value that might only