Guard the native endian APIs we want to remove by surrounding
them with TARGET_NOT_USING_LEGACY_NATIVE_ENDIAN_API #ifdef'ry.
Since all targets can check the definition, do not poison it.
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é <philmd@linaro.org>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <
20260109165058.59144-15-philmd@linaro.org>
MEMTXATTRS_UNSPECIFIED, NULL);
}
+#ifndef TARGET_NOT_USING_LEGACY_NATIVE_ENDIAN_API
#define ENDIANNESS
#include "system/memory_ldst_phys_endian.h.inc"
+#endif /* TARGET_NOT_USING_LEGACY_NATIVE_ENDIAN_API */
#define ENDIANNESS _le
#include "system/memory_ldst_phys_endian.h.inc"
-e '/CONFIG_USER_ONLY/d' \
-e '/CONFIG_SOFTMMU/d' \
-e '/TARGET_NOT_USING_LEGACY_LDST_PHYS_API/d' \
+ -e '/TARGET_NOT_USING_LEGACY_NATIVE_ENDIAN_API/d' \
-e '/^#define / {' \
-e 's///' \
-e 's/ .*//' \