[igt-dev] [PATCH i-g-t 2/2] Avoid using the sys/io.h header
Casey Bowman
casey.g.bowman at intel.com
Fri Oct 15 20:32:38 UTC 2021
We deliberately want to avoid using the sys/io.h header
for arm64 because it causes the following error during
compilation:
In file included from ../tools/intel_reg.c:46:
../tools/intel_reg.c: In function ‘read_register’:
/usr/include/sys/io.h:47:3: error: impossible constraint in ‘asm’
47 | __asm__ __volatile__ ("inb %w1,%0":"=a" (_v):"Nd" (__port));
| ^~~~~~~
Signed-off-by: Casey Bowman <casey.g.bowman at intel.com>
---
meson.build | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/meson.build b/meson.build
index f9a284d84..bccf9fa0c 100644
--- a/meson.build
+++ b/meson.build
@@ -208,8 +208,10 @@ endif
if cc.has_header('libgen.h')
config.set('HAVE_LIBGEN_H', 1)
endif
-if cc.has_header('sys/io.h')
- config.set('HAVE_SYS_IO_H', 1)
+if host_machine.cpu_family() != 'aarch64'
+ if cc.has_header('sys/io.h')
+ config.set('HAVE_SYS_IO_H', 1)
+ endif
endif
if cc.links('''
#include <cpuid.h>
--
2.25.1
More information about the igt-dev
mailing list