Fix m32c LIB_SPEC to match -msim not -msim*

Submitted by Joseph S. Myers on Feb. 16, 2011, 10:48 p.m.

Details

Message ID Pine.LNX.4.64.1102162246460.15478@digraph.polyomino.org.uk
State New
Headers show

Commit Message

Joseph S. Myers Feb. 16, 2011, 10:48 p.m.
m32c's LIB_SPEC matches -msim* in various places, but the option is
just -msim according to m32c.opt, with no optional joined argument.
This patch restricts the spec to match to .opt file (the alternative
would be to use JoinedOrMissing on the option in m32c.opt).

Tested building cc1 and xgcc for cross to m32c-elf.  OK to commit?

2011-02-16  Joseph Myers  <joseph@codesourcery.com>

	* config/m32c/m32c.h (LIB_SPEC): Match -msim not -msim*.

Comments

DJ Delorie Feb. 16, 2011, 10:54 p.m.
> 	* config/m32c/m32c.h (LIB_SPEC): Match -msim not -msim*.

Ok.  Thanks!

Patch hide | download patch | download mbox

Index: gcc/config/m32c/m32c.h
===================================================================
--- gcc/config/m32c/m32c.h	(revision 170224)
+++ gcc/config/m32c/m32c.h	(working copy)
@@ -54,13 +54,13 @@ 
    family.  Most of the logic here is making sure we do the right
    thing when no CPU is specified, which defaults to R8C.  */
 #undef  LIB_SPEC
-#define LIB_SPEC "-( -lc %{msim*:-lsim}%{!msim*:-lnosys} -) \
-%{msim*:%{!T*: %{mcpu=m32cm:%Tsim24.ld}%{mcpu=m32c:%Tsim24.ld} \
-	%{!mcpu=m32cm:%{!mcpu=m32c:%Tsim16.ld}}}} \
-%{!T*:%{!msim*: %{mcpu=m16c:%Tm16c.ld} \
-		%{mcpu=m32cm:%Tm32cm.ld} \
-		%{mcpu=m32c:%Tm32c.ld} \
-		%{!mcpu=m16c:%{!mcpu=m32cm:%{!mcpu=m32c:%Tr8c.ld}}}}} \
+#define LIB_SPEC "-( -lc %{msim:-lsim}%{!msim:-lnosys} -) \
+%{msim:%{!T*: %{mcpu=m32cm:%Tsim24.ld}%{mcpu=m32c:%Tsim24.ld} \
+       %{!mcpu=m32cm:%{!mcpu=m32c:%Tsim16.ld}}}} \
+%{!T*:%{!msim: %{mcpu=m16c:%Tm16c.ld} \
+	       %{mcpu=m32cm:%Tm32cm.ld} \
+	       %{mcpu=m32c:%Tm32c.ld} \
+	       %{!mcpu=m16c:%{!mcpu=m32cm:%{!mcpu=m32c:%Tr8c.ld}}}}} \
 "
 
 /* Run-time Target Specification */