diff mbox

[MIPS/libgcc] fix crts.

Message ID BC889A6F-A26F-4568-8B0F-55209B436482@mentor.com
State New
Headers show

Commit Message

Iain Sandoe June 22, 2012, 12:45 p.m. UTC
Hello,

While working on mips recently, I noticed that all the execute tests fail for simulator.

This appears to be caused by an oversight in the move from gcc/config => libgcc, where t-elf defined extra parts including crt{begin,end}.o but these have been omitted from the re-built libgcc/config.host.

The proposed patch adds the two crts to mips targets in libgcc/config.host (where they include t-elf) and coalesces those that have the same config.

OK for trunk?

Iain

Comments

Richard Sandiford June 22, 2012, 9:06 p.m. UTC | #1
Iain Sandoe <Iain_Sandoe@mentor.com> writes:
> Hello,
>
> While working on mips recently, I noticed that all the execute tests
> fail for simulator.
>
> This appears to be caused by an oversight in the move from gcc/config
> => libgcc, where t-elf defined extra parts including crt{begin,end}.o
> but these have been omitted from the re-built libgcc/config.host.
>
> The proposed patch adds the two crts to mips targets in
> libgcc/config.host (where they include t-elf) and coalesces those that
> have the same config.

Which target were you using?  Was it something like mipsisa64-elfoabi?
crtbegin.o and crtend.o are supposed to be added via:

*-*-elf)
  extra_parts="crtbegin.o crtend.o"
  ;;

but I suspect that that "elf)" ought to be "elf*)".  Would that fix
your case?  If so, it sounds like the right fix, although I can't
approve it.  It probably ought to go on 4.7 too.

I still like the idea of combining the stanzas though.  That part
of the patch -- i.e. without the changes to extra_parts -- is OK.

I think the tx39 differences are purely accidental or historical.
Your new generic mips*-*-elf*) stanza ought to be OK for that too,
so would you mind removing the tx39 case altogether while you're there?
No need to test mipstx39-elf explicitly; it's very much a legacy target.

Thanks,
Richard
diff mbox

Patch

Index: libgcc/config.host
===================================================================
--- libgcc/config.host	(revision 188843)
+++ libgcc/config.host	(working copy)
@@ -749,46 +749,32 @@  mips*-sde-elf*)
 	esac
 	extra_parts="$extra_parts crti.o crtn.o"
 	;;
-mipsisa32-*-elf* | mipsisa32el-*-elf* | \
-mipsisa32r2-*-elf* | mipsisa32r2el-*-elf* | \
-mipsisa64-*-elf* | mipsisa64el-*-elf* | \
-mipsisa64r2-*-elf* | mipsisa64r2el-*-elf*)
-	tmake_file="$tmake_file mips/t-elf mips/t-crtstuff mips/t-mips16"
-	extra_parts="$extra_parts crti.o crtn.o"
+mipstx39-*-elf* | mipstx39el-*-elf*)
+	tmake_file="$tmake_file mips/t-crtstuff mips/t-mips16"
 	;;
 mipsisa64sr71k-*-elf*)
 	tmake_file="$tmake_file mips/t-elf mips/t-crtstuff t-fdpbit"
-	extra_parts="$extra_parts crti.o crtn.o"
+	extra_parts="$extra_parts crtbegin.o crtend.o crti.o crtn.o"
         ;;
-mipsisa64sb1-*-elf* | mipsisa64sb1el-*-elf*)
-	tmake_file="$tmake_file mips/t-elf mips/t-crtstuff mips/t-mips16"
-	extra_parts="$extra_parts crti.o crtn.o"
-	;;
-mips-*-elf* | mipsel-*-elf*)
-	tmake_file="$tmake_file mips/t-elf mips/t-crtstuff mips/t-mips16"
-	extra_parts="$extra_parts crti.o crtn.o"
-	;;
-mips64-*-elf* | mips64el-*-elf*)
-	tmake_file="$tmake_file mips/t-elf mips/t-crtstuff mips/t-mips16"
-	extra_parts="$extra_parts crti.o crtn.o"
-	;;
 mips64vr-*-elf* | mips64vrel-*-elf*)
 	tmake_file="$tmake_file mips/t-elf mips/t-vr mips/t-crtstuff"
-	extra_parts="$extra_parts crti.o crtn.o"
+	extra_parts="$extra_parts crtbegin.o crtend.o crti.o crtn.o"
         ;;
-mips64orion-*-elf* | mips64orionel-*-elf*)
+mipsisa64sb1-*-elf* | mipsisa64sb1el-*-elf*)
 	tmake_file="$tmake_file mips/t-elf mips/t-crtstuff mips/t-mips16"
-	extra_parts="$extra_parts crti.o crtn.o"
+	extra_parts="$extra_parts crtbegin.o crtend.o crti.o crtn.o"
 	;;
 mips*-*-rtems*)
 	tmake_file="$tmake_file mips/t-elf mips/t-crtstuff mips/t-mips16"
-	extra_parts="$extra_parts crti.o crtn.o"
+	extra_parts="$extra_parts crtbegin.o crtend.o crti.o crtn.o"
 	;;
+
+mips*-*-elf*)
+	tmake_file="$tmake_file mips/t-elf mips/t-crtstuff mips/t-mips16"
+	extra_parts="$extra_parts crtbegin.o crtend.o crti.o crtn.o"
+	;;
 mips-wrs-vxworks)
 	;;
-mipstx39-*-elf* | mipstx39el-*-elf*)
-	tmake_file="$tmake_file mips/t-crtstuff mips/t-mips16"
-	;;
 mmix-knuth-mmixware)
 	extra_parts="crti.o crtn.o crtbegin.o crtend.o"
 	tmake_file="${tmake_file} ${cpu_type}/t-${cpu_type}"