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]

Clean up handling of -EB/-EL



The testsuite uses -EL on several dump tests, but this option is not 
supported for targets which are not bi-endian (eg a.out): this is the only 
reason why these tests fail.

By making the assembler accept -EL for a little-endian only assembler (and 
similarly for -EB on big-endian), we can improve the testsuite coverage 
and also make the command line option handling more uniform across the 
builds.

R.

	* tc-arm.c (md_longopts): On targets that aren't bi-endian, support
	the -EL/-EB option that matches the target's endianness.
	(md_parse_option): Likewise.


Index: tc-arm.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-arm.c,v
retrieving revision 1.109
diff -p -r1.109 tc-arm.c
*** tc-arm.c	2002/01/14 15:36:30	1.109
--- tc-arm.c	2002/01/14 15:46:01
*************** struct option md_longopts[] =
*** 9293,9299 ****
--- 9293,9309 ----
    {"EB", no_argument, NULL, OPTION_EB},
  #define OPTION_EL (OPTION_MD_BASE + 1)
    {"EL", no_argument, NULL, OPTION_EL},
+ #else
+   /* If the build isn't bi-endian, just support the flag that we are anyway.
+      This makes things more portable.  */
+ #if TARGET_BYTES_BIG_ENDIAN
+ #define OPTION_EB (OPTION_MD_BASE + 0)
+   {"EB", no_argument, NULL, OPTION_EB},
+ #else
+ #define OPTION_EL (OPTION_MD_BASE + 1)
+   {"EL", no_argument, NULL, OPTION_EL},
  #endif
+ #endif
  #ifdef OBJ_ELF
  #define OPTION_OABI (OPTION_MD_BASE +2)
    {"oabi", no_argument, NULL, OPTION_OABI},
*************** md_parse_option (c, arg)
*** 9312,9321 ****
  
    switch (c)
      {
! #ifdef ARM_BI_ENDIAN
      case OPTION_EB:
        target_big_endian = 1;
        break;
      case OPTION_EL:
        target_big_endian = 0;
        break;
--- 9322,9334 ----
  
    switch (c)
      {
! #ifdef OPTION_EB
      case OPTION_EB:
        target_big_endian = 1;
        break;
+ #endif
+ 
+ #ifdef OPTION_EL
      case OPTION_EL:
        target_big_endian = 0;
        break;

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