On 4/3/25 16:57, Philippe Mathieu-Daudé wrote:
We would like to get rid of '-I target/$ARCH/' in the CPPFLAGS.

While this change is correct, this is not strictly needed.
With the current approach, using a set of common files per architecture, we can rely on this include to be present, and it does not block from having common files.

Use the full path to "cpu.h": "target/arm/cpu.h".

Reviewed-by: Richard Henderson <richard.hender...@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org>
---
  include/hw/arm/digic.h      | 2 +-
  include/hw/arm/fsl-imx6.h   | 2 +-
  include/hw/arm/fsl-imx6ul.h | 2 +-
  include/hw/arm/fsl-imx7.h   | 2 +-
  include/hw/arm/fsl-imx8mp.h | 2 +-
  5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/hw/arm/digic.h b/include/hw/arm/digic.h
index 8f2735c284f..646802806e0 100644
--- a/include/hw/arm/digic.h
+++ b/include/hw/arm/digic.h
@@ -18,7 +18,7 @@
  #ifndef HW_ARM_DIGIC_H
  #define HW_ARM_DIGIC_H
-#include "cpu.h"
+#include "target/arm/cpu.h"
  #include "hw/timer/digic-timer.h"
  #include "hw/char/digic-uart.h"
  #include "qom/object.h"
diff --git a/include/hw/arm/fsl-imx6.h b/include/hw/arm/fsl-imx6.h
index 124bbd478fd..0ac145cf6ba 100644
--- a/include/hw/arm/fsl-imx6.h
+++ b/include/hw/arm/fsl-imx6.h
@@ -35,7 +35,7 @@
  #include "hw/pci-host/designware.h"
  #include "hw/or-irq.h"
  #include "system/memory.h"
-#include "cpu.h"
+#include "target/arm/cpu.h"
  #include "qom/object.h"
#define TYPE_FSL_IMX6 "fsl-imx6"
diff --git a/include/hw/arm/fsl-imx6ul.h b/include/hw/arm/fsl-imx6ul.h
index 4e3209b25b2..f8f9c249a23 100644
--- a/include/hw/arm/fsl-imx6ul.h
+++ b/include/hw/arm/fsl-imx6ul.h
@@ -34,7 +34,7 @@
  #include "hw/usb/chipidea.h"
  #include "hw/usb/imx-usb-phy.h"
  #include "system/memory.h"
-#include "cpu.h"
+#include "target/arm/cpu.h"
  #include "qom/object.h"
  #include "qemu/units.h"
diff --git a/include/hw/arm/fsl-imx7.h b/include/hw/arm/fsl-imx7.h
index aa7818c4999..6aedd2b80b5 100644
--- a/include/hw/arm/fsl-imx7.h
+++ b/include/hw/arm/fsl-imx7.h
@@ -37,7 +37,7 @@
  #include "hw/pci-host/designware.h"
  #include "hw/usb/chipidea.h"
  #include "hw/or-irq.h"
-#include "cpu.h"
+#include "target/arm/cpu.h"
  #include "qom/object.h"
  #include "qemu/units.h"
diff --git a/include/hw/arm/fsl-imx8mp.h b/include/hw/arm/fsl-imx8mp.h
index bc97fc416eb..f20f9e53187 100644
--- a/include/hw/arm/fsl-imx8mp.h
+++ b/include/hw/arm/fsl-imx8mp.h
@@ -9,7 +9,7 @@
  #ifndef FSL_IMX8MP_H
  #define FSL_IMX8MP_H
-#include "cpu.h"
+#include "target/arm/cpu.h"
  #include "hw/char/imx_serial.h"
  #include "hw/gpio/imx_gpio.h"
  #include "hw/i2c/imx_i2c.h"

Reply via email to