aboutsummaryrefslogtreecommitdiffstats
path: root/include/target.mk
diff options
context:
space:
mode:
authorPhilip Prindeville <philipp@redfish-solutions.com>2017-01-03 18:15:15 -0700
committerFelix Fietkau <nbd@nbd.name>2017-04-04 12:34:13 +0200
commitd3bc11857af788e185e8a3ece26ce40757cf3965 (patch)
treebf3aa425d4fb400e145b2b42fbb5dd4c1880cf4d /include/target.mk
parenta1afee24a6e10054294923fa99938c5e5246ad14 (diff)
downloadupstream-d3bc11857af788e185e8a3ece26ce40757cf3965.tar.gz
upstream-d3bc11857af788e185e8a3ece26ce40757cf3965.tar.bz2
upstream-d3bc11857af788e185e8a3ece26ce40757cf3965.zip
target.mk: check that CPU_TYPE has known CPU_CFLAGS mapping
If someone creates a target and indicates a CPU_TYPE, but there's no corresponding support for that CPU_TYPE's flags in include/target.mk then that should probably be indicated rather than silently ignored. Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Diffstat (limited to 'include/target.mk')
-rw-r--r--include/target.mk5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/target.mk b/include/target.mk
index 61489cabe7..3523d045ae 100644
--- a/include/target.mk
+++ b/include/target.mk
@@ -218,6 +218,11 @@ ifeq ($(DUMP),1)
CPU_CFLAGS_arc700 = -mcpu=arc700
CPU_CFLAGS_archs = -mcpu=archs
endif
+ ifneq ($(CPU_TYPE),)
+ ifndef CPU_CFLAGS_$(CPU_TYPE)
+ $(warning CPU_TYPE "$(CPU_TYPE)" doesn't correspond to a known type)
+ endif
+ endif
DEFAULT_CFLAGS=$(strip $(CPU_CFLAGS) $(CPU_CFLAGS_$(CPU_TYPE)) $(CPU_CFLAGS_$(CPU_SUBTYPE)))
ifneq ($(BOARD),)