Hi. As seen in the PR, sparc64 LTO test-suite fails due to missing definition of __BIG_ENDIAN__ macro. That said, I updated the endianess detection to use __BYTE_ORDER__.
I tested the detection on x86_64-linux-gnu, ppc64-linux-gnu and lto.exp testsuite survives on a sparc64-linux machine. Ready to be installed? Thanks, Martin include/ChangeLog: 2020-03-23 Martin Liska <mli...@suse.cz> PR lto/94249 * plugin-api.h: Use __BYTE_ORDER__ instead of __BIG_ENDIAN__ which is not defined on sparc64 target. --- include/plugin-api.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/include/plugin-api.h b/include/plugin-api.h index 673f136ce68..5a45ce773f7 100644 --- a/include/plugin-api.h +++ b/include/plugin-api.h @@ -89,16 +89,18 @@ struct ld_plugin_symbol char *version; /* This is for compatibility with older ABIs. The older ABI defined only 'def' field. */ -#ifdef __BIG_ENDIAN__ +#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ char unused; char section_kind; char symbol_type; char def; -#else +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ char def; char symbol_type; char section_kind; char unused; +#else +#error "Could not detect architecture endianess" #endif int visibility; uint64_t size;