public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* fenv() support broken with GCC 10 on ARM
@ 2020-07-08 13:00 Sebastian Huber
  2020-07-08 13:19 ` Joel Sherrill
  2020-07-08 17:26 ` Sebastian Huber
  0 siblings, 2 replies; 7+ messages in thread
From: Sebastian Huber @ 2020-07-08 13:00 UTC (permalink / raw)
  To: Newlib

Hello,

I get the following linker errors with GCC and the latest Newlib on ARM:

/build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/bin/ld: 
/build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv-vfp.o):/scratch/git-rtems-source-builder/rtems/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/build/arm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h:61: 
multiple definition of `__softfloat_float_rounding_mode'; 
/build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv-softfp.o):/scratch/git-rtems-source-builder/rtems/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/build/arm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h:61: 
first defined here
/build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/bin/ld: 
/build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv-vfp.o):/scratch/git-rtems-source-builder/rtems/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/build/arm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h:60: 
multiple definition of `__softfloat_float_exception_mask'; 
/build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv-softfp.o):/scratch/git-rtems-source-builder/rtems/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/build/arm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h:60: 
first defined here
/build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/bin/ld: 
/build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv-vfp.o):/scratch/git-rtems-source-builder/rtems/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/build/arm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h:59: 
multiple definition of `__softfloat_float_exception_flags'; 
/build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv-softfp.o):/scratch/git-rtems-source-builder/rtems/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/build/arm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h:59: 
first defined here


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: fenv() support broken with GCC 10 on ARM
  2020-07-08 13:00 fenv() support broken with GCC 10 on ARM Sebastian Huber
@ 2020-07-08 13:19 ` Joel Sherrill
  2020-07-08 17:26 ` Sebastian Huber
  1 sibling, 0 replies; 7+ messages in thread
From: Joel Sherrill @ 2020-07-08 13:19 UTC (permalink / raw)
  To: Sebastian Huber; +Cc: Newlib

Have some of the CPU CPP flags from GCC for soft float vs VFP changed?

What part of the build did this happen in? Is this just with the RSB or did
you have to build more?

Eshan isn't online yet and I will try to duplicate it.

My grep doesn't even find a variable with "rounding" in thenewlib arm fenv
source so I will need to do more to figure this one out.

--joel

On Wed, Jul 8, 2020 at 8:00 AM Sebastian Huber <
sebastian.huber@embedded-brains.de> wrote:

> Hello,
>
> I get the following linker errors with GCC and the latest Newlib on ARM:
>
> /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/bin/ld:
> /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv-vfp.o):/scratch/git-rtems-source-builder/rtems/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/build/arm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h:61:
>
> multiple definition of `__softfloat_float_rounding_mode';
> /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv-softfp.o):/scratch/git-rtems-source-builder/rtems/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/build/arm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h:61:
>
> first defined here
> /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/bin/ld:
> /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv-vfp.o):/scratch/git-rtems-source-builder/rtems/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/build/arm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h:60:
>
> multiple definition of `__softfloat_float_exception_mask';
> /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv-softfp.o):/scratch/git-rtems-source-builder/rtems/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/build/arm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h:60:
>
> first defined here
> /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/bin/ld:
> /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv-vfp.o):/scratch/git-rtems-source-builder/rtems/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/build/arm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h:59:
>
> multiple definition of `__softfloat_float_exception_flags';
> /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv-softfp.o):/scratch/git-rtems-source-builder/rtems/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/build/arm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h:59:
>
> first defined here
>
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: fenv() support broken with GCC 10 on ARM
  2020-07-08 13:00 fenv() support broken with GCC 10 on ARM Sebastian Huber
  2020-07-08 13:19 ` Joel Sherrill
@ 2020-07-08 17:26 ` Sebastian Huber
  2020-07-08 17:41   ` Sebastian Huber
  2020-07-08 17:42   ` Eshan Dhawan
  1 sibling, 2 replies; 7+ messages in thread
From: Sebastian Huber @ 2020-07-08 17:26 UTC (permalink / raw)
  To: Newlib

On 08/07/2020 15:00, Sebastian Huber wrote:

> Hello,
>
> I get the following linker errors with GCC and the latest Newlib on ARM:
>
> /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/bin/ld: 
> /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv-vfp.o):/scratch/git-rtems-source-builder/rtems/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/build/arm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h:61: 
> multiple definition of `__softfloat_float_rounding_mode'; 
> /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv-softfp.o):/scratch/git-rtems-source-builder/rtems/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/build/arm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h:61: 
> first defined here
> /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/bin/ld: 
> /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv-vfp.o):/scratch/git-rtems-source-builder/rtems/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/build/arm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h:60: 
> multiple definition of `__softfloat_float_exception_mask'; 
> /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv-softfp.o):/scratch/git-rtems-source-builder/rtems/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/build/arm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h:60: 
> first defined here
> /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/bin/ld: 
> /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv-vfp.o):/scratch/git-rtems-source-builder/rtems/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/build/arm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h:59: 
> multiple definition of `__softfloat_float_exception_flags'; 
> /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv-softfp.o):/scratch/git-rtems-source-builder/rtems/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/build/arm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h:59: 
> first defined here

Affected are ARM and MIPS:

grep -r 'int __softfloat_float_' .
newlib/libc/machine/arm/machine/fenv-softfloat.h:int 
__softfloat_float_exception_flags;
newlib/libc/machine/arm/machine/fenv-softfloat.h:int 
__softfloat_float_exception_mask;
newlib/libc/machine/arm/machine/fenv-softfloat.h:int 
__softfloat_float_rounding_mode;
newlib/libc/machine/mips/machine/fenv-softfloat.h:int 
__softfloat_float_exception_flags;
newlib/libc/machine/mips/machine/fenv-softfloat.h:int 
__softfloat_float_exception_mask;
newlib/libc/machine/mips/machine/fenv-softfloat.h:int 
__softfloat_float_rounding_mode;

There needs to be a declaration only in the header file and a definition 
somewhere else.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: fenv() support broken with GCC 10 on ARM
  2020-07-08 17:26 ` Sebastian Huber
@ 2020-07-08 17:41   ` Sebastian Huber
       [not found]     ` <CAH5ZSWo_nqnALqjgUDxUX_9B8pNLHK3kwTktXYQ_Lh+d4aJDfw@mail.gmail.com>
  2020-07-08 17:42   ` Eshan Dhawan
  1 sibling, 1 reply; 7+ messages in thread
From: Sebastian Huber @ 2020-07-08 17:41 UTC (permalink / raw)
  To: Newlib

On 08/07/2020 19:26, Sebastian Huber wrote:

> On 08/07/2020 15:00, Sebastian Huber wrote:
>
>> Hello,
>>
>> I get the following linker errors with GCC and the latest Newlib on ARM:
>>
>> /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/bin/ld: 
>> /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv-vfp.o):/scratch/git-rtems-source-builder/rtems/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/build/arm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h:61: 
>> multiple definition of `__softfloat_float_rounding_mode'; 
>> /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv-softfp.o):/scratch/git-rtems-source-builder/rtems/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/build/arm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h:61: 
>> first defined here
>> /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/bin/ld: 
>> /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv-vfp.o):/scratch/git-rtems-source-builder/rtems/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/build/arm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h:60: 
>> multiple definition of `__softfloat_float_exception_mask'; 
>> /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv-softfp.o):/scratch/git-rtems-source-builder/rtems/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/build/arm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h:60: 
>> first defined here
>> /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/bin/ld: 
>> /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv-vfp.o):/scratch/git-rtems-source-builder/rtems/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/build/arm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h:59: 
>> multiple definition of `__softfloat_float_exception_flags'; 
>> /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv-softfp.o):/scratch/git-rtems-source-builder/rtems/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/build/arm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h:59: 
>> first defined here
>
> Affected are ARM and MIPS:
>
> grep -r 'int __softfloat_float_' .
> newlib/libc/machine/arm/machine/fenv-softfloat.h:int 
> __softfloat_float_exception_flags;
> newlib/libc/machine/arm/machine/fenv-softfloat.h:int 
> __softfloat_float_exception_mask;
> newlib/libc/machine/arm/machine/fenv-softfloat.h:int 
> __softfloat_float_rounding_mode;
> newlib/libc/machine/mips/machine/fenv-softfloat.h:int 
> __softfloat_float_exception_flags;
> newlib/libc/machine/mips/machine/fenv-softfloat.h:int 
> __softfloat_float_exception_mask;
> newlib/libc/machine/mips/machine/fenv-softfloat.h:int 
> __softfloat_float_rounding_mode;
>
> There needs to be a declaration only in the header file and a 
> definition somewhere else. 

No, this is a different issue. These header files are only included in 
source files:

newlib/libm/machine/arm/fenv.c:#include <machine/fenv-softfloat.h>
newlib/libm/machine/mips/fenv.c:#include <machine/fenv-softfloat.h>

On ARM (not in MIPS) this source file is included in two source files:

newlib/libm/machine/arm/fenv-vfp.c:#include "fenv.c"
newlib/libm/machine/arm/fenv-softfp.c:#include "fenv.c"

Does this make sense? I am not sure what the overall logic is supposed 
to be.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: fenv() support broken with GCC 10 on ARM
  2020-07-08 17:26 ` Sebastian Huber
  2020-07-08 17:41   ` Sebastian Huber
@ 2020-07-08 17:42   ` Eshan Dhawan
  2020-07-08 17:45     ` Sebastian Huber
  1 sibling, 1 reply; 7+ messages in thread
From: Eshan Dhawan @ 2020-07-08 17:42 UTC (permalink / raw)
  To: Sebastian Huber; +Cc: Newlib

On Wed, Jul 8, 2020 at 10:57 PM Sebastian Huber <
sebastian.huber@embedded-brains.de> wrote:

> On 08/07/2020 15:00, Sebastian Huber wrote:
>
> > Hello,
> >
> > I get the following linker errors with GCC and the latest Newlib on ARM:
> >
> > /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/bin/ld:
> >
> /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv-vfp.o):/scratch/git-rtems-source-builder/rtems/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/build/arm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h:61:
>
> > multiple definition of `__softfloat_float_rounding_mode';
> >
> /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv-softfp.o):/scratch/git-rtems-source-builder/rtems/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/build/arm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h:61:
>
> > first defined here
> > /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/bin/ld:
> >
> /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv-vfp.o):/scratch/git-rtems-source-builder/rtems/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/build/arm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h:60:
>
> > multiple definition of `__softfloat_float_exception_mask';
> >
> /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv-softfp.o):/scratch/git-rtems-source-builder/rtems/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/build/arm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h:60:
>
> > first defined here
> > /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/bin/ld:
> >
> /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv-vfp.o):/scratch/git-rtems-source-builder/rtems/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/build/arm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h:59:
>
> > multiple definition of `__softfloat_float_exception_flags';
> >
> /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv-softfp.o):/scratch/git-rtems-source-builder/rtems/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/build/arm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h:59:
>
> > first defined here
>
>
Could you tell the the Newlib configurations you used
So I could regenerate the issue :)

-Eshan

> Affected are ARM and MIPS:
>
> grep -r 'int __softfloat_float_' .
> newlib/libc/machine/arm/machine/fenv-softfloat.h:int
> __softfloat_float_exception_flags;
> newlib/libc/machine/arm/machine/fenv-softfloat.h:int
> __softfloat_float_exception_mask;
> newlib/libc/machine/arm/machine/fenv-softfloat.h:int
> __softfloat_float_rounding_mode;
> newlib/libc/machine/mips/machine/fenv-softfloat.h:int
> __softfloat_float_exception_flags;
> newlib/libc/machine/mips/machine/fenv-softfloat.h:int
> __softfloat_float_exception_mask;
> newlib/libc/machine/mips/machine/fenv-softfloat.h:int
> __softfloat_float_rounding_mode;
>
> There needs to be a declaration only in the header file and a definition
> somewhere else.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: fenv() support broken with GCC 10 on ARM
  2020-07-08 17:42   ` Eshan Dhawan
@ 2020-07-08 17:45     ` Sebastian Huber
  0 siblings, 0 replies; 7+ messages in thread
From: Sebastian Huber @ 2020-07-08 17:45 UTC (permalink / raw)
  To: Eshan Dhawan; +Cc: Newlib

On 08/07/2020 19:42, Eshan Dhawan wrote:

>
>
> On Wed, Jul 8, 2020 at 10:57 PM Sebastian Huber 
> <sebastian.huber@embedded-brains.de 
> <mailto:sebastian.huber@embedded-brains.de>> wrote:
>
>     On 08/07/2020 15:00, Sebastian Huber wrote:
>
>     > Hello,
>     >
>     > I get the following linker errors with GCC and the latest Newlib
>     on ARM:
>     >
>     >
>     /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/bin/ld:
>
>     >
>     /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv-vfp.o):/scratch/git-rtems-source-builder/rtems/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/build/arm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h:61:
>
>     > multiple definition of `__softfloat_float_rounding_mode';
>     >
>     /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv-softfp.o):/scratch/git-rtems-source-builder/rtems/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/build/arm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h:61:
>
>     > first defined here
>     >
>     /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/bin/ld:
>
>     >
>     /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv-vfp.o):/scratch/git-rtems-source-builder/rtems/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/build/arm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h:60:
>
>     > multiple definition of `__softfloat_float_exception_mask';
>     >
>     /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv-softfp.o):/scratch/git-rtems-source-builder/rtems/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/build/arm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h:60:
>
>     > first defined here
>     >
>     /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/bin/ld:
>
>     >
>     /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv-vfp.o):/scratch/git-rtems-source-builder/rtems/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/build/arm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h:59:
>
>     > multiple definition of `__softfloat_float_exception_flags';
>     >
>     /build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv-softfp.o):/scratch/git-rtems-source-builder/rtems/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/build/arm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h:59:
>
>     > first defined here
>
>
> Could you tell the the Newlib configurations you used
> So I could regenerate the issue :)

The latest RTEMS 6 RSB. You can also guess it from the output that the 
target is arm-rtems6, GCC is 50666d2 and Newlib is f095752.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: fenv() support broken with GCC 10 on ARM
       [not found]         ` <CAH5ZSWpcBh=EEjvcz3c956CbR9JvHA_UTfxyGJCG4B4jhWtt2w@mail.gmail.com>
@ 2020-07-09 18:07           ` Sebastian Huber
  0 siblings, 0 replies; 7+ messages in thread
From: Sebastian Huber @ 2020-07-09 18:07 UTC (permalink / raw)
  To: Newlib

On 09/07/2020 19:16, Eshan Dhawan wrote:

> Hi Sebastian,
> Could you please tell the steps to recreate the error :)

You have to build a GCC 10 for ARM. For example using the latest RTEMS 
Source Builder:

arm-rtems6-gcc --version
arm-rtems6-gcc (GCC) 10.1.1 20200703 (RTEMS 6, RSB 
5ab61d2e8c7ced8c685541509a7ac4eba704e69e, Newlib f095752)
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Then compile the following test program:

#include <fenv.h>

int main()
{
     return fesetenv( FE_DFL_ENV );
}

arm-rtems6-gcc init.c -mthumb -mcpu=cortex-m3 -lm -Wl,-Map,map.txt
/build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/bin/ld: 
/build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv-vfp.o):/scratch/git-rtems-source-builder/rtems/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/build/arm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h:61: 
multiple definition of `__softfloat_float_rounding_mode'; 
/build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv-softfp.o):/scratch/git-rtems-source-builder/rtems/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/build/arm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h:61: 
first defined here
/build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/bin/ld: 
/build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv-vfp.o):/scratch/git-rtems-source-builder/rtems/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/build/arm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h:60: 
multiple definition of `__softfloat_float_exception_mask'; 
/build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv-softfp.o):/scratch/git-rtems-source-builder/rtems/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/build/arm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h:60: 
first defined here
/build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/bin/ld: 
/build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv-vfp.o):/scratch/git-rtems-source-builder/rtems/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/build/arm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h:59: 
multiple definition of `__softfloat_float_exception_flags'; 
/build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv-softfp.o):/scratch/git-rtems-source-builder/rtems/build/arm-rtems6-gcc-50666d2-newlib-f095752-x86_64-linux-gnu-1/build/arm-rtems6/thumb/cortex-m3/newlib/targ-include/machine/fenv-softfloat.h:59: 
first defined here
/build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/bin/ld: 
warning: cannot find entry symbol _start; defaulting to 0000000000008000

In the linker map file you will find this dependency chain:

/build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv.o)
                               /tmp/cclZauID.o (fesetenv)
/build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv-softfp.o)
/build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv.o) 
(__softfp_feclearexcept)
/build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv-vfp.o)
/build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a(lib_a-fenv.o) 
(__vfp_feclearexcept)

You have the following symbols:

nm 
/build/rtems/6/lib/gcc/arm-rtems6/10.1.1/../../../../arm-rtems6/lib/thumb/cortex-m3/libm.a 
--defined-only | grep -C 3 __soft
lib_a-feholdexcept.o:

lib_a-fenv-softfp.o:
00000000 B __softfloat_float_exception_flags
00000000 B __softfloat_float_exception_mask
00000000 B __softfloat_float_rounding_mode
00000000 T __softfp_feclearexcept
00000000 T __softfp_fedisableexcept
00000000 T __softfp_feenableexcept
00000000 T __softfp_fegetenv
00000000 T __softfp_fegetexcept
00000000 T __softfp_fegetexceptflag
00000000 T __softfp_fegetround
00000000 T __softfp_feholdexcept
00000000 T __softfp_feraiseexcept
00000000 T __softfp_fesetenv
00000000 T __softfp_fesetexceptflag
00000000 T __softfp_fesetround
00000000 T __softfp_fetestexcept
00000000 T __softfp_feupdateenv

lib_a-fenv-vfp.o:
00000000 B __softfloat_float_exception_flags
00000000 B __softfloat_float_exception_mask
00000000 B __softfloat_float_rounding_mode
00000000 T __vfp_feclearexcept
00000000 T __vfp_fedisableexcept
00000000 T __vfp_feenableexcept



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-07-09 18:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-08 13:00 fenv() support broken with GCC 10 on ARM Sebastian Huber
2020-07-08 13:19 ` Joel Sherrill
2020-07-08 17:26 ` Sebastian Huber
2020-07-08 17:41   ` Sebastian Huber
     [not found]     ` <CAH5ZSWo_nqnALqjgUDxUX_9B8pNLHK3kwTktXYQ_Lh+d4aJDfw@mail.gmail.com>
     [not found]       ` <bcb3c1cd-32d8-b726-fcdd-5bcc7c6d944f@embedded-brains.de>
     [not found]         ` <CAH5ZSWpcBh=EEjvcz3c956CbR9JvHA_UTfxyGJCG4B4jhWtt2w@mail.gmail.com>
2020-07-09 18:07           ` Sebastian Huber
2020-07-08 17:42   ` Eshan Dhawan
2020-07-08 17:45     ` Sebastian Huber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).