Rather than evaluating TARGET_BIG_ENDIAN at preprocessing
time via #ifdef'ry, do it in C at compile time
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <
20250417131004.47205-8-philmd@linaro.org>
static void petalogix_ml605_machine_init(MachineClass *mc)
{
-#if TARGET_BIG_ENDIAN
- mc->desc = "PetaLogix linux refdesign for xilinx ml605 (big endian)";
- mc->deprecation_reason = "big endian support is not tested";
-#else
- mc->desc = "PetaLogix linux refdesign for xilinx ml605 (little endian)";
-#endif
+ if (TARGET_BIG_ENDIAN) {
+ mc->desc = "PetaLogix linux refdesign for xilinx ml605 (big endian)";
+ mc->deprecation_reason = "big endian support is not tested";
+ } else {
+ mc->desc = "PetaLogix linux refdesign for xilinx ml605 (little endian)";
+ }
mc->init = petalogix_ml605_init;
}
static void xlnx_zynqmp_pmu_machine_init(MachineClass *mc)
{
-#if TARGET_BIG_ENDIAN
- mc->desc = "Xilinx ZynqMP PMU machine (big endian)";
- mc->deprecation_reason = "big endian support is not tested";
-#else
- mc->desc = "Xilinx ZynqMP PMU machine (little endian)";
-#endif
+ if (TARGET_BIG_ENDIAN) {
+ mc->desc = "Xilinx ZynqMP PMU machine (big endian)";
+ mc->deprecation_reason = "big endian support is not tested";
+ } else {
+ mc->desc = "Xilinx ZynqMP PMU machine (little endian)";
+ }
mc->init = xlnx_zynqmp_pmu_init;
}