On Tue, 2025-06-10 at 16:55 +0800, mengqinggang wrote:
> LA32 does not support extreme code mode, change to normal code model.
> Some libgcc/configure changes cause by 9e46fd072bc90ba6f7af commit.
> ---
>  libgcc/config/loongarch/t-crtstuff-la32       |  5 +++++
>  .../loongarch/{t-crtstuff => t-crtstuff-la64} |  0
>  libgcc/configure                              | 22 ++++++++++++++-----
>  libgcc/configure.ac                           | 12 ++++++++++
>  4 files changed, 34 insertions(+), 5 deletions(-)
>  create mode 100644 libgcc/config/loongarch/t-crtstuff-la32
>  rename libgcc/config/loongarch/{t-crtstuff => t-crtstuff-la64} (100%)
> 
> diff --git a/libgcc/config/loongarch/t-crtstuff-la32 
> b/libgcc/config/loongarch/t-crtstuff-la32
> new file mode 100644
> index 00000000000..b8c36eb66b7
> --- /dev/null
> +++ b/libgcc/config/loongarch/t-crtstuff-la32
> @@ -0,0 +1,5 @@
> +# -fasynchronous-unwind-tables is on by default for LoongArch.
> +# We turn it off for crt*.o because it would make __EH_FRAME_BEGIN__ point
> +# to .eh_frame data from crtbeginT.o instead of the user-defined object
> +# during static linking.
> +CRTSTUFF_T_CFLAGS += -fno-omit-frame-pointer -fno-asynchronous-unwind-tables
> diff --git a/libgcc/config/loongarch/t-crtstuff 
> b/libgcc/config/loongarch/t-crtstuff-la64
> similarity index 100%
> rename from libgcc/config/loongarch/t-crtstuff
> rename to libgcc/config/loongarch/t-crtstuff-la64
> diff --git a/libgcc/configure b/libgcc/configure
> index 18418336c9b..e2cfcb134a1 100755
> --- a/libgcc/configure
> +++ b/libgcc/configure
> @@ -4217,7 +4217,7 @@ else
>      We can't simply define LARGE_OFF_T to be 9223372036854775807,
>      since some C++ compilers masquerading as C compilers
>      incorrectly reject 9223372036854775807.  */
> -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
> +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 
> 31))

IIRC this change is caused by a downstream autoconf patch used by some
distro.  Thus we need to regenerate the configure script with the
vanilla autoconf-2.69 to avoid the unrelated change.

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

Reply via email to