This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [3.3/trunk] Protect MIPS CRT_CALL_STATIC_FUNCTION
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Richard Sandiford <rsandifo at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, echristo at redhat dot com
- Date: 27 Feb 2003 23:46:50 -0800
- Subject: Re: [3.3/trunk] Protect MIPS CRT_CALL_STATIC_FUNCTION
- References: <wvnptpevren.fsf@talisman.cambridge.redhat.com>
On Wed, 2003-02-26 at 10:16, Richard Sandiford wrote:
> This patch protects the mips definition of CRT_CALL_STATIC_FUNCTION
> so that it's only used for TARGET_ABICALLS. At the moment it's used
> unconditionally, which is probably harmless (but unnecessary) for
> most *-elf targets. The problem is that it uses instructions that
> are not available in mips16 mode, so mips16 targets no longer build.
>
> I wondered at first whether to protect the code by '#ifdef _MIPS_SIM'.
> But the *BSDs don't define _MIPS_SIM, and I guess the multi-GOT
> support will be useful to them as well as linux.
>
> So instead the patch adds a new preprocessor define, _MIPS_ABICALLS.
> Adding it to TARGET_CPU_CPP_BUILTINS should catch everything except
> netbsd, which already defines __ABICALLS__. Both macros are checked
> in the patch.
>
> I'm not sure whether this is the best fix though. Suggestions?
>
> Anyway, tested on mips64vrel-elf and mips-sgi-irix6.5. The C_C_S_F
> definition was also added to 3.3, so if this patch is OK for trunk,
> is it OK for 3.3 as well?
Yes.
But that's not an approval -- it's an answer to your question. :-) If
it is approved for mainline, it is OK for the 3.3 branch too.
Thanks,
--
Mark Mitchell
CodeSourcery, LLC
mark at codesourcery dot com