!325 LoongArch: keep compatible with older gcc

From: @oil-house 
Reviewed-by: @eastb233 
Signed-off-by: @eastb233
This commit is contained in:
openeuler-ci-bot 2025-01-14 03:16:48 +00:00 committed by Gitee
commit 3afe41a53c
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 31 additions and 1 deletions

View File

@ -0,0 +1,26 @@
diff --git a/gas/config/tc-loongarch.c b/gas/config/tc-loongarch.c
index 7fa7fa0f..16f688d6 100644
--- a/gas/config/tc-loongarch.c
+++ b/gas/config/tc-loongarch.c
@@ -599,8 +599,21 @@ s_loongarch_option (int x ATTRIBUTE_UNUSED)
demand_empty_rest_of_line ();
}
+static void
+s_loongarch_align (int arg)
+{
+ const char *t = input_line_pointer;
+ while (!is_end_of_line[(unsigned char) *t] && *t != ',')
+ ++t;
+ if (*t == ',')
+ s_align_ptwo (arg);
+ else
+ s_align_ptwo (0);
+}
+
static const pseudo_typeS loongarch_pseudo_table[] =
{
+ { "align", s_loongarch_align, -4 },
{ "dword", cons, 8 },
{ "word", cons, 4 },
{ "half", cons, 2 },

View File

@ -2,7 +2,7 @@
Summary: A GNU collection of binary utilities
Name: binutils%{?_with_debug:-debug}
Version: 2.41
Release: 12
Release: 13
License: GPL-3.0-or-later AND (GPL-3.0-or-later WITH Bison-exception-2.2) AND (LGPL-2.0-or-later WITH GCC-exception-2.0) AND BSD-3-Clause AND GFDL-1.3-or-later AND GPL-2.0-or-later AND LGPL-2.1-or-later AND LGPL-2.0-or-later
URL: https://sourceware.org/binutils
@ -299,6 +299,7 @@ Patch3130: Include-ldlex.h-when-compile-eelfxxloongarch.c.patch
Patch3131: Modify-test-because-of-readelf-not-update.patch
Patch3132: remove-file-produced-by-bison.patch
Patch3133: replace-space-with-tab.patch
Patch3134: LoongArch-binutils-compatible-with-older-gcc.patch
# Part 5000 -
@ -1370,6 +1371,9 @@ exit 0
#----------------------------------------------------------------------------
%changelog
* Tue Dec 17 2024 wangxin <wangxin03@loongson.cn> - 2.41-13
- LoongArch: keep compatible with older gcc
* Fri Nov 22 2024 swcompiler <lc@wxiat.com> - 2.41-12
- Sw64 add sw64 ISA support