On 11/26/24 3:42 AM, Bruno Haible wrote: > Eli Schwartz <eschwa...@gentoo.org> reported that the 'fpurge' configure test, > on musl libc, produces different results > a) with CC="gcc" > b) with CC="gcc -Werror=implicit-function-declaration" (which is used as > an approximation for strict C23 compilers, such as recent clang releases > with -std=gnu23). > > In case a): > ac_cv_func___fpurge=yes > ac_cv_func_fpurge=yes > ac_cv_have_decl_fpurge=no > gl_cv_func_fpurge_works=yes > REPLACE_FPURGE=0 > A file fpurge.o is not created. > > In case b): > ac_cv_func___fpurge=yes > ac_cv_func_fpurge=yes > ac_cv_have_decl_fpurge=no > gl_cv_func_fpurge_works=no > REPLACE_FPURGE=1 > A file fpurge.o is created, that implements rpl_fpurge through a call to > __fpurge. > > Since it looks like the fpurge function in musl libc is an unintended > left-over from earlier releases, it is better to have the outcome of b) in > both cases. > > This patch does it. > > > 2024-11-26 Bruno Haible <br...@clisp.org> > > fpurge: Improve configure test. > Reported by Eli Schwartz <eschwa...@gentoo.org>. > * m4/fpurge.m4 (gl_FUNC_FPURGE): If fpurge is not declared, don't test > whether it works. > > https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=043bfdaebae7ea885befb2710200d59f2ec4b349
Thanks for looking into this. There is one remaining concern of mine. This check hasn't changed: > [case "$host_os" in > # Guess yes on musl systems. > *-musl* | midipix*) gl_cv_func_fpurge_works="guessing yes" ;; > # Otherwise obey --enable-cross-guesses. > *) > gl_cv_func_fpurge_works="$gl_cross_guess_normal" ;; > esac As per the discussion, since we are saying case "b" is the correct probe, we want gl_cv_func_fpurge_works=no but we are "guessing yes" here. We should instead guess "no". -- Eli Schwartz
OpenPGP_signature.asc
Description: OpenPGP digital signature