diff mbox

[ARM] PR62248 - Configure error with --with-fpu=fp-armv8

Message ID CAD57uCecQ6eKZSC+ZgJrDbKae_K_rYy_m5ofpv-a8+yQJAAptQ@mail.gmail.com
State New
Headers show

Commit Message

Yvan Roux Aug. 27, 2014, 11:10 a.m. UTC
Here is the patch that uses the arm-fpus.def list.

Thanks
Yvan

2014-08-27  Yvan Roux  <yvan.roux@linaro.org>

        * config.gcc (arm*-*-*): Check --with-fpu against arm-fpus.def.

On 27 August 2014 12:35, Yvan Roux <yvan.roux@linaro.org> wrote:
> On 27 August 2014 11:24, Richard Earnshaw <rearnsha@arm.com> wrote:
>> On 27/08/14 09:04, Yvan Roux wrote:
>>> Hi,
>>>
>>> as reported in PR62248 there is a typo in gcc/config.gcc where
>>> --with-fpu doesn't match -mfpu option for fp-armv8 value (fp-arm-v8 in
>>> config.gcc). Here is the patch to fix it.
>>>
>>> Thanks,
>>> Yvan
>>>
>>> 2014-08-27  Yvan Roux  <yvan.roux@linaro.org>
>>>
>>>         * config.gcc:  Fix fp-armv8 option for arm*-*-* targets.
>>>
>>>
>>> pr62248.diff
>>>
>>>
>>> diff --git a/gcc/config.gcc b/gcc/config.gcc
>>> index 6862c127..3f68e3e 100644
>>> --- a/gcc/config.gcc
>>> +++ b/gcc/config.gcc
>>> @@ -3528,7 +3528,7 @@ case "${target}" in
>>>               | vfp | vfp3 | vfpv3 \
>>>               | vfpv3-fp16 | vfpv3-d16 | vfpv3-d16-fp16 | vfpv3xd \
>>>               | vfpv3xd-fp16 | neon | neon-fp16 | vfpv4 | vfpv4-d16 \
>>> -             | fpv4-sp-d16 | neon-vfpv4 | fp-arm-v8 | neon-fp-armv8 \
>>> +             | fpv4-sp-d16 | neon-vfpv4 | fp-armv8 | neon-fp-armv8 \
>>>                  | crypto-neon-fp-armv8)
>>>                       # OK
>>>                       ;;
>>>
>>
>> Ok; but better still would be to change this to use the official list in
>> arm-fpus.def (like we do for CPU names).
>
> Yes indeed, I'll do it that way.

Comments

Yvan Roux Aug. 27, 2014, 11:35 a.m. UTC | #1
with the PR in the ChangeLog:

2014-08-27  Yvan Roux  <yvan.roux@linaro.org>

        PR other/62248
        * config.gcc (arm*-*-*): Check --with-fpu against arm-fpus.def.


On 27 August 2014 13:10, Yvan Roux <yvan.roux@linaro.org> wrote:
> Here is the patch that uses the arm-fpus.def list.
>
> Thanks
> Yvan
>
> 2014-08-27  Yvan Roux  <yvan.roux@linaro.org>
>
>         * config.gcc (arm*-*-*): Check --with-fpu against arm-fpus.def.
>
> On 27 August 2014 12:35, Yvan Roux <yvan.roux@linaro.org> wrote:
>> On 27 August 2014 11:24, Richard Earnshaw <rearnsha@arm.com> wrote:
>>> On 27/08/14 09:04, Yvan Roux wrote:
>>>> Hi,
>>>>
>>>> as reported in PR62248 there is a typo in gcc/config.gcc where
>>>> --with-fpu doesn't match -mfpu option for fp-armv8 value (fp-arm-v8 in
>>>> config.gcc). Here is the patch to fix it.
>>>>
>>>> Thanks,
>>>> Yvan
>>>>
>>>> 2014-08-27  Yvan Roux  <yvan.roux@linaro.org>
>>>>
>>>>         * config.gcc:  Fix fp-armv8 option for arm*-*-* targets.
>>>>
>>>>
>>>> pr62248.diff
>>>>
>>>>
>>>> diff --git a/gcc/config.gcc b/gcc/config.gcc
>>>> index 6862c127..3f68e3e 100644
>>>> --- a/gcc/config.gcc
>>>> +++ b/gcc/config.gcc
>>>> @@ -3528,7 +3528,7 @@ case "${target}" in
>>>>               | vfp | vfp3 | vfpv3 \
>>>>               | vfpv3-fp16 | vfpv3-d16 | vfpv3-d16-fp16 | vfpv3xd \
>>>>               | vfpv3xd-fp16 | neon | neon-fp16 | vfpv4 | vfpv4-d16 \
>>>> -             | fpv4-sp-d16 | neon-vfpv4 | fp-arm-v8 | neon-fp-armv8 \
>>>> +             | fpv4-sp-d16 | neon-vfpv4 | fp-armv8 | neon-fp-armv8 \
>>>>                  | crypto-neon-fp-armv8)
>>>>                       # OK
>>>>                       ;;
>>>>
>>>
>>> Ok; but better still would be to change this to use the official list in
>>> arm-fpus.def (like we do for CPU names).
>>
>> Yes indeed, I'll do it that way.
Richard Earnshaw Aug. 27, 2014, 12:26 p.m. UTC | #2
On 27/08/14 12:35, Yvan Roux wrote:
> with the PR in the ChangeLog:
> 
> 2014-08-27  Yvan Roux  <yvan.roux@linaro.org>
> 
>         PR other/62248
>         * config.gcc (arm*-*-*): Check --with-fpu against arm-fpus.def.
> 
> 

OK, thanks.

R.

> On 27 August 2014 13:10, Yvan Roux <yvan.roux@linaro.org> wrote:
>> Here is the patch that uses the arm-fpus.def list.
>>
>> Thanks
>> Yvan
>>
>> 2014-08-27  Yvan Roux  <yvan.roux@linaro.org>
>>
>>         * config.gcc (arm*-*-*): Check --with-fpu against arm-fpus.def.
>>
>> On 27 August 2014 12:35, Yvan Roux <yvan.roux@linaro.org> wrote:
>>> On 27 August 2014 11:24, Richard Earnshaw <rearnsha@arm.com> wrote:
>>>> On 27/08/14 09:04, Yvan Roux wrote:
>>>>> Hi,
>>>>>
>>>>> as reported in PR62248 there is a typo in gcc/config.gcc where
>>>>> --with-fpu doesn't match -mfpu option for fp-armv8 value (fp-arm-v8 in
>>>>> config.gcc). Here is the patch to fix it.
>>>>>
>>>>> Thanks,
>>>>> Yvan
>>>>>
>>>>> 2014-08-27  Yvan Roux  <yvan.roux@linaro.org>
>>>>>
>>>>>         * config.gcc:  Fix fp-armv8 option for arm*-*-* targets.
>>>>>
>>>>>
>>>>> pr62248.diff
>>>>>
>>>>>
>>>>> diff --git a/gcc/config.gcc b/gcc/config.gcc
>>>>> index 6862c127..3f68e3e 100644
>>>>> --- a/gcc/config.gcc
>>>>> +++ b/gcc/config.gcc
>>>>> @@ -3528,7 +3528,7 @@ case "${target}" in
>>>>>               | vfp | vfp3 | vfpv3 \
>>>>>               | vfpv3-fp16 | vfpv3-d16 | vfpv3-d16-fp16 | vfpv3xd \
>>>>>               | vfpv3xd-fp16 | neon | neon-fp16 | vfpv4 | vfpv4-d16 \
>>>>> -             | fpv4-sp-d16 | neon-vfpv4 | fp-arm-v8 | neon-fp-armv8 \
>>>>> +             | fpv4-sp-d16 | neon-vfpv4 | fp-armv8 | neon-fp-armv8 \
>>>>>                  | crypto-neon-fp-armv8)
>>>>>                       # OK
>>>>>                       ;;
>>>>>
>>>>
>>>> Ok; but better still would be to change this to use the official list in
>>>> arm-fpus.def (like we do for CPU names).
>>>
>>> Yes indeed, I'll do it that way.
>
Yvan Roux Aug. 27, 2014, 2:22 p.m. UTC | #3
Committed on trunk at r214573, and I'll backport it on 4.9 branch.

On 27 August 2014 14:26, Richard Earnshaw <rearnsha@arm.com> wrote:
> On 27/08/14 12:35, Yvan Roux wrote:
>> with the PR in the ChangeLog:
>>
>> 2014-08-27  Yvan Roux  <yvan.roux@linaro.org>
>>
>>         PR other/62248
>>         * config.gcc (arm*-*-*): Check --with-fpu against arm-fpus.def.
>>
>>
>
> OK, thanks.
>
> R.
>
>> On 27 August 2014 13:10, Yvan Roux <yvan.roux@linaro.org> wrote:
>>> Here is the patch that uses the arm-fpus.def list.
>>>
>>> Thanks
>>> Yvan
>>>
>>> 2014-08-27  Yvan Roux  <yvan.roux@linaro.org>
>>>
>>>         * config.gcc (arm*-*-*): Check --with-fpu against arm-fpus.def.
>>>
>>> On 27 August 2014 12:35, Yvan Roux <yvan.roux@linaro.org> wrote:
>>>> On 27 August 2014 11:24, Richard Earnshaw <rearnsha@arm.com> wrote:
>>>>> On 27/08/14 09:04, Yvan Roux wrote:
>>>>>> Hi,
>>>>>>
>>>>>> as reported in PR62248 there is a typo in gcc/config.gcc where
>>>>>> --with-fpu doesn't match -mfpu option for fp-armv8 value (fp-arm-v8 in
>>>>>> config.gcc). Here is the patch to fix it.
>>>>>>
>>>>>> Thanks,
>>>>>> Yvan
>>>>>>
>>>>>> 2014-08-27  Yvan Roux  <yvan.roux@linaro.org>
>>>>>>
>>>>>>         * config.gcc:  Fix fp-armv8 option for arm*-*-* targets.
>>>>>>
>>>>>>
>>>>>> pr62248.diff
>>>>>>
>>>>>>
>>>>>> diff --git a/gcc/config.gcc b/gcc/config.gcc
>>>>>> index 6862c127..3f68e3e 100644
>>>>>> --- a/gcc/config.gcc
>>>>>> +++ b/gcc/config.gcc
>>>>>> @@ -3528,7 +3528,7 @@ case "${target}" in
>>>>>>               | vfp | vfp3 | vfpv3 \
>>>>>>               | vfpv3-fp16 | vfpv3-d16 | vfpv3-d16-fp16 | vfpv3xd \
>>>>>>               | vfpv3xd-fp16 | neon | neon-fp16 | vfpv4 | vfpv4-d16 \
>>>>>> -             | fpv4-sp-d16 | neon-vfpv4 | fp-arm-v8 | neon-fp-armv8 \
>>>>>> +             | fpv4-sp-d16 | neon-vfpv4 | fp-armv8 | neon-fp-armv8 \
>>>>>>                  | crypto-neon-fp-armv8)
>>>>>>                       # OK
>>>>>>                       ;;
>>>>>>
>>>>>
>>>>> Ok; but better still would be to change this to use the official list in
>>>>> arm-fpus.def (like we do for CPU names).
>>>>
>>>> Yes indeed, I'll do it that way.
>>
>
>
Bernhard Reutner-Fischer Aug. 27, 2014, 4:51 p.m. UTC | #4
On 27 August 2014 16:22:28 CEST, Yvan Roux <yvan.roux@linaro.org> wrote:
>Committed on trunk at r214573, and I'll backport it on 4.9 branch.

s/true/:/

?
Thanks,
Yvan Roux Aug. 27, 2014, 5:07 p.m. UTC | #5
"true" seems to be used that way for aarch64*-*-* and arm*-*-* is it
preferable to change it to ";" for all occurrences  ?

Thanks,
Yvan

On 27 August 2014 18:51, Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> wrote:
> On 27 August 2014 16:22:28 CEST, Yvan Roux <yvan.roux@linaro.org> wrote:
>>Committed on trunk at r214573, and I'll backport it on 4.9 branch.
>
> s/true/:/
>
> ?
> Thanks,
>
>
Yvan Roux Aug. 27, 2014, 5:13 p.m. UTC | #6
On 27 August 2014 19:07, Yvan Roux <yvan.roux@linaro.org> wrote:
> "true" seems to be used that way for aarch64*-*-* and arm*-*-* is it
> preferable to change it to ";" for all occurrences  ?

sorry for the typo, I meant colon and not semicolon.

> Thanks,
> Yvan
>
> On 27 August 2014 18:51, Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> wrote:
>> On 27 August 2014 16:22:28 CEST, Yvan Roux <yvan.roux@linaro.org> wrote:
>>>Committed on trunk at r214573, and I'll backport it on 4.9 branch.
>>
>> s/true/:/
>>
>> ?
>> Thanks,
>>
>>
diff mbox

Patch

diff --git a/gcc/config.gcc b/gcc/config.gcc
index 6862c127..7434a08 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -3523,20 +3523,17 @@  case "${target}" in
 			;;
 		esac
 
-		case "$with_fpu" in
-		"" \
-		| vfp | vfp3 | vfpv3 \
-		| vfpv3-fp16 | vfpv3-d16 | vfpv3-d16-fp16 | vfpv3xd \
-		| vfpv3xd-fp16 | neon | neon-fp16 | vfpv4 | vfpv4-d16 \
-		| fpv4-sp-d16 | neon-vfpv4 | fp-arm-v8 | neon-fp-armv8 \
-                | crypto-neon-fp-armv8)
-			# OK
-			;;
-		*)
-			echo "Unknown fpu used in --with-fpu=$with_fpu" 2>&1
-			exit 1
-			;;
-		esac
+		# see if it matches any of the entries in arm-fpus.def
+		if [ x"$with_fpu" = x ] \
+		    || grep "^ARM_FPU(\"$with_fpu\"," \
+			    ${srcdir}/config/arm/arm-fpus.def \
+			    > /dev/null; then
+		  # OK
+		  true
+		else
+		  echo "Unknown fpu used in --with-fpu=$with_fpu" 1>&2
+		  exit 1
+		fi
 
 		case "$with_abi" in
 		"" \