[PATCH v4 11/12] configure: Remove for redirection of built-in functions
Adhemerval Zanella Netto
adhemerval.zanella@linaro.org
Wed Nov 12 18:48:32 GMT 2025
On 10/11/25 22:53, H.J. Lu wrote:
> On Mon, Nov 10, 2025 at 9:32 PM Adhemerval Zanella
> <adhemerval.zanella@linaro.org> wrote:
>>
>> The check was initially used to define HAVE_BUILTIN_REDIRECTION, which
>> enables or not libc_hidden_builtin_proto support. I was later removed
>
> It was later removed
Ack.
>> with 3ce1f2959437e952b9db4eaeed2407424f11a4d1, making the feature
>> mandatory. The configure check was kept as a transition knob.
>>
>> Current minimum gcc/linker always supports this, as well as clang with
>> some extra care. Also, missing hidden_proto/hidden_def support is
>> already flagged in the check-localplt test.
>> ---
>> configure | 33 ---------------------------------
>> configure.ac | 20 --------------------
>> 2 files changed, 53 deletions(-)
>>
>> diff --git a/configure b/configure
>> index cd825395791..e490bb95f54 100755
>> --- a/configure
>> +++ b/configure
>> @@ -7674,39 +7674,6 @@ else
>>
>> fi
>>
>> -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for redirection of built-in functions" >&5
>> -printf %s "checking for redirection of built-in functions... " >&6; }
>> -if test ${libc_cv_gcc_builtin_redirection+y}
>> -then :
>> - printf %s "(cached) " >&6
>> -else case e in #(
>> - e) cat > conftest.c <<\EOF
>> -extern char *strstr (const char *, const char *) __asm ("my_strstr");
>> -char *foo (const char *a, const char *b)
>> -{
>> - return __builtin_strstr (a, b);
>> -}
>> -EOF
>> -if { ac_try='${CC-cc} -O3 -S conftest.c -o - | grep -F "my_strstr" > /dev/null'
>> - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
>> - (eval $ac_try) 2>&5
>> - ac_status=$?
>> - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
>> - test $ac_status = 0; }; };
>> -then
>> - libc_cv_gcc_builtin_redirection=yes
>> -else
>> - libc_cv_gcc_builtin_redirection=no
>> -fi
>> -rm -f conftest* ;;
>> -esac
>> -fi
>> -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_gcc_builtin_redirection" >&5
>> -printf "%s\n" "$libc_cv_gcc_builtin_redirection" >&6; }
>> -if test "$libc_cv_gcc_builtin_redirection" = no; then
>> - as_fn_error $? "support for the symbol redirection needed" "$LINENO" 5
>> -fi
>> -
>> { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compiler option to disable generation of FMA instructions" >&5
>> printf %s "checking for compiler option to disable generation of FMA instructions... " >&6; }
>> if test ${libc_cv_cc_nofma+y}
>> diff --git a/configure.ac b/configure.ac
>> index 46b33fd9f49..c9939a6db2a 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -1496,26 +1496,6 @@ else
>> AC_DEFINE(__HAVE_64B_ATOMICS, 0)
>> fi
>>
>> -AC_CACHE_CHECK(for redirection of built-in functions, libc_cv_gcc_builtin_redirection, [dnl
>> -cat > conftest.c <<\EOF
>> -extern char *strstr (const char *, const char *) __asm ("my_strstr");
>> -char *foo (const char *a, const char *b)
>> -{
>> - return __builtin_strstr (a, b);
>> -}
>> -EOF
>> -dnl
>> -if AC_TRY_COMMAND([${CC-cc} -O3 -S conftest.c -o - | grep -F "my_strstr" > /dev/null]);
>> -then
>> - libc_cv_gcc_builtin_redirection=yes
>> -else
>> - libc_cv_gcc_builtin_redirection=no
>> -fi
>> -rm -f conftest* ])
>> -if test "$libc_cv_gcc_builtin_redirection" = no; then
>> - AC_MSG_ERROR([support for the symbol redirection needed])
>> -fi
>> -
>> dnl Determine how to disable generation of FMA instructions.
>> AC_CACHE_CHECK([for compiler option to disable generation of FMA instructions],
>> libc_cv_cc_nofma, [dnl
>> --
>> 2.43.0
>>
>
> LGTM with the commit log change.
>
> Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
>
> Thanks.
>
More information about the Libc-alpha
mailing list