diff --git a/LoongArch-binutils-compatible-with-older-gcc.diff b/LoongArch-binutils-compatible-with-older-gcc.diff new file mode 100644 index 0000000000000000000000000000000000000000..2b1dd4d754731c23492abdcfd3ea153257b31dcd --- /dev/null +++ b/LoongArch-binutils-compatible-with-older-gcc.diff @@ -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 }, diff --git a/binutils.spec b/binutils.spec index d64e1df958155b698e4f924f04709ca837ef92da..44581425499295bfb7b812fd3bb532a4f46ab9fb 100644 --- a/binutils.spec +++ b/binutils.spec @@ -1,4 +1,4 @@ -%define anolis_release 3 +%define anolis_release 4 # Determine if this is a native build or a cross build. # # For a cross build add --define "binutils_target " to the command @@ -489,6 +489,7 @@ Patch3128: Include-ldlex.h-when-compile-eelfxxloongarch.c.patch Patch3129: Modify-test-because-of-readelf-not-update.patch Patch3130: remove-file-produced-by-bison.patch Patch3131: replace-space-with-tab.patch +Patch3132: LoongArch-binutils-compatible-with-older-gcc.diff #---------------------------------------------------------------------------- @@ -1124,6 +1125,9 @@ exit 0 %doc README ChangeLog MAINTAINERS README-maintainer-mode %changelog +* Fri Nov 29 2024 Peng Fan - 2.41-4 +- LoongArch: keep compatible with older gcc. + * Thu Nov 5 2024 wangxin - 2.41-3 - LoongArch: sync patch from binutils upstream