Wrap the TARGET_BIG_ENDIAN cpu_ld*_data aliases in COMPILING_PER_TARGET so common code can include cpu-ldst.h.
Signed-off-by: Yonggang Luo <[email protected]> --- include/accel/tcg/cpu-ldst.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/accel/tcg/cpu-ldst.h b/include/accel/tcg/cpu-ldst.h index 1facabccb23..e3082db53e5 100644 --- a/include/accel/tcg/cpu-ldst.h +++ b/include/accel/tcg/cpu-ldst.h @@ -1,5 +1,5 @@ /* - * Software MMU support (per-target) + * Software MMU support * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -423,6 +423,7 @@ cpu_stq_le_data(CPUArchState *env, abi_ptr addr, uint64_t val) cpu_stq_le_data_ra(env, addr, val, 0); } +#ifdef COMPILING_PER_TARGET #ifndef TARGET_NOT_USING_LEGACY_NATIVE_ENDIAN_API #if TARGET_BIG_ENDIAN # define cpu_lduw_data cpu_lduw_be_data @@ -470,5 +471,6 @@ cpu_stq_le_data(CPUArchState *env, abi_ptr addr, uint64_t val) # define cpu_stq_mmuidx_ra cpu_stq_le_mmuidx_ra #endif #endif /* TARGET_NOT_USING_LEGACY_NATIVE_ENDIAN_API */ +#endif /* COMPILING_PER_TARGET */ #endif /* ACCEL_TCG_CPU_LDST_H */ -- 2.52.0.windows.1
