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]
Other format: [Raw text]

Re: [3.3/trunk] Protect MIPS CRT_CALL_STATIC_FUNCTION


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


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