aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorNico Huber <nico.h@gmx.de>2017-12-01 18:19:43 +0000
committerNico Huber <nico.h@gmx.de>2017-12-19 12:37:06 +0000
commitc8801734727e1e510cbd99e305007b73f9f57e93 (patch)
tree84c6914f12ad1f4e1b00ae5bc76d159951233af0 /Makefile
parent095522cceca4aede4b4a5e8cd74cbbd8f63e1116 (diff)
downloadflashrom-c8801734727e1e510cbd99e305007b73f9f57e93.tar.gz
flashrom-c8801734727e1e510cbd99e305007b73f9f57e93.tar.bz2
flashrom-c8801734727e1e510cbd99e305007b73f9f57e93.zip
internal: Only build on x86 and mipsel
internal_init() explicitly fails on everything but x86 and mipsel. Instead, we can just never build the internal programmer on other architectures and drop a lot of #if boilerplate. Change-Id: I672ddab0415df3baa49ff39a1c9db1b41d8143a4 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/22671 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: David Hendricks <david.hendricks@gmail.com> Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 9 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index bd2cc105..a97761f6 100644
--- a/Makefile
+++ b/Makefile
@@ -378,6 +378,15 @@ endif
override ARCH := $(strip $(call debug_shell,$(CC) $(CPPFLAGS) -E archtest.c 2>/dev/null | grep -v '^\#' | grep '"' | cut -f 2 -d'"'))
override ENDIAN := $(strip $(call debug_shell,$(CC) $(CPPFLAGS) -E endiantest.c 2>/dev/null | grep -v '^\#'))
+# Disable the internal programmer on unsupported architectures (everything but x86 and mipsel)
+ifneq ($(ARCH)-little, $(filter $(ARCH),x86 mips)-$(ENDIAN))
+ifeq ($(CONFIG_INTERNAL), yes)
+UNSUPPORTED_FEATURES += CONFIG_INTERNAL=yes
+else
+override CONFIG_INTERNAL = no
+endif
+endif
+
# PCI port I/O support is unimplemented on PPC/MIPS/SPARC and unavailable on ARM.
# Right now this means the drivers below only work on x86.
ifneq ($(ARCH), x86)
@@ -422,11 +431,6 @@ endif
# architectures with unknown raw access properties.
# Right now those architectures are alpha hppa m68k sh s390
ifneq ($(ARCH),$(filter $(ARCH),x86 mips ppc arm sparc))
-ifeq ($(CONFIG_INTERNAL), yes)
-UNSUPPORTED_FEATURES += CONFIG_INTERNAL=yes
-else
-override CONFIG_INTERNAL = no
-endif
ifeq ($(CONFIG_RAYER_SPI), yes)
UNSUPPORTED_FEATURES += CONFIG_RAYER_SPI=yes
else