bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/29961] /include/plugin-api.h:162:2: error: #error "Could n


From: nickc at redhat dot com
Subject: [Bug binutils/29961] /include/plugin-api.h:162:2: error: #error "Could not detect architecture endianess"
Date: Wed, 04 Jan 2023 12:52:13 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=29961

Nick Clifton <nickc at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nickc at redhat dot com

--- Comment #1 from Nick Clifton <nickc at redhat dot com> ---
Hi Dennis,

  Well it is nice to hear that these big iron boxes are still be used.


> ../../binutils-2.39/bfd/bfd.c: In function ‘_bfd_abort’:
> ../../binutils-2.39/bfd/bfd.c:1671:1: warning: ‘noreturn’ function does return

  This is a little bit strange, but probably not important.
  Possibly the function _exit() is not defined/prototyped 
  on your system, which might lead to link time issues.  But
  let's see if we can get there first.

> ../../binutils-2.39/bfd/../include/plugin-api.h:162:2: error: #error "Could 
> not detect architecture endianess"

> I am guessing that PLUGIN_BIG_ENDIAN simply did not get set somewhere?

Correct - it is set at the start of plugin-api.h, using 
macros defined by gcc and/or glibc:

  /* Older GCC releases (<4.6.0) can make detection from glibc macros.  */
  #if defined(__GLIBC__) || defined(__GNU_LIBRARY__) || defined(__ANDROID__)
  #include <endian.h>
  #ifdef __BYTE_ORDER
  #if __BYTE_ORDER == __LITTLE_ENDIAN
  #define PLUGIN_LITTLE_ENDIAN 1
  #elif __BYTE_ORDER == __BIG_ENDIAN
  #define PLUGIN_BIG_ENDIAN 1
  #endif
  #endif

So my guess is that your glibc version is not defining __BYTE_ORDER in
<endian.h>

As a suggestion, can you configure with:
  CFLAGS="-D__BIG_ENDIAN=1 -D__BYTE_ORDER=__BIG_ENDIAN"
added to the command line, and see if this helps ?

Cheers
  Nick

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]