aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDoug Evans <dje@gnu.org>1996-08-19 22:41:39 +0000
committerDoug Evans <dje@gnu.org>1996-08-19 22:41:39 +0000
commit20c7c30eb4b65b992cbba09915823631c37e7c84 (patch)
tree1f989861f924a394321d9cbfb5b5f419389decc6 /gcc
parent472b8162e3e745ebc1a2805fbd58a4a48cd4cf09 (diff)
downloadgcc-20c7c30eb4b65b992cbba09915823631c37e7c84.zip
gcc-20c7c30eb4b65b992cbba09915823631c37e7c84.tar.gz
gcc-20c7c30eb4b65b992cbba09915823631c37e7c84.tar.bz2
splet.h (SUBTARGET_SWITCHES): Recognize -m{big,little}-endian.
* sparc/splet.h (SUBTARGET_SWITCHES): Recognize -m{big,little}-endian. ({CPP,ASM,LINK}_SPEC): Add little endian support. ({BYTES,WORDS}_BIG_ENDIAN): Likewise. From-SVN: r12662
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/sparc/splet.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/gcc/config/sparc/splet.h b/gcc/config/sparc/splet.h
index a868f65..9c2efac 100644
--- a/gcc/config/sparc/splet.h
+++ b/gcc/config/sparc/splet.h
@@ -29,15 +29,31 @@ Boston, MA 02111-1307, USA. */
/* -mlive-g0 is only supported on the sparclet. */
#undef SUBTARGET_SWITCHES
#define SUBTARGET_SWITCHES \
+{"big-endian", -MASK_LITTLE_ENDIAN}, \
+{"little-endian", MASK_LITTLE_ENDIAN}, \
{"live-g0", MASK_LIVE_G0}, \
{"no-live-g0", -MASK_LIVE_G0}, \
{"broken-saverestore", MASK_BROKEN_SAVERESTORE}, \
{"no-broken-saverestore", -MASK_BROKEN_SAVERESTORE},
+#undef CPP_SPEC
+#define CPP_SPEC "\
+%(cpp_cpu) \
+%{mlittle-endian:-D__LITTLE_ENDIAN__} \
+"
+
+#undef ASM_SPEC
+#define ASM_SPEC "%{mlittle-endian:-EL} %(asm_cpu)"
+
/* Require the user to supply crt0.o. */
#undef STARTFILE_SPEC
#define STARTFILE_SPEC ""
-/* Don't need any special link spec. */
#undef LINK_SPEC
-#define LINK_SPEC ""
+#define LINK_SPEC "%{mlittle-endian:-EL}"
+
+/* sparclet chips are bi-endian. */
+#undef BYTES_BIG_ENDIAN
+#define BYTES_BIG_ENDIAN (! TARGET_LITTLE_ENDIAN)
+#undef WORDS_BIG_ENDIAN
+#define WORDS_BIG_ENDIAN (! TARGET_LITTLE_ENDIAN)