Fix missing info for -march and -mtune wrong values on aarch64 (PR driver/83193).

Message ID b178ae2a-28e0-84b1-e615-9e8672547c36@suse.cz
State New
Headers show
Series
  • Fix missing info for -march and -mtune wrong values on aarch64 (PR driver/83193).
Related show

Commit Message

Martin Liška Feb. 20, 2018, 12:05 p.m.
Hi.

This is fix for one of multiple issues seen in the PR. Note that I also have some patches
for the others, but it's not stage4 material in my opinion.
This one is quite obvious and should land in GCC 8.

Output before:
$ ./xgcc -B. -march=sparta /tmp/main.c
cc1: error: unknown value ‘sparta’ for -march

And after:
$ ./xgcc -B. -march=sparta /tmp/main.c
cc1: error: unknown value ‘sparta’ for -march
cc1: note: valid arguments are: armv8-a armv8.1-a armv8.2-a armv8.3-a armv8.4-a;

Ready for trunk?

gcc/ChangeLog:

2018-02-20  Martin Liska  <mliska@suse.cz>

	PR driver/83193
	* config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
	possible values if we don't have a hint.
---
 gcc/config/aarch64/aarch64.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Jakub Jelinek Feb. 20, 2018, 12:09 p.m. | #1
On Tue, Feb 20, 2018 at 01:05:33PM +0100, Martin Liška wrote:
> Hi.

> 

> This is fix for one of multiple issues seen in the PR. Note that I also have some patches

> for the others, but it's not stage4 material in my opinion.

> This one is quite obvious and should land in GCC 8.

> 

> Output before:

> $ ./xgcc -B. -march=sparta /tmp/main.c

> cc1: error: unknown value ‘sparta’ for -march

> 

> And after:

> $ ./xgcc -B. -march=sparta /tmp/main.c

> cc1: error: unknown value ‘sparta’ for -march

> cc1: note: valid arguments are: armv8-a armv8.1-a armv8.2-a armv8.3-a armv8.4-a;

> 

> Ready for trunk?

> 

> gcc/ChangeLog:

> 

> 2018-02-20  Martin Liska  <mliska@suse.cz>

> 

> 	PR driver/83193

> 	* config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print

> 	possible values if we don't have a hint.

> ---

>  gcc/config/aarch64/aarch64.c | 3 +++

>  1 file changed, 3 insertions(+)

> 

> 


> diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c

> index 228fd1b908d..5fb18c4ca20 100644

> --- a/gcc/config/aarch64/aarch64.c

> +++ b/gcc/config/aarch64/aarch64.c

> @@ -10633,6 +10633,9 @@ aarch64_print_hint_for_core_or_arch (const char *str, bool arch)

>    if (hint)

>      inform (input_location, "valid arguments are: %s;"

>  			     " did you mean %qs?", s, hint);

> +  else

> +    inform (input_location, "valid arguments are: %s;", s);


No trailing ; in this case, that is a separator for did you mean.

Otherwise I'd say this is obvious, ok for trunk.

	Jakub
Martin Liška Feb. 20, 2018, 12:18 p.m. | #2
On 02/20/2018 01:09 PM, Jakub Jelinek wrote:
> On Tue, Feb 20, 2018 at 01:05:33PM +0100, Martin Liška wrote:

>> Hi.

>>

>> This is fix for one of multiple issues seen in the PR. Note that I also have some patches

>> for the others, but it's not stage4 material in my opinion.

>> This one is quite obvious and should land in GCC 8.

>>

>> Output before:

>> $ ./xgcc -B. -march=sparta /tmp/main.c

>> cc1: error: unknown value ‘sparta’ for -march

>>

>> And after:

>> $ ./xgcc -B. -march=sparta /tmp/main.c

>> cc1: error: unknown value ‘sparta’ for -march

>> cc1: note: valid arguments are: armv8-a armv8.1-a armv8.2-a armv8.3-a armv8.4-a;

>>

>> Ready for trunk?

>>

>> gcc/ChangeLog:

>>

>> 2018-02-20  Martin Liska  <mliska@suse.cz>

>>

>> 	PR driver/83193

>> 	* config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print

>> 	possible values if we don't have a hint.

>> ---

>>  gcc/config/aarch64/aarch64.c | 3 +++

>>  1 file changed, 3 insertions(+)

>>

>>

> 

>> diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c

>> index 228fd1b908d..5fb18c4ca20 100644

>> --- a/gcc/config/aarch64/aarch64.c

>> +++ b/gcc/config/aarch64/aarch64.c

>> @@ -10633,6 +10633,9 @@ aarch64_print_hint_for_core_or_arch (const char *str, bool arch)

>>    if (hint)

>>      inform (input_location, "valid arguments are: %s;"

>>  			     " did you mean %qs?", s, hint);

>> +  else

>> +    inform (input_location, "valid arguments are: %s;", s);

> 

> No trailing ; in this case, that is a separator for did you mean.


Yep!

> 

> Otherwise I'd say this is obvious, ok for trunk.


Thanks, just installed.

Martin

> 

> 	Jakub

>

Patch

diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index 228fd1b908d..5fb18c4ca20 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -10633,6 +10633,9 @@  aarch64_print_hint_for_core_or_arch (const char *str, bool arch)
   if (hint)
     inform (input_location, "valid arguments are: %s;"
 			     " did you mean %qs?", s, hint);
+  else
+    inform (input_location, "valid arguments are: %s;", s);
+
   XDELETEVEC (s);
 }