aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-cris.c
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2003-06-16 00:38:58 +0000
committerHans-Peter Nilsson <hp@axis.com>2003-06-16 00:38:58 +0000
commit399f703e492a4a61e87b642d5aa401a046ebd56c (patch)
treea778c06ad202429f337ac51501ee147bc0ff3213 /gas/config/tc-cris.c
parente3d8b004106b3c2e77c2f514e8dceb2d6c5b0e5c (diff)
downloadgdb-399f703e492a4a61e87b642d5aa401a046ebd56c.zip
gdb-399f703e492a4a61e87b642d5aa401a046ebd56c.tar.gz
gdb-399f703e492a4a61e87b642d5aa401a046ebd56c.tar.bz2
* configure.in: Add specific case for cris-*-linux-gnu* with
em=linux. * configure: Regenerate. * config/tc-cris.c (DEFAULT_CRIS_AXIS_LINUX_GNU): New macro, TRUE if TE_LINUX defined, else FALSE. (bfd_boolean demand_register_prefix): Set default from DEFAULT_CRIS_AXIS_LINUX_GNU. (symbols_have_leading_underscore): Similar. * config/tc-cris.h (LOCAL_LABELS_DOLLAR): Define to 1.
Diffstat (limited to 'gas/config/tc-cris.c')
-rw-r--r--gas/config/tc-cris.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/gas/config/tc-cris.c b/gas/config/tc-cris.c
index f5d724b..3d19924 100644
--- a/gas/config/tc-cris.c
+++ b/gas/config/tc-cris.c
@@ -157,11 +157,21 @@ static char *cris_insn_first_word_frag PARAMS ((void));
/* Handle to the opcode hash table. */
static struct hash_control *op_hash = NULL;
+/* If we target cris-axis-linux-gnu (as opposed to generic cris-axis-elf),
+ we default to no underscore and required register-prefixes. The
+ difference is in the default values. */
+#ifdef TE_LINUX
+#define DEFAULT_CRIS_AXIS_LINUX_GNU TRUE
+#else
+#define DEFAULT_CRIS_AXIS_LINUX_GNU FALSE
+#endif
+
/* Whether we demand that registers have a `$' prefix. Default here. */
-static bfd_boolean demand_register_prefix = FALSE;
+static bfd_boolean demand_register_prefix = DEFAULT_CRIS_AXIS_LINUX_GNU;
/* Whether global user symbols have a leading underscore. Default here. */
-static bfd_boolean symbols_have_leading_underscore = TRUE;
+static bfd_boolean symbols_have_leading_underscore
+ = !DEFAULT_CRIS_AXIS_LINUX_GNU;
/* Whether or not we allow PIC, and expand to PIC-friendly constructs. */
static bfd_boolean pic = FALSE;