diff mbox

[mips] Fix -mno-shared option (gcc.target/mips/pr35802.c)

Message ID c3a6726f-5463-4d16-b21b-79235bea6d69@EXCHHUB01.MIPS.com
State New
Headers show

Commit Message

Steve Ellcey Dec. 10, 2012, 5:23 p.m. UTC
The test gcc.target/mips/pr35802.c is failing with the message:

	xgcc: error: unrecognized command line option '-mdsp-mno-shared'

Obviously the -mdsp and -mno-shared flags got stuck together without
a space between them.  This patch fixes the failure.  Ok to checkin?
It was tested with no regressions.

2012-12-10  Steve Ellcey  <sellcey@mips.com>

	* config/mips/gnu-user.h (NO_SHARED_SPECS): Add space before option.

Comments

Richard Sandiford Dec. 10, 2012, 7:41 p.m. UTC | #1
"Steve Ellcey " <sellcey@mips.com> writes:
> The test gcc.target/mips/pr35802.c is failing with the message:
>
> 	xgcc: error: unrecognized command line option '-mdsp-mno-shared'
>
> Obviously the -mdsp and -mno-shared flags got stuck together without
> a space between them.  This patch fixes the failure.  Ok to checkin?
> It was tested with no regressions.

Ugh.

> diff --git a/gcc/config/mips/gnu-user.h b/gcc/config/mips/gnu-user.h
> index d35ddac..55ca662 100644
> --- a/gcc/config/mips/gnu-user.h
> +++ b/gcc/config/mips/gnu-user.h
> @@ -97,7 +97,7 @@ along with GCC; see the file COPYING3.  If not see
>  #ifdef HAVE_AS_NO_SHARED
>  /* Default to -mno-shared for non-PIC.  */
>  # define NO_SHARED_SPECS \
> -  "%{mshared|mno-shared|fpic|fPIC|fpie|fPIE:;:-mno-shared}"
> +  "%{mshared|mno-shared|fpic|fPIC|fpie|fPIE:;: -mno-shared}"
>  #else
>  # define NO_SHARED_SPECS ""
>  #endif

MARCH_MTUNE_NATIVE_SPECS puts the space after the opening quote,
so we might as well do the same here for consistency.  OK with that
change, thanks.

Richard
Andrew Pinski Dec. 10, 2012, 7:45 p.m. UTC | #2
On Mon, Dec 10, 2012 at 9:23 AM, Steve Ellcey <sellcey@mips.com> wrote:
>
> The test gcc.target/mips/pr35802.c is failing with the message:
>
>         xgcc: error: unrecognized command line option '-mdsp-mno-shared'
>
> Obviously the -mdsp and -mno-shared flags got stuck together without
> a space between them.  This patch fixes the failure.  Ok to checkin?
> It was tested with no regressions.
>
> 2012-12-10  Steve Ellcey  <sellcey@mips.com>
>
>         * config/mips/gnu-user.h (NO_SHARED_SPECS): Add space before option.

I think the space should go before the %{ like most of the other SPECS
macros in that file.
So like:
# define NO_SHARED_SPECS \
  " %{mshared|mno-shared|fpic|fPIC|fpie|fPIE:;:-mno-shared}"

Thanks,
Andrew Pinski

>
>
> diff --git a/gcc/config/mips/gnu-user.h b/gcc/config/mips/gnu-user.h
> index d35ddac..55ca662 100644
> --- a/gcc/config/mips/gnu-user.h
> +++ b/gcc/config/mips/gnu-user.h
> @@ -97,7 +97,7 @@ along with GCC; see the file COPYING3.  If not see
>  #ifdef HAVE_AS_NO_SHARED
>  /* Default to -mno-shared for non-PIC.  */
>  # define NO_SHARED_SPECS \
> -  "%{mshared|mno-shared|fpic|fPIC|fpie|fPIE:;:-mno-shared}"
> +  "%{mshared|mno-shared|fpic|fPIC|fpie|fPIE:;: -mno-shared}"
>  #else
>  # define NO_SHARED_SPECS ""
>  #endif
diff mbox

Patch

diff --git a/gcc/config/mips/gnu-user.h b/gcc/config/mips/gnu-user.h
index d35ddac..55ca662 100644
--- a/gcc/config/mips/gnu-user.h
+++ b/gcc/config/mips/gnu-user.h
@@ -97,7 +97,7 @@  along with GCC; see the file COPYING3.  If not see
 #ifdef HAVE_AS_NO_SHARED
 /* Default to -mno-shared for non-PIC.  */
 # define NO_SHARED_SPECS \
-  "%{mshared|mno-shared|fpic|fPIC|fpie|fPIE:;:-mno-shared}"
+  "%{mshared|mno-shared|fpic|fPIC|fpie|fPIE:;: -mno-shared}"
 #else
 # define NO_SHARED_SPECS ""
 #endif