Hi!

On Thu, Nov 19, 2020 at 07:05:24PM -0500, Michael Meissner wrote:
> If the glibc is not 2.32 or later, this code just compiles to using abort.

That is the compile-time target glibc.  That is often *not* the glibc
your program runs with, as I said before.  And this is a huge problem
still.

> That way the user won't get unknown reference errors due to the calls to the
> glibc 2.32 functions that aren't in previous glibcs.

See above.

Also, tight version dependencies like this are problematic: glibc has
version dependencies on GCC already!

You should do the conversion *inside of libgcc*.  As said many times
before.

> +/* If we don't have at least GLIBC 2.32, the strtold used by dfp-bit.c does 
> not
> +   have support for float128.  Add an abort in case this is called.  */
> +#include <features.h>
> +
> +#if ((__GLIBC__ * 1000) + __GLIBC_MINOR__) < 2032
> +
> +#include <stdlib.h>
> +extern long double __dpd_extendddkf (_Decimal64);
> +
> +long double
> +__dpd_extendddkf (_Decimal64 x __attribute__ ((unused)))
> +{
> +  abort ();
> +}

Put that comment above *here*, right before the abort, so that the
victim who will have to debug this at least immediately gets to see
what is happening.


So, as on the other patch: okay for trunk, but you get to deal with all
the fallout.  If you do not want to fix the obvious problems now,
you'll get to do it later.


Segher

Reply via email to