On 12/25/25 02:22, Philippe Mathieu-Daudé wrote:
Guard the native endian definition we want to remove by surrounding
it with TARGET_NOT_USING_LEGACY_NATIVE_ENDIAN_API #ifdef'ry.
Once a target gets cleaned we'll set the definition in the target
config, then the target won't be able to use the legacy API anymore.
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
---
include/exec/cpu-common.h | 2 ++
system/memory-internal.h | 2 ++
2 files changed, 4 insertions(+)
diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h
index e0be4ee2b8f..f4961a20911 100644
--- a/include/exec/cpu-common.h
+++ b/include/exec/cpu-common.h
@@ -39,7 +39,9 @@ void tcg_iommu_init_notifier_list(CPUState *cpu);
void tcg_iommu_free_notifier_list(CPUState *cpu);
enum device_endian {
+#ifndef TARGET_NOT_USING_LEGACY_NATIVE_ENDIAN_API
DEVICE_NATIVE_ENDIAN,
+#endif
DEVICE_BIG_ENDIAN,
DEVICE_LITTLE_ENDIAN,
};
For cross-target compatibility, you surely need the enumerators to stay
unchanged.
Add "= 1" to DEVICE_BIG_ENDIAN?
r~