Thomas Heijligen has uploaded this change for review.

View Change

meson: build hwaccess only on x86

Throw an error if an user tries to build a programmer which requires
hwaccess on nox-x86 platforms.

Change-Id: Iafabe8b4b2a95697773a739501dfc62d880d3f6d
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
---
M meson.build
1 file changed, 10 insertions(+), 6 deletions(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/98/61198/1
diff --git a/meson.build b/meson.build
index 66f6985..e76aef8 100644
--- a/meson.build
+++ b/meson.build
@@ -346,12 +346,16 @@

# raw memory, MSR or PCI port I/O access
if need_raw_access
- srcs += 'hwaccess.c'
- srcs += 'hwaccess_x86_io.c'
- srcs += 'hwaccess_x86_msr.c'
- srcs += 'hwaccess_physmap.c'
- cargs += '-DNEED_RAW_ACCESS=1'
- cargs += '-D__FLASHROM_HAVE_OUTB__=1'
+ if host_machine.cpu_family() in ['x86', 'x86_64']
+ srcs += 'hwaccess.c'
+ srcs += 'hwaccess_x86_io.c'
+ srcs += 'hwaccess_x86_msr.c'
+ srcs += 'hwaccess_physmap.c'
+ cargs += '-DNEED_RAW_ACCESS=1'
+ cargs += '-D__FLASHROM_HAVE_OUTB__=1'
+ else
+ error('RAW access is not available on non-x86 platforms. Disable the programmer which need it. Use meson build -Dpciutils=false -Dconfig_rayer_spi=false')
+ endif
endif

# raw serial IO

To view, visit change 61198. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Iafabe8b4b2a95697773a739501dfc62d880d3f6d
Gerrit-Change-Number: 61198
Gerrit-PatchSet: 1
Gerrit-Owner: Thomas Heijligen <src@posteo.de>
Gerrit-MessageType: newchange