This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


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

RFA: PATCH: Fix mips.c bootstrap for Irix on 3.1.


OK to commit this patch?

On Tue, Sep 18, 2001 at 12:00:41AM -0700, Eric M. Christopher wrote:
> 
> > The bootstrap finished without difficulty and the testsuites are
> > running with no new regressions yet appearing.  Unfortunately, I will
> > go to bed before it finishes so I will send email tomorrow morning.
> > 
> 
> Sorry for the inconvenience. I'll be traveling all day tomorrow so if
> the patch works could you please check it in with an appropriate
> changelog from me? If not, hopefully I'll get to it tomorrow night my
> time.

Tue Sep 18 09:51:11 2001  Eric Christopher  <ecechristo@redhat.com>

	* config/mips/mips.c (mips_asm_file_start): Conditionalize Elf
	code generation only for Gnu assembler.

Tested on	mips-sgi-irix6.5
		  gcc.c-torture/compile/20001226-1.c, -O3 -g regressed
		  but this just indicates that the compilation time
		  increased by a few seconds.  On good days, this test
		  case takes very close to the 300second limit so
		  minor compiler changes can cause the test to fail or
		  not fail.
Approved by	???you???
Applied to 	mainline

Thanks,
Jeffrey D. Oldham
oldham@codesourcery.com
Index: mips.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/mips.c,v
retrieving revision 1.151
diff -c -p -r1.151 mips.c
*** mips.c	2001/09/15 02:03:13	1.151
--- mips.c	2001/09/18 15:49:07
*************** mips_asm_file_start (stream)
*** 6104,6135 ****
    if (TARGET_MIPS_AS && optimize && flag_delayed_branch)
      fprintf (stream, "\t.set\tnobopt\n");
  
! #ifdef OBJECT_FORMAT_ELF
!   /* Generate a special section to describe the ABI switches used to produce
!      the resultant binary.  This used to be done by the assembler setting bits
!      in the ELF header's flags field, but we have run out of bits.  GDB needs
!      this information in order to be able to correctly debug these binaries.
!      See the function mips_gdbarch_init() in gdb/mips-tdep.c.  */
!   switch (mips_abi)
      {
!     case ABI_32:   abi_string = "abi32"; break;
!     case ABI_N32:  abi_string = "abiN32"; break;
!     case ABI_64:   abi_string = "abi64"; break;
!     case ABI_O64:  abi_string = "abiO64"; break;
!     case ABI_EABI: abi_string = TARGET_64BIT ? "eabi64" : "eabi32"; break;
!     case ABI_MEABI:abi_string = TARGET_64BIT ? "meabi64" : "meabi32"; break;
!     default:
!       abort ();
!     }
!   /* Note - we use fprintf directly rather than called named_section()
!      because in this way we can avoid creating an allocated section.  We
!      do not want this section to take up any space in the running
!      executable.  */
!   fprintf (stream, "\t.section .mdebug.%s\n", abi_string);
  
!   /* Restore the default section.  */
!   fprintf (stream, "\t.previous\n");
  #endif
  
  
  
--- 6104,6140 ----
    if (TARGET_MIPS_AS && optimize && flag_delayed_branch)
      fprintf (stream, "\t.set\tnobopt\n");
  
!   if (TARGET_GAS)
      {
! #if defined(OBJECT_FORMAT_ELF)
!       /* Generate a special section to describe the ABI switches used to
! 	 produce the resultant binary.  This used to be done by the assembler
! 	 setting bits in the ELF header's flags field, but we have run out of
! 	 bits.  GDB needs this information in order to be able to correctly
! 	 debug these binaries. See the function mips_gdbarch_init() in
! 	 gdb/mips-tdep.c.  */
! 
!       switch (mips_abi)
! 	{
! 	case ABI_32:   abi_string = "abi32"; break;
! 	case ABI_N32:  abi_string = "abiN32"; break;
! 	case ABI_64:   abi_string = "abi64"; break;
! 	case ABI_O64:  abi_string = "abiO64"; break;
! 	case ABI_EABI: abi_string = TARGET_64BIT ? "eabi64" : "eabi32"; break;
! 	case ABI_MEABI:abi_string = TARGET_64BIT ? "meabi64" : "meabi32"; break;
! 	default:
! 	  abort ();
! 	}
!       /* Note - we use fprintf directly rather than called named_section()
! 	 because in this way we can avoid creating an allocated section.  We
! 	 do not want this section to take up any space in the running
! 	 executable.  */
!       fprintf (stream, "\t.section .mdebug.%s\n", abi_string);
  
!       /* Restore the default section.  */
!       fprintf (stream, "\t.previous\n");
  #endif
+     }

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