bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fpurge: Improve configure test


From: Eli Schwartz
Subject: Re: fpurge: Improve configure test
Date: Tue, 26 Nov 2024 23:37:58 -0500
User-agent: Mozilla Thunderbird

On 11/26/24 3:42 AM, Bruno Haible wrote:
> Eli Schwartz <eschwartz@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  <bruno@clisp.org>
> 
>       fpurge: Improve configure test.
>       Reported by Eli Schwartz <eschwartz@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

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]