[OpenJDK 2D-Dev] [PATCH FOR REVIEW] Building ExtensionSubtables.cpp should use -fno-strict-aliasing
ahughes at redhat.com
Wed May 30 12:27:41 UTC 2012
----- 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 += $(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.
It's not only not new to 4.4, you already use it in make/common/Defs-linux.gmk:
# Misc compiler options
CFLAGS_COMMON = -fno-strict-aliasing
I'll push to 2D.
> > Andrew.
Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)
PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F 8F91 3B96 A578 248B DC07
More information about the build-dev