summaryrefslogtreecommitdiffstats
path: root/src/build/mkrules/cflags.env.mk
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2017-03-02 16:15:25 +1100
committerDaniel M. Crowell <dcrowell@us.ibm.com>2019-03-07 21:57:50 -0600
commit4470dc33a126dfdbd7db7b30e499c1d6dc63e16e (patch)
tree3dc38cf3d21c9e0a833621227c9207ff15933ef9 /src/build/mkrules/cflags.env.mk
parent49a169abfa3d746879d4f01d263bb794c700177d (diff)
downloadtalos-hostboot-4470dc33a126dfdbd7db7b30e499c1d6dc63e16e.tar.gz
talos-hostboot-4470dc33a126dfdbd7db7b30e499c1d6dc63e16e.zip
Disable warnings that crop up a lot with GCC6
-- Note from WGHOFFA -- - This change is temporary as we finally have a developer looking to fix these warnings/errors - To get Thread Local Storage working we have a pile of commits required, one of which changes this file and the easiest solution was to merge this patch for now Change-Id: I3e1da9f61ff442e49f143f51ccfc3c7c018beb1f Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/37324 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/build/mkrules/cflags.env.mk')
-rw-r--r--src/build/mkrules/cflags.env.mk15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/build/mkrules/cflags.env.mk b/src/build/mkrules/cflags.env.mk
index 6bb900288..df40f77ff 100644
--- a/src/build/mkrules/cflags.env.mk
+++ b/src/build/mkrules/cflags.env.mk
@@ -5,7 +5,7 @@
#
# OpenPOWER HostBoot Project
#
-# Contributors Listed Below - COPYRIGHT 2013,2016
+# Contributors Listed Below - COPYRIGHT 2013,2019
# [+] Google Inc.
# [+] International Business Machines Corp.
#
@@ -38,13 +38,22 @@ CFLAGS += -DPLAT_NO_THREAD_LOCAL_STORAGE
CFLAGS += -D__FAPI
endif
+try = $(shell set -e; if ($(1)) >/dev/null 2>&1; \
+ then echo "$(2)"; \
+ else echo "$(3)"; fi )
+
+try-cflag = $(call try,$(1) $(2) -x c -c /dev/null -o /dev/null,$(2))
+test_cflag = $(call try,$(1) $(2) -x c -c /dev/null -o /dev/null,1,0)
+
COMMONFLAGS += $(OPT_LEVEL) -nostdlib
CFLAGS += $(COMMONFLAGS) -mcpu=power7 -nostdinc -g -mno-vsx -mno-altivec\
- -Wall -Werror -mtraceback=no -pipe -mabi=elfv1 \
+ -Wall -mtraceback=no -pipe -mabi=elfv1 \
+ $(call try-cflag,$(CC),-Wno-error=sizeof-array-argument) \
+ $(call try-cflag,$(CC),-Wno-error=unused-function) \
-ffunction-sections -fdata-sections -ffreestanding -mbig-endian
ASMFLAGS += $(COMMONFLAGS) -mcpu=power7 -mbig-endian -ffreestanding -mabi=elfv1
CXXFLAGS += $(CFLAGS) -nostdinc++ -fno-rtti -fno-exceptions -Wall \
- -fuse-cxa-atexit -std=gnu++14
+ -fuse-cxa-atexit -std=gnu++14 -fpermissive
LDFLAGS += --nostdlib --sort-common -EB $(COMMONFLAGS)
INCFLAGS = $(addprefix -I, $(INCDIR) )
OpenPOWER on IntegriCloud