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 14:15:38 +0000

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

--- Comment #7 from Nick Clifton <nickc at redhat dot com> ---
(In reply to Andreas Schwab from comment #6)
> SunOS is not related to glibc at all.
> 
> #if defined(__SVR4) && defined(__sun)
> #include <sys/byteorder.h>
> #endif

So....

diff --git a/include/plugin-api.h b/include/plugin-api.h
index 379828ba854..4e0a4c89584 100644
--- a/include/plugin-api.h
+++ b/include/plugin-api.h
@@ -48,9 +48,12 @@
 #define PLUGIN_PDP_ENDIAN 1
 #endif
 #else
-/* Older GCC releases (<4.6.0) can make detection from glibc macros.  */
+/* Older GCC releases (<4.6.0) can make detection from system C lirbary
macros.  */
 #if defined(__GLIBC__) || defined(__GNU_LIBRARY__) || defined(__ANDROID__)
 #include <endian.h>
+#elif defined(__SVR4) && defined(__sun)
+#include <sys/byteorder.h>
+#endif
 #ifdef __BYTE_ORDER
 #if __BYTE_ORDER == __LITTLE_ENDIAN
 #define PLUGIN_LITTLE_ENDIAN 1
@@ -58,7 +61,7 @@
 #define PLUGIN_BIG_ENDIAN 1
 #endif
 #endif
-#endif
+
 /* Include all necessary header files based on target.  */
 #if defined(__SVR4) && defined(__sun)
 #include <sys/byteorder.h>

How about this patch ?

-- 
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]