mirror of
https://github.com/qemu/qemu.git
synced 2026-02-04 05:35:39 +00:00
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>
20 lines
491 B
Bash
Executable File
20 lines
491 B
Bash
Executable File
#! /bin/sh
|
|
|
|
if test $# = 0; then
|
|
exit 0
|
|
fi
|
|
|
|
# Create list of config switches that should be poisoned in common code,
|
|
# but filter out several which are handled manually.
|
|
exec sed -n \
|
|
-e' /CONFIG_TCG/d' \
|
|
-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/ .*//' \
|
|
-e 's/^/#pragma GCC poison /p' \
|
|
-e '}' "$@" | sort -u
|