From 92a461fbd980858a655b68cdd1f3d0cb842691ef Mon Sep 17 00:00:00 2001 From: Dirk Zimoch Date: Mon, 27 Feb 2023 15:23:02 +0100 Subject: [PATCH] use -fno-strict-aliasing only on those architectures which complain --- configure/os/CONFIG.Common.eldk42-ppc4xxFP | 3 +++ configure/os/CONFIG.Common.moxa42-armv6l | 3 +++ configure/os/CONFIG_SITE.Common.linuxCommon | 2 +- configure/os/CONFIG_SITE.Common.vxWorksCommon | 1 - 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/configure/os/CONFIG.Common.eldk42-ppc4xxFP b/configure/os/CONFIG.Common.eldk42-ppc4xxFP index 59ab89071..839ad3aa6 100644 --- a/configure/os/CONFIG.Common.eldk42-ppc4xxFP +++ b/configure/os/CONFIG.Common.eldk42-ppc4xxFP @@ -23,3 +23,6 @@ ARCH_DEP_LDFLAGS += -Wl,-rpath-link,$(ELDK)/$(GNU_TARGET)/usr/lib # have no C++11 STD_CXXFLAGS = + +# suppress strict alias warnings +CODE_CPPFLAGS += -fno-strict-aliasing diff --git a/configure/os/CONFIG.Common.moxa42-armv6l b/configure/os/CONFIG.Common.moxa42-armv6l index 97130f1f0..7788fbd4c 100644 --- a/configure/os/CONFIG.Common.moxa42-armv6l +++ b/configure/os/CONFIG.Common.moxa42-armv6l @@ -18,6 +18,9 @@ ARCH_DEP_CFLAGS += -funwind-tables # have no full C++11 STD_CXXFLAGS = -std=c++0x +# suppress strict alias warnings +CODE_CPPFLAGS += -fno-strict-aliasing + # accept4() exists but does not work # Give fake __rtems__ macro to posix/osdSock.c because that disables accept4() osdSock_CFLAGS += -D__rtems__ diff --git a/configure/os/CONFIG_SITE.Common.linuxCommon b/configure/os/CONFIG_SITE.Common.linuxCommon index 2b7e5642b..2605d0795 100644 --- a/configure/os/CONFIG_SITE.Common.linuxCommon +++ b/configure/os/CONFIG_SITE.Common.linuxCommon @@ -9,7 +9,7 @@ # CONFIG_SITE.. COMMANDLINE_LIBRARY = READLINE -CODE_CPPFLAGS += -fno-strict-aliasing + USR_CXXFLAGS += $(STD_CXXFLAGS) STD_CXXFLAGS = -std=c++11 diff --git a/configure/os/CONFIG_SITE.Common.vxWorksCommon b/configure/os/CONFIG_SITE.Common.vxWorksCommon index 3db6eeb0e..48c712230 100644 --- a/configure/os/CONFIG_SITE.Common.vxWorksCommon +++ b/configure/os/CONFIG_SITE.Common.vxWorksCommon @@ -68,7 +68,6 @@ GNU_DIR_7 = $(WIND_BASE)/compilers/gnu-$(VX_GNU_VERSION)/$(WIND_HOST_TYPE) GNU_DIR = $(GNU_DIR_$(VXWORKS_MAJOR_VERSION)) # Operating system flags -OP_SYS_CFLAGS += -fno-strict-aliasing OP_SYS_INCLUDE_CPPFLAGS_5 += -include $(VX_DIR)/target/h/vxWorks.h OP_SYS_INCLUDE_CPPFLAGS_5 += -I$(EPICS_BASE)/include/os/vxWorks/vxWorks5