From 399f703e492a4a61e87b642d5aa401a046ebd56c Mon Sep 17 00:00:00 2001 From: Hans-Peter Nilsson Date: Mon, 16 Jun 2003 00:38:58 +0000 Subject: * 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. --- gas/config/tc-cris.c | 14 ++++++++++++-- gas/config/tc-cris.h | 3 +++ 2 files changed, 15 insertions(+), 2 deletions(-) (limited to 'gas/config') 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; diff --git a/gas/config/tc-cris.h b/gas/config/tc-cris.h index b07f6de..9082a62 100644 --- a/gas/config/tc-cris.h +++ b/gas/config/tc-cris.h @@ -158,6 +158,9 @@ extern void tc_cris_check_adjusted_broken_word PARAMS ((offsetT, of two bytes long. */ #define DWARF2_LINE_MIN_INSN_LENGTH 2 +/* Make port immune to unwanted difference in te-generic.h vs. te-linux.h. */ +#define LOCAL_LABELS_DOLLAR 1 + #endif /* TC_CRIS */ /* * Local variables: -- cgit v1.1