Re: [PATCH] ldbl-opt: Fix -mlong-double-128 configure test for Clang

Matt Turner <[email protected]> Sun, 26 Jul 2026 14:43:59 -0400
Newsgroups gmane.comp.lib.glibc.alpha
Message-ID <CAEdQ38F+-Xa3WmAXs7MJ-TnUY_=4iZOBPQOrdYVYhXjdQoeB7A@mail.gmail.com>
On Sun, Jul 26, 2026 at 10:11 AM Sam James <[email protected]> wrote:
>
> Matt Turner <[email protected]> writes:
>
> > The check for -mlong-double-128 support wrapped its test code in
> > AC_LANG_PROGRAM, which places the body inside main().  The body defines
> > a function, so it became a nested function definition -- a GCC extension
> > that Clang does not implement, making the test fail (and thus the whole
> > build error out) with Clang even though it supports -mlong-double-128.
>
> Good catch!
>
> >
> > Use AC_LANG_SOURCE so the function is defined at file scope, matching the
> > pattern already used by the powerpc64le compiler checks, and regenerate
> > configure.
>
> Looks like sysdeps/unix/sysv/linux/powerpc/configure.ac has the same
> problem.

I've sent another patch for that:

Subject: [PATCH] powerpc: Fix -mlong-double-128 IBM format configure
test for Clang