[PATCH 2/5] testsuites/libtests: Remove floats from libdl tests

Sam Price thesamprice at gmail.com
Mon Aug 28 15:31:21 UTC 2023


Nevermind that would be done at the linker and not at compile time.

On Mon, Aug 28, 2023 at 11:04 AM Sam Price <thesamprice at gmail.com> wrote:
>
> Just curious instead of doing #ifdef __microblaze__
> could you do
> #ifndef __extendsfdf2
>
> Or something similar to determine if the floating point symbols are known?
>
> This would make it more portable.
>
> On Mon, Aug 28, 2023 at 10:11 AM Alex White <alex.white at oarcorp.com> wrote:
> >
> > On Sun, Aug 27, 2023 at 11:48 PM Chris Johns <chrisj at rtems.org> wrote:
> > >
> > > On 28/8/2023 2:12 pm, Alex White wrote:
> > > > On Sun, Aug 27, 2023 at 8:38 PM Chris Johns <chrisj at rtems.org> wrote:
> > > >> The floats need to stay to make sure there are no issues with this type. I see
> > > >> the tests with floats as valid.
> > > >>
> > > >> Is the only missing function `__extendsfdf2`?
> > > >
> > > > Yes, that is the only missing function. If I change the floats to doubles, the
> > > > need for `__extendsfdf2` goes away and the tests pass. Is that an acceptable
> > > > solution?
> > >
> > > I would happy with doubles being added so they are tested as well but that is
> > > also outside the scope of your effort :)
> > >
> > > Is it easier to add a Microblaze conditional for the use of a double to the base
> > > image and to forced the symbol to be linked in?
> >
> > I don't think it's too hard to add a conditional to the base image. For
> > instance, this modification to dl07 is enough to make it pass on MicroBlaze:
> >
> > diff --git a/testsuites/libtests/dl07/init.c b/testsuites/libtests/dl07/init.c
> > index 8db106ba29..7fb1500660 100644
> > --- a/testsuites/libtests/dl07/init.c
> > +++ b/testsuites/libtests/dl07/init.c
> > @@ -67,6 +67,14 @@ static void Init(rtems_task_argument arg)
> >
> >    TEST_BEGIN();
> >
> > +#ifdef __microblaze__
> > +  /* This is just here to link `__extendsfdf2` into the base image. */
> > +  {
> > +    float f = 0.3333;
> > +    printf("f: %f\n", f);
> > +  }
> > +#endif /* __microblaze__ */
> > +
> >    te = rtems_tarfs_load("/", (void *)TARFILE_START, (size_t)TARFILE_SIZE);
> >    if (te != 0)
> >    {
> >
> > Is that what you were thinking?
> >
> > Alex
> > _______________________________________________
> > devel mailing list
> > devel at rtems.org
> > http://lists.rtems.org/mailman/listinfo/devel
>
>
>
> --
> Sincerely,
>
> Sam Price



-- 
Sincerely,

Sam Price


More information about the devel mailing list