This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RFA: PATCH: Fix mips.c bootstrap for Irix on 3.1.
- To: "Eric M. Christopher" <echristo at redhat dot com>
- Subject: RFA: PATCH: Fix mips.c bootstrap for Irix on 3.1.
- From: Jeffrey Oldham <oldham at codesourcery dot com>
- Date: Tue, 18 Sep 2001 09:00:10 -0700
- Cc: gcc-patches at gcc dot gnu dot org, Jeffrey Oldham <oldham at codesourcery dot com>, david dot billinghurst at riotinto dot com, hjl at lucon dot org
- Organization: CodeSourcery LLC
- References: <20010917142715.A23666@lucon.org> <1000767473.1228.6.camel@ghostwheel.cygnus.com> <20010917203836.A17608@codesourcery.com> <1000796441.3580.0.camel@ghostwheel.cygnus.com>
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
+ }