aboutsummaryrefslogtreecommitdiff
path: root/sim/common/sim-config.h
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2016-01-03 00:36:13 -0500
committerMike Frysinger <vapier@gentoo.org>2016-01-03 00:52:51 -0500
commit0cb8d8513cf44a102953ff5cf93e9dd399f42e9a (patch)
tree670e19c289dea5ba0a821d97709073078fc24e6d /sim/common/sim-config.h
parent1ac72f0659d64d6a14da862242db0d841d2878d0 (diff)
downloadgdb-0cb8d8513cf44a102953ff5cf93e9dd399f42e9a.zip
gdb-0cb8d8513cf44a102953ff5cf93e9dd399f42e9a.tar.gz
gdb-0cb8d8513cf44a102953ff5cf93e9dd399f42e9a.tar.bz2
sim: drop host endian configure option
The --enable-sim-hostendian flag was purely so people had an escape route for when cross-compiling. This is because historically, AC_C_BIGENDIAN did not work in those cases. That was fixed a while ago though, so we can require that macro everywhere now and simplify a good bit of code.
Diffstat (limited to 'sim/common/sim-config.h')
-rw-r--r--sim/common/sim-config.h27
1 files changed, 9 insertions, 18 deletions
diff --git a/sim/common/sim-config.h b/sim/common/sim-config.h
index fbd9b25..4dfc723 100644
--- a/sim/common/sim-config.h
+++ b/sim/common/sim-config.h
@@ -29,13 +29,16 @@
The CPP below defines information about the compilation host. In
particular it defines the macro's:
- WITH_HOST_BYTE_ORDER The byte order of the host. Could
- be any of BFD_ENDIAN_LITTLE, BFD_ENDIAN_BIG,
- or BFD_ENDIAN_UNKNOWN. Those macro's also
- need to be defined.
+ HOST_BYTE_ORDER The byte order of the host. Could be BFD_ENDIAN_LITTLE
+ or BFD_ENDIAN_BIG.
*/
+#ifdef WORDS_BIGENDIAN
+# define HOST_BYTE_ORDER BFD_ENDIAN_BIG
+#else
+# define HOST_BYTE_ORDER BFD_ENDIAN_LITTLE
+#endif
#if (defined (__i486__) || defined (__i586__) || defined (__i686__)) && defined(__GNUC__) && WITH_BSWAP
#undef htonl
@@ -49,17 +52,9 @@
#define WITH_TREE_PROPERTIES 0
-/* endianness of the host/target:
-
- If the build process is aware (at compile time) of the endianness
- of the host/target it is able to eliminate slower generic endian
- handling code.
+/* Endianness of the target.
- Possible values are BFD_ENDIAN_UNKNOWN, BFD_ENDIAN_LITTLE, BFD_ENDIAN_BIG. */
-
-#ifndef WITH_HOST_BYTE_ORDER
-#define WITH_HOST_BYTE_ORDER BFD_ENDIAN_UNKNOWN
-#endif
+ Possible values are BFD_ENDIAN_UNKNOWN, BFD_ENDIAN_LITTLE, or BFD_ENDIAN_BIG. */
#ifndef WITH_TARGET_BYTE_ORDER
#define WITH_TARGET_BYTE_ORDER BFD_ENDIAN_UNKNOWN
@@ -69,10 +64,6 @@
#define WITH_DEFAULT_TARGET_BYTE_ORDER BFD_ENDIAN_UNKNOWN
#endif
-extern enum bfd_endian current_host_byte_order;
-#define CURRENT_HOST_BYTE_ORDER \
- (WITH_HOST_BYTE_ORDER != BFD_ENDIAN_UNKNOWN \
- ? WITH_HOST_BYTE_ORDER : current_host_byte_order)
extern enum bfd_endian current_target_byte_order;
#define CURRENT_TARGET_BYTE_ORDER \
(WITH_TARGET_BYTE_ORDER != BFD_ENDIAN_UNKNOWN \