This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Committed, gas: Change defaults for cris-*-linux-gnu*.


This change makes gas for cris-*-linux-gnu* default to not
require special options like "--no-underscore" for normal
program assembly, by making use of a cute gas config header-file
with seemingly no other practical use that defines a macro that
tc-cris.c can look at and then decide what to make its defaults.

I would have liked to also cut out the multi-object-format
support for cris-*-linux-gnu*, but that'd cause gas to emit an
error: "Fatal error: emulations not handled in this
configuration" for the option "--em=criself" which GCC passes,
and which is the default for recent binutils.  You might think
that's overridable in md_longopts, but it isn't: adding a match
for e.g. "em=criself" causes getopt_long to error out with an
ambiguous-options message.  Maybe we can get the "emulations not
handled" message under control of a target macro?  Still, no
hurry; it'd cut down on the binutils executable sizes a bit but
require me to make a few more tweaks to the binutils testsuites.

gas:
	* 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.

Index: configure.in
===================================================================
RCS file: /cvs/src/src/gas/configure.in,v
retrieving revision 1.133
diff -p -c -r1.133 configure.in
*** configure.in	13 Jun 2003 13:17:57 -0000	1.133
--- configure.in	15 Jun 2003 22:44:47 -0000
*************** changequote([,])dnl
*** 208,213 ****
--- 208,214 ----

        avr-*-*)				fmt=elf ;;

+       cris-*-linux-gnu*)		fmt=multi bfd_gas=yes em=linux ;;
        cris-*-*)				fmt=multi bfd_gas=yes ;;

        d10v-*-*)				fmt=elf ;;
Index: config/tc-cris.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-cris.c,v
retrieving revision 1.26
diff -p -c -r1.26 tc-cris.c
*** config/tc-cris.c	23 Jan 2003 12:51:04 -0000	1.26
--- config/tc-cris.c	15 Jun 2003 22:49:56 -0000
*************** static char *cris_insn_first_word_frag P
*** 157,167 ****
  /* Handle to the opcode hash table.  */
  static struct hash_control *op_hash = NULL;

  /* Whether we demand that registers have a `$' prefix.  Default here.  */
! static bfd_boolean demand_register_prefix = FALSE;

  /* Whether global user symbols have a leading underscore.  Default here.  */
! static bfd_boolean symbols_have_leading_underscore = TRUE;

  /* Whether or not we allow PIC, and expand to PIC-friendly constructs.  */
  static bfd_boolean pic = FALSE;
--- 157,177 ----
  /* 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 = DEFAULT_CRIS_AXIS_LINUX_GNU;

  /* Whether global user symbols have a leading underscore.  Default here.  */
! 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;
Index: config/tc-cris.h
===================================================================
RCS file: /cvs/src/src/gas/config/tc-cris.h,v
retrieving revision 1.8
diff -p -c -r1.8 tc-cris.h
*** config/tc-cris.h	22 Oct 2002 23:45:40 -0000	1.8
--- config/tc-cris.h	15 Jun 2003 22:44:48 -0000
*************** extern void tc_cris_check_adjusted_broke
*** 158,163 ****
--- 158,166 ----
     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:

brgds, H-P



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]