On 3/23/20 10:43 AM, Jakub Jelinek wrote:
On Mon, Mar 23, 2020 at 10:25:32AM +0100, Martin Liška wrote:
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.
Those are GCC specific macros, are you sure plugin-api.h will be always
compiled just with GCC and no other compiler?
And Clang supports that. The header file is used for GCC LTO plug-in
(which is like a run-time library) and then it's consumed by binutils.
So I don't how much portable it should be?
You can use them but should be prepared for some fallback (e.g. endian.h,
whatever else).
And there is also PDP endian...
Huh, are we talking about something so complex like:
https://github.com/llvm-mirror/compiler-rt/blob/master/lib/builtins/int_endianness.h
Btw. do we force our run-time libraries to be built with GCC?
Thanks,
Martin
Jakub