summaryrefslogtreecommitdiffstats
path: root/src/build/mkrules/cc.rules.mk
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2017-03-20 13:31:35 +1100
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-06-19 16:00:14 -0400
commitf43c96911a3912a9870ebaa304c4d7df8a94a33d (patch)
tree882980f48030ca06479f00b33aed56350b3e4f17 /src/build/mkrules/cc.rules.mk
parent90ec2e65314c546b0ddb98253d6077584e4a151d (diff)
downloadtalos-hostboot-f43c96911a3912a9870ebaa304c4d7df8a94a33d.tar.gz
talos-hostboot-f43c96911a3912a9870ebaa304c4d7df8a94a33d.zip
Only build attributeOverride if compiler supports -std=gnu++11
GCC prior to 4.8 doesn't support -std=gnu++11, which the attributeOverride tool requires to build. Resolves:open-power/op-build/pull/947 Change-Id: I53ad31b56dd90c2cd77f5ca1f91b46e519cdfe48 Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/38131 Reviewed-by: Prachi Gupta <pragupta@us.ibm.com> Reviewed-by: Matthew A. Ploetz <maploetz@us.ibm.com> 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> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/build/mkrules/cc.rules.mk')
-rw-r--r--src/build/mkrules/cc.rules.mk10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/build/mkrules/cc.rules.mk b/src/build/mkrules/cc.rules.mk
index cb00ea001..c89995f82 100644
--- a/src/build/mkrules/cc.rules.mk
+++ b/src/build/mkrules/cc.rules.mk
@@ -5,7 +5,9 @@
#
# OpenPOWER HostBoot Project
#
-# COPYRIGHT International Business Machines Corp. 2013,2014
+# Contributors Listed Below - COPYRIGHT 2013,2017
+# [+] International Business Machines Corp.
+#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -74,3 +76,9 @@ $(IMGDIR)/lib$(MODULE).so : $(OBJECTS) $(ROOTPATH)/src/module.ld $(MODULE_INIT)
$(OBJECTS) $(MODULE_INIT) \
-T $(ROOTPATH)/src/module.ld -o $@
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))
OpenPOWER on IntegriCloud