]> git.ipfire.org Git - thirdparty/gcc.git/commit
PR29961, plugin-api.h: "Could not detect architecture endianess"
authorAlan Modra <amodra@gmail.com>
Mon, 15 May 2023 13:02:32 +0000 (22:32 +0930)
committerArsen Arsenović <arsen@gcc.gnu.org>
Mon, 7 Aug 2023 20:59:36 +0000 (22:59 +0200)
commit24f5a73aa31b51508ceacb4ccc52317476e775aa
tree3fff1f438ee9e42d0a394bb8e646b0727e9f5cb5
parente4cd4f783c57987954302405702d84015823f320
PR29961, plugin-api.h: "Could not detect architecture endianess"

Found when attempting to build binutils on sparc sunos-5.8 where
sys/byteorder.h defines _BIG_ENDIAN but not any of the BYTE_ORDER
variants.  This patch adds the extra tests to cope with the old
machine, and tidies the header a little.

include/ChangeLog:

* plugin-api.h: When handling non-gcc or gcc < 4.6.0 include
necessary header files before testing macros.  Make more use
of #elif.  Test _LITTLE_ENDIAN and _BIG_ENDIAN in final tests.
include/plugin-api.h