On 06/11/2024 12:23, Torbjorn SVENSSON wrote:
> 
> 
> On 2024-11-06 12:26, Richard Earnshaw (lists) wrote:
>> On 06/11/2024 07:44, Christophe Lyon wrote:
>>> On Wed, 6 Nov 2024 at 07:20, Torbjörn SVENSSON
>>> <torbjorn.svens...@foss.st.com> wrote:
>>>>
>>>> While the regression was reported on GCC15, I'm sure that same
>>>> regression will be seen on GCC14 when it's tested in the
>>>> arm-linux-gnueabihf configuration.
>>>>
>>>> Ok for trunk and releases/gcc-14?
>>>>
>>>> -- 
>>>>
>>>> This fixes reported regression at
>>>> https://linaro.atlassian.net/browse/GNU-1407.
>>>>
>>>> gcc/testsuite/ChangeLog:
>>>>
>>>>          * gcc.target/arm/pr68620.c: Use effective-target arm_fp.
>>>>
>>>> Signed-off-by: Torbjörn SVENSSON <torbjorn.svens...@foss.st.com>
>>>> ---
>>>>   gcc/testsuite/gcc.target/arm/pr68620.c | 4 +++-
>>>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/gcc/testsuite/gcc.target/arm/pr68620.c 
>>>> b/gcc/testsuite/gcc.target/arm/pr68620.c
>>>> index 6e38671752f..1ed84f4ac75 100644
>>>> --- a/gcc/testsuite/gcc.target/arm/pr68620.c
>>>> +++ b/gcc/testsuite/gcc.target/arm/pr68620.c
>>>> @@ -1,8 +1,10 @@
>>>>   /* { dg-do compile } */
>>>>   /* { dg-skip-if "-mpure-code supports M-profile without Neon only" { 
>>>> *-*-* } { "-mpure-code" } } */
>>>>   /* { dg-require-effective-target arm_arch_v7a_ok } */
>>>> -/* { dg-options "-mfp16-format=ieee -mfpu=auto -mfloat-abi=softfp" } */
>>>> +/* { dg-require-effective-target arm_fp_ok } */
>>>> +/* { dg-options "-mfp16-format=ieee -mfpu=auto" } */
>>>>   /* { dg-add-options arm_arch_v7a } */
>>>> +/* { dg-add-options arm_fp } */
>>>>
>>>
>>> So... this partially reverts your previous patch (bringing back
>>> arm_fp). What is the problem now?
>>>
>>
>> Yeah, that sounds wrong.  arm_fp_ok tries to find options to add to the 
>> basic testsuite options, but it can't be combined with arm_arch_v7a as that 
>> picks a totally different set of flags for the architecture.
> 
> The problem is that for arm-linux-gnueabihf, we cannot use -mfloat-abi=softfp 
> as there is no multilib available for that ABI, or at least that's my 
> interpretation of below error message.
> 
> This is the output from the CI run:
> 
> Executing on host: 
> /home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/destdir/armv8l-unknown-linux-gnueabihf/bin/armv8l-unknown-linux-gnueabihf-gcc
>   
> /home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/snapshots/gcc.git~master/gcc/testsuite/gcc.target/arm/pr68620.c
>     -fdiagnostics-plain-output   -mfp16-format=ieee -mfpu=auto 
> -mfloat-abi=softfp -mcpu=unset -march=armv7-a+fp -S -o pr68620.s (timeout = 
> 600)
> spawn -ignore SIGHUP 
> /home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/destdir/armv8l-unknown-linux-gnueabihf/bin/armv8l-unknown-linux-gnueabihf-gcc
>  
> /home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/snapshots/gcc.git~master/gcc/testsuite/gcc.target/arm/pr68620.c
>  -fdiagnostics-plain-output -mfp16-format=ieee -mfpu=auto -mfloat-abi=softfp 
> -mcpu=unset -march=armv7-a+fp -S -o pr68620.s
> In file included from /usr/include/features.h:510,
>                  from 
> /usr/include/arm-linux-gnueabihf/bits/libc-header-start.h:33,
>                  from /usr/include/stdint.h:26,
>                  from 
> /home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/destdir/armv8l-unknown-linux-gnueabihf/lib/gcc/armv8l-unknown-linux-gnueabihf/15.0.0/include/stdint.h:11,
>                  from 
> /home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/destdir/armv8l-unknown-linux-gnueabihf/lib/gcc/armv8l-unknown-linux-gnueabihf/15.0.0/include/arm_fp16.h:34,
>                  from 
> /home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/destdir/armv8l-unknown-linux-gnueabihf/lib/gcc/armv8l-unknown-linux-gnueabihf/15.0.0/include/arm_neon.h:41,
>                  from 
> /home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/snapshots/gcc.git~master/gcc/testsuite/gcc.target/arm/pr68620.c:7:
> /usr/include/arm-linux-gnueabihf/gnu/stubs.h:7:11: fatal error: 
> gnu/stubs-soft.h: No such file or directory
> compilation terminated.
> compiler exited with status 1
> output is:
> In file included from /usr/include/features.h:510,
>                  from 
> /usr/include/arm-linux-gnueabihf/bits/libc-header-start.h:33,
>                  from /usr/include/stdint.h:26,
>                  from 
> /home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/destdir/armv8l-unknown-linux-gnueabihf/lib/gcc/armv8l-unknown-linux-gnueabihf/15.0.0/include/stdint.h:11,
>                  from 
> /home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/destdir/armv8l-unknown-linux-gnueabihf/lib/gcc/armv8l-unknown-linux-gnueabihf/15.0.0/include/arm_fp16.h:34,
>                  from 
> /home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/destdir/armv8l-unknown-linux-gnueabihf/lib/gcc/armv8l-unknown-linux-gnueabihf/15.0.0/include/arm_neon.h:41,
>                  from 
> /home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/snapshots/gcc.git~master/gcc/testsuite/gcc.target/arm/pr68620.c:7:
> /usr/include/arm-linux-gnueabihf/gnu/stubs.h:7:11: fatal error: 
> gnu/stubs-soft.h: No such file or directory
> compilation terminated.
> 
> comp_output (pruned) is:
> In file included from /usr/include/features.h:510,
>                  from 
> /usr/include/arm-linux-gnueabihf/bits/libc-header-start.h:33,
>                  from /usr/include/stdint.h:26,
>                  from 
> /home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/destdir/armv8l-unknown-linux-gnueabihf/lib/gcc/armv8l-unknown-linux-gnueabihf/15.0.0/include/stdint.h:11,
>                  from 
> /home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/destdir/armv8l-unknown-linux-gnueabihf/lib/gcc/armv8l-unknown-linux-gnueabihf/15.0.0/include/arm_fp16.h:34,
>                  from 
> /home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/destdir/armv8l-unknown-linux-gnueabihf/lib/gcc/armv8l-unknown-linux-gnueabihf/15.0.0/include/arm_neon.h:41,
>                  from 
> /home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/snapshots/gcc.git~master/gcc/testsuite/gcc.target/arm/pr68620.c:7:
> /usr/include/arm-linux-gnueabihf/gnu/stubs.h:7:11: fatal error: 
> gnu/stubs-soft.h: No such file or directory
> compilation terminated.
> 
> FAIL: gcc.target/arm/pr68620.c (test for excess errors)
> 
> So, if we cannot use arm_fp, what can we use instead to check if it needs 
> -mfloat-abi=softfp or -mfloat-abi=hard?
> 
> Kind regards,
> Torbjörn

Ah, got you.  Interestingly my ubuntu armhf instalation has booth stubs-soft.h 
and stubs-hard.h even though it's a hard-float environment, so I wouldn't see 
this error.  I'm not sure if that's something ubuntu has fixed, or whether it's 
because the tcwg install is slightly non-standard.

Technically this isn't a multilib - because we aren't linking, but I see where 
you're coming from.  I need to think a bit about this one.  What we really need 
is some way of checking if stdint.h works in a soft-fp environment; we might 
need a new check for this in target-supports.exp.

R. 

Reply via email to