[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 01/27] util: Introduce host-specific cpuinfo.h
From: |
Richard Henderson |
Subject: |
[PATCH v2 01/27] util: Introduce host-specific cpuinfo.h |
Date: |
Tue, 23 May 2023 06:47:07 -0700 |
The entire contents of the header is host-specific, but the
existence of such a header is not, which could prevent some
host specific ifdefs at the top of the file for the include.
Add host/include/{arch,generic} to the project arguments.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
host/include/generic/host/cpuinfo.h | 4 ++++
meson.build | 10 ++++++++++
2 files changed, 14 insertions(+)
create mode 100644 host/include/generic/host/cpuinfo.h
diff --git a/host/include/generic/host/cpuinfo.h
b/host/include/generic/host/cpuinfo.h
new file mode 100644
index 0000000000..eca672064a
--- /dev/null
+++ b/host/include/generic/host/cpuinfo.h
@@ -0,0 +1,4 @@
+/*
+ * No host specific cpu indentification.
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
diff --git a/meson.build b/meson.build
index 0a5cdefd4d..c516b911d9 100644
--- a/meson.build
+++ b/meson.build
@@ -512,6 +512,16 @@ add_project_arguments('-iquote', '.',
'-iquote', meson.current_source_dir() / 'include',
language: all_languages)
+# If a host-specific include directory exists, list that first...
+host_include = meson.current_source_dir() / 'host/include/'
+if fs.is_dir(host_include / host_arch)
+ add_project_arguments('-iquote', host_include / host_arch,
+ language: all_languages)
+endif
+# ... followed by the generic fallback.
+add_project_arguments('-iquote', host_include / 'generic',
+ language: all_languages)
+
sparse = find_program('cgcc', required: get_option('sparse'))
if sparse.found()
run_target('sparse',
--
2.34.1
- [PATCH v2 00/27] accel/tcg: Improvements to atomic128.h, Richard Henderson, 2023/05/23
- [PATCH v2 01/27] util: Introduce host-specific cpuinfo.h,
Richard Henderson <=
- [PATCH v2 03/27] util: Add i386 CPUINFO_ATOMIC_VMOVDQU, Richard Henderson, 2023/05/23
- [PATCH v2 02/27] util: Add cpuinfo-i386.c, Richard Henderson, 2023/05/23
- [PATCH v2 05/27] util/bufferiszero: Use i386 host/cpuinfo.h, Richard Henderson, 2023/05/23
- [PATCH v2 04/27] tcg/i386: Use host/cpuinfo.h, Richard Henderson, 2023/05/23
- [PATCH v2 06/27] migration/xbzrle: Shuffle function order, Richard Henderson, 2023/05/23