This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Add MIPS nonpic tests to testsuite
- From: Catherine Moore <clm at codesourcery dot com>
- To: Richard Sandiford <rdsandiford at googlemail dot com>, gcc-patches at gcc dot gnu dot org
- Cc: Catherine Moore <clm at codesourcery dot com>
- Date: Fri, 30 Jan 2009 13:23:18 -0500
- Subject: Re: [patch] Add MIPS nonpic tests to testsuite
- References: <49345FE8.6040709@codesourcery.com> <87fxl62pjp.fsf@firetop.home> <493720E6.8030504@codesourcery.com> <o7myfcwvlz.fsf@foo.home> <873ah3k1w1.fsf@firetop.home> <49385F36.6090408@codesourcery.com> <87y6yviluc.fsf@firetop.home>
Hi Richard,
I finally got around to testing out this suggestion. The mips nonpic tests pass with this patch.
Okay to install?
Thanks,
Catherine
2009-01-30 Catherine Moore <clm@codesourcery.com>
* sde.h (SUBTARGET_ARM_SPEC): Don;t assemble -fpic code as
-mabicalls.
Index: sde.h
===================================================================
--- sde.h (revision 143798)
+++ sde.h (working copy)
@@ -60,7 +60,6 @@ along with GCC; see the file COPYING3.
#undef SUBTARGET_ASM_SPEC
#define SUBTARGET_ASM_SPEC "\
%{!mips1:--trap} \
-%{fPIC|fpic|fPIE|fpie:%{!mips16*:-KPIC}} \
%{mips16:-no-mips16}"
#undef LINK_SPEC
Richard Sandiford wrote:
Catherine Moore <clm@codesourcery.com> writes:
Richard Sandiford wrote:
Adam Nemet <anemet@caviumnetworks.com> writes:
Catherine Moore <clm@codesourcery.com> writes:
I've tested with mips-linux and also with mips-sde-elf. The testsuite
doesn't currently pass with the mips-sde-elf configuration due to extra
compiler/linker messages, though.
Can you elaborate? It would be nice if the new tests passed on the
configurations that they're run on.
I imagine it was:
%{fPIC|fpic|fPIE|fpie:%{!mips16*:-KPIC}}
in sde.h:SUBTARGET_ASM_SPEC. So we assemble -fpic code as -mabicalls,
even though GCC hasn't generated that.
If so, it looks like an SDE bug to me, and it's good that the testsuite
has picked up on it. -fpic really ought to be link-compatible with
-fno-pic, if it's accepted at all.
Actually, the problem that I'm currently seeing is:
/tmp/cc6v0Red.s: Assembler messages:^M
/tmp/cc6v0Red.s:26: Warning: No .cprestore pseudo-op used in PIC code^M
/tmp/cc6v0Red.s:26: Warning: Macro instruction expanded into multiple instructions^M
Yeah, this would be a symptom of the problem I mentioned.
The assembler thinks that it's compiling abicalls code,
but GCC has compiled non-abicalls code.
IMO, we should just remove that line from sde.h:SUBTARGET_ASM_SPEC.
Richard