Skip to content

Commit

Permalink
Add -fno-strict-aliasing to compiler options
Browse files Browse the repository at this point in the history
Add this option to ARM, PPC linux, and X86 linux.

This is related to Issue eclipse-openj9/openj9#2872

Signed-off-by: Peter Bain <[email protected]>
  • Loading branch information
pdbain-ibm committed Nov 13, 2018
1 parent abd36d3 commit 5315047
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions omrmakefiles/rules.linux.mk
Original file line number Diff line number Diff line change
Expand Up @@ -187,21 +187,25 @@ ifeq (x86,$(OMR_HOST_ARCH))
GLOBAL_CXXFLAGS+=-m32 -msse2 -I/usr/include/nptl
GLOBAL_CPPFLAGS+=-DJ9X86
endif
GLOBAL_CFLAGS+=-fno-strict-aliasing
GLOBAL_CXXFLAGS+=-fno-strict-aliasing

else ifeq (aarch64,$(OMR_HOST_ARCH))
GLOBAL_CFLAGS+=-march=armv8-a+simd -Wno-unused-but-set-variable
GLOBAL_CXXFLAGS+=-march=armv8-a+simd -Wno-unused-but-set-variable
GLOBAL_CFLAGS+=-march=armv8-a+simd -Wno-unused-but-set-variable -fno-strict-aliasing
GLOBAL_CXXFLAGS+=-march=armv8-a+simd -Wno-unused-but-set-variable -fno-strict-aliasing
GLOBAL_CPPFLAGS+=-DJ9AARCH64 -DAARCH64GNU -DAARCH64 -DFIXUP_UNALIGNED -Wno-unused-but-set-variable

else
ifeq (arm,$(OMR_HOST_ARCH))
GLOBAL_CFLAGS+=$(ARM_ARCH_FLAGS) -Wno-unused-but-set-variable
GLOBAL_CFLAGS+=$(ARM_ARCH_FLAGS) -Wno-unused-but-set-variable -fno-strict-aliasing
GLOBAL_CPPFLAGS+=-DJ9ARM -DARMGNU -DARM -DFIXUP_UNALIGNED $(ARM_ARCH_FLAGS) -Wno-unused-but-set-variable
else
ifeq (ppc,$(OMR_HOST_ARCH))
GLOBAL_CPPFLAGS+=-DLINUXPPC

ifeq (gcc,$(OMR_TOOLCHAIN))
GLOBAL_CFLAGS+=-fno-strict-aliasing
GLOBAL_CXXFLAGS+=-fno-strict-aliasing
ifeq (1,$(OMR_ENV_DATA64))
GLOBAL_CFLAGS+=-m64
GLOBAL_CXXFLAGS+=-m64
Expand Down

0 comments on commit 5315047

Please sign in to comment.