psxfenv01 fails to compile for SPARC and I guess many others

Joel Sherrill joel at rtems.org
Mon Nov 11 15:27:09 UTC 2019


On Mon, Nov 11, 2019 at 8:10 AM Sebastian Huber <
sebastian.huber at embedded-brains.de> wrote:

> Hello,
>
> I get a compile error even with the latest Newlib:
>
> /home/EB/sebastian_h/git-rtems-5/c/src/../../testsuites/psxtests/psxfenv01/init.c:
>
> In function 'Init':
> /home/EB/sebastian_h/git-rtems-5/c/src/../../testsuites/psxtests/psxfenv01/init.c:97:23:
>
> error: 'FE_DIVBYZERO' undeclared (first use in this function); did you
> mean 'FD_ZERO'?
>       r = feraiseexcept(FE_DIVBYZERO);
>                         ^~~~~~~~~~~~
>                         FD_ZERO
> /home/EB/sebastian_h/git-rtems-5/c/src/../../testsuites/psxtests/psxfenv01/init.c:97:23:
>
> note: each undeclared identifier is reported only once for each function
> it appears in
>
> This define is commented out:
>
> /build/rtems/5/powerpc-rtems5/include/sys/fenv.h: *     FE_DIVBYZERO
> /build/rtems/5/powerpc-rtems5/include/sys/fenv.h://#define FE_DIVBYZERO
> 0x00000001
> /build/rtems/5/powerpc-rtems5/include/sys/fenv.h:
> //(FE_DIVBYZERO|FE_INEXACT|FE_INVALID|FE_OVERFLOW|FE_UNDERFLOW)
> /build/rtems/5/arm-rtems5/include/sys/fenv.h: * FE_DIVBYZERO
> /build/rtems/5/arm-rtems5/include/sys/fenv.h://#define FE_DIVBYZERO
> 0x00000001
> /build/rtems/5/arm-rtems5/include/sys/fenv.h:
> //(FE_DIVBYZERO|FE_INEXACT|FE_INVALID|FE_OVERFLOW|FE_UNDERFLOW)
> /build/rtems/5/sparc-rtems5/include/sys/fenv.h: *       FE_DIVBYZERO
> /build/rtems/5/sparc-rtems5/include/sys/fenv.h://#define FE_DIVBYZERO
> 0x00000001
> /build/rtems/5/sparc-rtems5/include/sys/fenv.h:
> //(FE_DIVBYZERO|FE_INEXACT|FE_INVALID|FE_OVERFLOW|FE_UNDERFLOW)
> /build/rtems/5/riscv-rtems5/include/sys/fenv.h:#define FE_DIVBYZERO
> 0x00000008
>

Per https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/fenv.h.html,
I don't
think any of the fenv.h constants have to be defined by an architecture.
The test should
ifdef on each constant before using it.

I thought I had a fix for this and pushed it. But I must have lost it when
I had a
machine crash. :(

I have no idea why this wasn't showing up in automated testing. Are we
missing
RISC-V BSPs somehow?

--joel


>
>
> --
> Sebastian Huber, embedded brains GmbH
>
> Address : Dornierstr. 4, D-82178 Puchheim, Germany
> Phone   : +49 89 189 47 41-16
> Fax     : +49 89 189 47 41-09
> E-Mail  : sebastian.huber at embedded-brains.de
> PGP     : Public key available on request.
>
> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20191111/a66751f4/attachment.html>


More information about the devel mailing list