[0/2] Fix fenv support for ARM

Message ID 20200719110112.14255-1-sebastian.huber@embedded-brains.de
Headers show
Series
  • Fix fenv support for ARM
Related show

Message

Sebastian Huber July 19, 2020, 11:01 a.m.
This patch set addresses some issues which popped up while building Newlib for
ARM with GCC 10 which enables -fno-common by default.

Eshan dhawan (1):
  arm: Fix fenv support

Sebastian Huber (1):
  arm: Remove superfluous fenv stub files

 newlib/libc/machine/arm/machine/fenv-mangle.h |  53 ---
 .../libc/machine/arm/machine/fenv-softfloat.h | 187 ----------
 newlib/libc/machine/arm/machine/fenv-vfp.h    | 187 ----------
 newlib/libc/machine/arm/sys/fenv.h            |  66 +---
 newlib/libm/machine/arm/Makefile.am           |  17 +-
 newlib/libm/machine/arm/Makefile.in           | 109 +-----
 newlib/libm/machine/arm/fe_dfl_env.c          |   7 -
 newlib/libm/machine/arm/feclearexcept.c       |   7 -
 newlib/libm/machine/arm/fegetenv.c            |   7 -
 newlib/libm/machine/arm/fegetexceptflag.c     |   7 -
 newlib/libm/machine/arm/fegetround.c          |   7 -
 newlib/libm/machine/arm/feholdexcept.c        |   7 -
 newlib/libm/machine/arm/fenv-softfp.c         |  32 --
 newlib/libm/machine/arm/fenv-vfp.c            |  32 --
 newlib/libm/machine/arm/fenv.c                | 319 ++++++------------
 newlib/libm/machine/arm/feraiseexcept.c       |   7 -
 newlib/libm/machine/arm/fesetenv.c            |   7 -
 newlib/libm/machine/arm/fesetexceptflag.c     |   7 -
 newlib/libm/machine/arm/fesetround.c          |   7 -
 newlib/libm/machine/arm/fetestexcept.c        |   7 -
 newlib/libm/machine/arm/feupdateenv.c         |   7 -
 21 files changed, 127 insertions(+), 959 deletions(-)
 delete mode 100644 newlib/libc/machine/arm/machine/fenv-mangle.h
 delete mode 100644 newlib/libc/machine/arm/machine/fenv-softfloat.h
 delete mode 100644 newlib/libc/machine/arm/machine/fenv-vfp.h
 delete mode 100644 newlib/libm/machine/arm/fe_dfl_env.c
 delete mode 100644 newlib/libm/machine/arm/feclearexcept.c
 delete mode 100644 newlib/libm/machine/arm/fegetenv.c
 delete mode 100644 newlib/libm/machine/arm/fegetexceptflag.c
 delete mode 100644 newlib/libm/machine/arm/fegetround.c
 delete mode 100644 newlib/libm/machine/arm/feholdexcept.c
 delete mode 100644 newlib/libm/machine/arm/fenv-softfp.c
 delete mode 100644 newlib/libm/machine/arm/fenv-vfp.c
 delete mode 100644 newlib/libm/machine/arm/feraiseexcept.c
 delete mode 100644 newlib/libm/machine/arm/fesetenv.c
 delete mode 100644 newlib/libm/machine/arm/fesetexceptflag.c
 delete mode 100644 newlib/libm/machine/arm/fesetround.c
 delete mode 100644 newlib/libm/machine/arm/fetestexcept.c
 delete mode 100644 newlib/libm/machine/arm/feupdateenv.c

-- 
2.26.2

Comments

Sebastian Huber July 23, 2020, 5:13 a.m. | #1
On 19/07/2020 13:01, Sebastian Huber wrote:

> This patch set addresses some issues which popped up while building Newlib for

> ARM with GCC 10 which enables -fno-common by default.

>

> Eshan dhawan (1):

>    arm: Fix fenv support

>

> Sebastian Huber (1):

>    arm: Remove superfluous fenv stub files


I just noticed that the stub files I removed are not superfluous. Its 
seems they are necessary to somehow overwrite the default 
implementations in:

newlib/libm/fenv

There seems to be some build system magic involved here. I guess we have 
to split up fenv.c and move all the functions to individual files 
matching the ones in newlib/libm/fenv?
Torbjorn SVENSSON via Newlib July 27, 2020, 8:07 a.m. | #2
On Jul 23 07:13, Sebastian Huber wrote:
> On 19/07/2020 13:01, Sebastian Huber wrote:

> 

> > This patch set addresses some issues which popped up while building Newlib for

> > ARM with GCC 10 which enables -fno-common by default.

> > 

> > Eshan dhawan (1):

> >    arm: Fix fenv support

> > 

> > Sebastian Huber (1):

> >    arm: Remove superfluous fenv stub files

> 

> I just noticed that the stub files I removed are not superfluous. Its seems

> they are necessary to somehow overwrite the default implementations in:

> 

> newlib/libm/fenv

> 

> There seems to be some build system magic involved here. I guess we have to

> split up fenv.c and move all the functions to individual files matching the

> ones in newlib/libm/fenv?


Splitting is probably better.  When you created and tested a new patchset,
feel free to push it.


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat
Sebastian Huber July 29, 2020, 5:07 a.m. | #3
On 27/07/2020 10:07, Corinna Vinschen via Newlib wrote:

> On Jul 23 07:13, Sebastian Huber wrote:

>> On 19/07/2020 13:01, Sebastian Huber wrote:

>>

>>> This patch set addresses some issues which popped up while building Newlib for

>>> ARM with GCC 10 which enables -fno-common by default.

>>>

>>> Eshan dhawan (1):

>>>     arm: Fix fenv support

>>>

>>> Sebastian Huber (1):

>>>     arm: Remove superfluous fenv stub files

>> I just noticed that the stub files I removed are not superfluous. Its seems

>> they are necessary to somehow overwrite the default implementations in:

>>

>> newlib/libm/fenv

>>

>> There seems to be some build system magic involved here. I guess we have to

>> split up fenv.c and move all the functions to individual files matching the

>> ones in newlib/libm/fenv?

> Splitting is probably better.  When you created and tested a new patchset,

> feel free to push it.


I checked in two patches:

https://sourceware.org/git?p=newlib-cygwin.git;a=commit;h=b7a6e02dc6a5289bfa489c0e7b6539abd281e2c6

https://sourceware.org/git?p=newlib-cygwin.git;a=commit;h=3ca43259686187e081d317e2b406724a849c9d7b

I hope the ARM fenv support issues are now fixed.
Sebastian Huber July 29, 2020, 3:07 p.m. | #4
On 29/07/2020 07:07, Sebastian Huber wrote:

> On 27/07/2020 10:07, Corinna Vinschen via Newlib wrote:

>

>> On Jul 23 07:13, Sebastian Huber wrote:

>>> On 19/07/2020 13:01, Sebastian Huber wrote:

>>>

>>>> This patch set addresses some issues which popped up while building 

>>>> Newlib for

>>>> ARM with GCC 10 which enables -fno-common by default.

>>>>

>>>> Eshan dhawan (1):

>>>>     arm: Fix fenv support

>>>>

>>>> Sebastian Huber (1):

>>>>     arm: Remove superfluous fenv stub files

>>> I just noticed that the stub files I removed are not superfluous. 

>>> Its seems

>>> they are necessary to somehow overwrite the default implementations in:

>>>

>>> newlib/libm/fenv

>>>

>>> There seems to be some build system magic involved here. I guess we 

>>> have to

>>> split up fenv.c and move all the functions to individual files 

>>> matching the

>>> ones in newlib/libm/fenv?

>> Splitting is probably better.  When you created and tested a new 

>> patchset,

>> feel free to push it.

>

> I checked in two patches:

>

> https://sourceware.org/git?p=newlib-cygwin.git;a=commit;h=b7a6e02dc6a5289bfa489c0e7b6539abd281e2c6 

>

>

> https://sourceware.org/git?p=newlib-cygwin.git;a=commit;h=3ca43259686187e081d317e2b406724a849c9d7b 

>

>

> I hope the ARM fenv support issues are now fixed.


No, it was not fixed. I checked in an additional patch:

https://sourceware.org/git?p=newlib-cygwin.git;a=commit;h=ba283d8777b617696342cad1f973e22b03bc7c74

Now at least all the linker issues are resolved.