This is the mail archive of the
mailing list for the GCC project.
Re: [3.3/trunk] Protect MIPS CRT_CALL_STATIC_FUNCTION
Richard Sandiford <rsandifo at redhat dot com> writes:
> Eric Christopher <echristo at redhat dot com> writes:
> > Couldn't you just check on _mips16?
> Yeah, that should work too. I was trying to avoid redundant 'bal's for
> other *-elf configurations, but perhaps the overhead is so small that
> it doesn't matter much.
> If you're happier with __mips16, I can try that.
OK, the patch below also fixes the build failure. Tested on
mips64vrel-elf. OK for trunk & 3.3 branch?
* config/mips/mips.h (CRT_CALL_STATIC_FUNCTION): Wrap in
RCS file: /cvs/gcc/gcc/gcc/config/mips/mips.h,v
retrieving revision 1.239
diff -c -d -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.239 mips.h
*** config/mips/mips.h 18 Feb 2003 23:24:21 -0000 1.239
--- config/mips/mips.h 27 Feb 2003 23:01:23 -0000
*************** #define SFMODE_NAN \
*** 4345,4350 ****
--- 4345,4351 ----
/* Generate calls to memcpy, etc., not bcopy, etc. */
+ #ifndef __mips16
/* Since the bits of the _init and _fini function is spread across
many object files, each potentially with its own GP, we must assume
we need to load our GP. We don't preserve $gp or $ra, since each
*************** 1: .set reorder\n\
*** 4372,4375 ****
--- 4373,4377 ----
.cpsetup $31, $2, 1b\n\
jal " USER_LABEL_PREFIX #FUNC "\n\