Please, take a look at this patch.
https://gcc.gnu.org/pipermail/gcc-patches/2025-January/674641.html
Ping: David Seifert, Joseph Myers

Trying to compile libcc1 plugin in native RISC-V GCC build on X86
> I bumped into the problem that gcc_cv_objdump variable
> was not defined in libcc1/configure, because it has definition
> only in gcc/configure.ac.
>
> In my case, it leads to problem that -rdynamic check is failed
> and it disables libcc1 build.
>
> I propose to use libtool inferred variable for common configs.
> ---
>  config/gcc-plugin.m4 | 6 +++++-
>  gcc/configure        | 6 +++++-
>  libcc1/configure     | 6 +++++-
>  3 files changed, 15 insertions(+), 3 deletions(-)
>
> diff --git a/config/gcc-plugin.m4 b/config/gcc-plugin.m4
> index c30cfdd8fad..5c59bdddc28 100644
> --- a/config/gcc-plugin.m4
> +++ b/config/gcc-plugin.m4
> @@ -47,7 +47,11 @@ AC_DEFUN([GCC_ENABLE_PLUGINS],
>         if test x$build = x$host; then
>          export_sym_check="$ac_cv_prog_OBJDUMP -T"
>         elif test x$host = x$target; then
> -        export_sym_check="$gcc_cv_objdump -T"
> +         if test x$gcc_cv_objdump != x; then
> +          export_sym_check="$gcc_cv_objdump -T"
> +         else
> +          export_sym_check="$ac_cv_prog_OBJDUMP -T"
> +         fi
>         else
>          export_sym_check="$ac_cv_prog_OBJDUMP -T"
>         fi
> diff --git a/gcc/configure b/gcc/configure
> index b4c52de6218..d69eb1746a6 100755
> --- a/gcc/configure
> +++ b/gcc/configure
> @@ -34106,7 +34106,11 @@ fi
>         if test x$build = x$host; then
>          export_sym_check="$ac_cv_prog_OBJDUMP -T"
>         elif test x$host = x$target; then
> -        export_sym_check="$gcc_cv_objdump -T"
> +         if test x$gcc_cv_objdump != x; then
> +          export_sym_check="$gcc_cv_objdump -T"
> +         else
> +          export_sym_check="$ac_cv_prog_OBJDUMP -T"
> +         fi
>         else
>          export_sym_check="$ac_cv_prog_OBJDUMP -T"
>         fi
> diff --git a/libcc1/configure b/libcc1/configure
> index ea689a353c8..82fc9674543 100755
> --- a/libcc1/configure
> +++ b/libcc1/configure
> @@ -15220,7 +15220,11 @@ fi
>         if test x$build = x$host; then
>          export_sym_check="$ac_cv_prog_OBJDUMP -T"
>         elif test x$host = x$target; then
> -        export_sym_check="$gcc_cv_objdump -T"
> +         if test x$gcc_cv_objdump != x; then
> +          export_sym_check="$gcc_cv_objdump -T"
> +         else
> +          export_sym_check="$ac_cv_prog_OBJDUMP -T"
> +         fi
>         else
>          export_sym_check="$ac_cv_prog_OBJDUMP -T"
>         fi
> --
> 2.43.0
>
>

Reply via email to