aboutsummaryrefslogtreecommitdiff
path: root/sim/ppc/std-config.h
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-06-15 20:20:11 -0400
committerMike Frysinger <vapier@gentoo.org>2021-06-16 01:03:54 -0400
commit430456e34753ac705a047c886eb4f73cf2906dfc (patch)
tree0c46e6372c85dd346f9a3bd25f7885eac1669335 /sim/ppc/std-config.h
parentdae666c968ac9f053dc5dfe1a6ceaf333a8ca94d (diff)
downloadgdb-430456e34753ac705a047c886eb4f73cf2906dfc.zip
gdb-430456e34753ac705a047c886eb4f73cf2906dfc.tar.gz
gdb-430456e34753ac705a047c886eb4f73cf2906dfc.tar.bz2
sim: ppc: 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. This was done for all the other ports years ago, so catch ppc up.
Diffstat (limited to 'sim/ppc/std-config.h')
-rw-r--r--sim/ppc/std-config.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/sim/ppc/std-config.h b/sim/ppc/std-config.h
index 6cf7f27..375ba73 100644
--- a/sim/ppc/std-config.h
+++ b/sim/ppc/std-config.h
@@ -30,18 +30,23 @@
Possible values are 0 (unknown), LITTLE_ENDIAN, BIG_ENDIAN */
-#ifndef WITH_HOST_BYTE_ORDER
-#define WITH_HOST_BYTE_ORDER 0 /*unknown*/
+#ifndef LITTLE_ENDIAN
+#define LITTLE_ENDIAN 1234
+#endif
+#ifndef BIG_ENDIAN
+#define BIG_ENDIAN 4321
+#endif
+
+#ifdef WORDS_BIGENDIAN
+# define HOST_BYTE_ORDER BIG_ENDIAN
+#else
+# define HOST_BYTE_ORDER LITTLE_ENDIAN
#endif
#ifndef WITH_TARGET_BYTE_ORDER
#define WITH_TARGET_BYTE_ORDER 0 /*unknown*/
#endif
-extern int current_host_byte_order;
-#define CURRENT_HOST_BYTE_ORDER (WITH_HOST_BYTE_ORDER \
- ? WITH_HOST_BYTE_ORDER \
- : current_host_byte_order)
extern int current_target_byte_order;
#define CURRENT_TARGET_BYTE_ORDER (WITH_TARGET_BYTE_ORDER \
? WITH_TARGET_BYTE_ORDER \