On Fri, 2022-07-29 at 10:43 +0800, Lulu Cheng wrote:

> .eh_frame DW_EH_PE_pcrel encoding format is not supported by gas <= 2.39.
> Check if the assembler support DW_EH_PE_PCREL encoding and define .eh_frame
> encoding type.
> 
> gcc/ChangeLog:
> 
>         * config.in: Regenerate.
>         * config/loongarch/loongarch.h (ASM_PREFERRED_EH_DATA_FORMAT):
>         Select the value of the macro definition according to whether
>         HAVE_AS_EH_FRAME_PCREL_ENCODING_SUPPORT is defined.
>         * configure: Regenerate.
>         * configure.ac: Reinstate HAVE_AS_EH_FRAME_PCREL_ENCODING_SUPPORT 
> test.

To me it looks a little strange to list regenerated config.in &
configure before configure.ac.  But maybe I'm wrong here if a
lexicographical order is preferred...

/* snip */

> +    gcc_GAS_CHECK_FEATURE([eh_frame pcrel encoding support],
> +      gcc_cv_as_loongarch_eh_frame_pcrel_encoding_support,,
> +      [.LFB1780 = .
> +       .cfi_startproc
> +       .cfi_personality 0x9b,DW.ref.__gxx_personality_v0
> +       .cfi_lsda 0x1b,.LLSDA1780
> +       .cfi_endproc],,

I think the conftest content can be simplified to:

    .cfi_startproc
    .cfi_personality 0x9b,a
    .cfi_lsda 0x1b,b
    .cfi_endproc


> +      [AC_DEFINE(HAVE_AS_EH_FRAME_PCREL_ENCODING_SUPPORT, 1,
> +         [Define if your assembler supports eh_frame pcrel encoding.])])
>      ;;
>      s390*-*-*)
>      gcc_GAS_CHECK_FEATURE([.gnu_attribute support],

-- 
Xi Ruoyao <xry...@xry111.site>
School of Aerospace Science and Technology, Xidian University

Reply via email to