diff --git a/0001-LoongArch-Optimize-the-loading-of-immediate-numbers-.patch b/0001-LoongArch-Optimize-the-loading-of-immediate-numbers-.patch deleted file mode 100644 index 0addd090fa3a6490a8ad02f065602132af5a4b0a..0000000000000000000000000000000000000000 --- a/0001-LoongArch-Optimize-the-loading-of-immediate-numbers-.patch +++ /dev/null @@ -1,112 +0,0 @@ -From 8c4083b2726b01119414c04bfc1c7f3f6c90001c Mon Sep 17 00:00:00 2001 -From: Guo Jie -Date: Thu, 23 Nov 2023 11:04:17 +0800 -Subject: [PATCH 1/2] LoongArch: Optimize the loading of immediate numbers with - the same high and low 32-bit values - -For the following immediate load operation in gcc/testsuite/gcc.target/loongarch/imm-load1.c: - - long long r = 0x0101010101010101; - -Before this patch: - - lu12i.w $r15,16842752>>12 - ori $r15,$r15,257 - lu32i.d $r15,0x1010100000000>>32 - lu52i.d $r15,$r15,0x100000000000000>>52 - -After this patch: - - lu12i.w $r15,16842752>>12 - ori $r15,$r15,257 - bstrins.d $r15,$r15,63,32 - -gcc/ChangeLog: - - * config/loongarch/loongarch.cc - (enum loongarch_load_imm_method): Add new method. - (loongarch_build_integer): Add relevant implementations for - new method. - (loongarch_move_integer): Ditto. - -gcc/testsuite/ChangeLog: - - * gcc.target/loongarch/imm-load1.c: Change old check. ---- - gcc/config/loongarch/loongarch.cc | 22 ++++++++++++++++++- - .../gcc.target/loongarch/imm-load1.c | 3 ++- - 2 files changed, 23 insertions(+), 2 deletions(-) - -diff --git a/gcc/config/loongarch/loongarch.cc b/gcc/config/loongarch/loongarch.cc -index f2e796a6b0f..7a8d5665c78 100644 ---- a/gcc/config/loongarch/loongarch.cc -+++ b/gcc/config/loongarch/loongarch.cc -@@ -140,12 +140,16 @@ struct loongarch_address_info - - METHOD_LU52I: - Load 52-63 bit of the immediate number. -+ -+ METHOD_MIRROR: -+ Copy 0-31 bit of the immediate number to 32-63bit. - */ - enum loongarch_load_imm_method - { - METHOD_NORMAL, - METHOD_LU32I, -- METHOD_LU52I -+ METHOD_LU52I, -+ METHOD_MIRROR - }; - - struct loongarch_integer_op -@@ -1551,11 +1555,23 @@ loongarch_build_integer (struct loongarch_integer_op *codes, - - int sign31 = (value & (HOST_WIDE_INT_1U << 31)) >> 31; - int sign51 = (value & (HOST_WIDE_INT_1U << 51)) >> 51; -+ -+ uint32_t hival = (uint32_t) (value >> 32); -+ uint32_t loval = (uint32_t) value; -+ - /* Determine whether the upper 32 bits are sign-extended from the lower - 32 bits. If it is, the instructions to load the high order can be - ommitted. */ - if (lu32i[sign31] && lu52i[sign31]) - return cost; -+ /* If the lower 32 bits are the same as the upper 32 bits, just copy -+ the lower 32 bits to the upper 32 bits. */ -+ else if (loval == hival) -+ { -+ codes[cost].method = METHOD_MIRROR; -+ codes[cost].curr_value = value; -+ return cost + 1; -+ } - /* Determine whether bits 32-51 are sign-extended from the lower 32 - bits. If so, directly load 52-63 bits. */ - else if (lu32i[sign31]) -@@ -3193,6 +3209,10 @@ loongarch_move_integer (rtx temp, rtx dest, unsigned HOST_WIDE_INT value) - gen_rtx_AND (DImode, x, GEN_INT (0xfffffffffffff)), - GEN_INT (codes[i].value)); - break; -+ case METHOD_MIRROR: -+ gcc_assert (mode == DImode); -+ emit_insn (gen_insvdi (x, GEN_INT (32), GEN_INT (32), x)); -+ break; - default: - gcc_unreachable (); - } -diff --git a/gcc/testsuite/gcc.target/loongarch/imm-load1.c b/gcc/testsuite/gcc.target/loongarch/imm-load1.c -index 2ff02971239..f64cc2956a3 100644 ---- a/gcc/testsuite/gcc.target/loongarch/imm-load1.c -+++ b/gcc/testsuite/gcc.target/loongarch/imm-load1.c -@@ -1,6 +1,7 @@ - /* { dg-do compile } */ - /* { dg-options "-mabi=lp64d -O2" } */ --/* { dg-final { scan-assembler "test:.*lu52i\.d.*\n\taddi\.w.*\n\.L2:" } } */ -+/* { dg-final { scan-assembler-not "test:.*lu52i\.d.*\n\taddi\.w.*\n\.L2:" } } */ -+/* { dg-final { scan-assembler "test:.*lu12i\.w.*\n\tbstrins\.d.*\n\.L2:" } } */ - - - extern long long b[10]; --- -2.33.0 - diff --git a/0002-LoongArch-Fixed-bug-in-bstrins_-mode-_for_ior_mask-t.patch b/0002-LoongArch-Fixed-bug-in-bstrins_-mode-_for_ior_mask-t.patch deleted file mode 100644 index c901811b498a09b4c2178f222204819b4ae34b43..0000000000000000000000000000000000000000 --- a/0002-LoongArch-Fixed-bug-in-bstrins_-mode-_for_ior_mask-t.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 6a487dd4e37a1738df5103bd06a2c69dd154d553 Mon Sep 17 00:00:00 2001 -From: Li Wei -Date: Mon, 25 Dec 2023 11:20:23 +0800 -Subject: [PATCH 2/2] LoongArch: Fixed bug in *bstrins__for_ior_mask - template. - -We found that using the latest compiled gcc will cause a miscompare error -when running spec2006 400.perlbench test with -flto turned on. After testing, -it was found that only the LoongArch architecture will report errors. -The first error commit was located through the git bisect command as -r14-3773-g5b857e87201335. Through debugging, it was found that the problem -was that the split condition of the *bstrins__for_ior_mask template was -empty, which should actually be consistent with the insn condition. - -gcc/ChangeLog: - - * config/loongarch/loongarch.md: Adjust. ---- - gcc/config/loongarch/loongarch.md | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/gcc/config/loongarch/loongarch.md b/gcc/config/loongarch/loongarch.md -index 63ff32e7569..3b2c57ef99a 100644 ---- a/gcc/config/loongarch/loongarch.md -+++ b/gcc/config/loongarch/loongarch.md -@@ -1377,7 +1377,7 @@ - "loongarch_pre_reload_split () && \ - loongarch_use_bstrins_for_ior_with_mask (mode, operands)" - "#" -- "" -+ "&& true" - [(set (match_dup 0) (match_dup 1)) - (set (zero_extract:GPR (match_dup 0) (match_dup 2) (match_dup 4)) - (match_dup 3))] --- -2.33.0 - diff --git a/Fix-indentation-and-numbering-errors.diff b/Fix-indentation-and-numbering-errors.diff new file mode 100644 index 0000000000000000000000000000000000000000..261d622858a9384c795b890efd09e03ae06df8ce --- /dev/null +++ b/Fix-indentation-and-numbering-errors.diff @@ -0,0 +1,205 @@ +diff --git a/libphobos/libdruntime/Makefile.in b/libphobos/libdruntime/Makefile.in +index 91cd653623b..b686f5eb492 100644 +--- a/libphobos/libdruntime/Makefile.in ++++ b/libphobos/libdruntime/Makefile.in +@@ -124,13 +124,13 @@ target_triplet = @target@ + # CPU specific sources + @DRUNTIME_CPU_AARCH64_TRUE@am__append_11 = config/aarch64/switchcontext.S + @DRUNTIME_CPU_ARM_TRUE@am__append_12 = config/arm/switchcontext.S +-@DRUNTIME_CPU_LOONGARCH_TRUE@am__append_13 = config/loongarch/switchcontext.S +-@DRUNTIME_CPU_MIPS_TRUE@am__append_14 = config/mips/switchcontext.S +-@DRUNTIME_CPU_POWERPC_TRUE@am__append_15 = config/powerpc/switchcontext.S +-@DRUNTIME_CPU_X86_TRUE@@DRUNTIME_OS_MINGW_TRUE@am__append_16 = config/mingw/switchcontext.S +-@DRUNTIME_CPU_X86_TRUE@@DRUNTIME_OS_MINGW_FALSE@am__append_17 = config/x86/switchcontext.S +-@DRUNTIME_CPU_SYSTEMZ_TRUE@am__append_18 = config/systemz/get_tls_offset.S +-@DRUNTIME_CPU_S390_TRUE@am__append_19 = config/s390/get_tls_offset.S ++@DRUNTIME_CPU_MIPS_TRUE@am__append_13 = config/mips/switchcontext.S ++@DRUNTIME_CPU_POWERPC_TRUE@am__append_14 = config/powerpc/switchcontext.S ++@DRUNTIME_CPU_X86_TRUE@@DRUNTIME_OS_MINGW_TRUE@am__append_15 = config/mingw/switchcontext.S ++@DRUNTIME_CPU_X86_TRUE@@DRUNTIME_OS_MINGW_FALSE@am__append_16 = config/x86/switchcontext.S ++@DRUNTIME_CPU_SYSTEMZ_TRUE@am__append_17 = config/systemz/get_tls_offset.S ++@DRUNTIME_CPU_S390_TRUE@am__append_18 = config/s390/get_tls_offset.S ++@DRUNTIME_CPU_LOONGARCH_TRUE@am__append_19 = config/loongarch/switchcontext.S + subdir = libdruntime + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ +@@ -475,14 +475,14 @@ am__objects_22 = core/sys/solaris/dlfcn.lo core/sys/solaris/elf.lo \ + @DRUNTIME_OS_SOLARIS_TRUE@am__objects_23 = $(am__objects_22) + @DRUNTIME_CPU_AARCH64_TRUE@am__objects_24 = config/aarch64/libgdruntime_la-switchcontext.lo + @DRUNTIME_CPU_ARM_TRUE@am__objects_25 = config/arm/libgdruntime_la-switchcontext.lo +-@DRUNTIME_CPU_LOONGARCH_TRUE@am__objects_26 = config/loongarch/libgdruntime_la-switchcontext.lo +-@DRUNTIME_CPU_MIPS_TRUE@am__objects_27 = config/mips/libgdruntime_la-switchcontext.lo +-@DRUNTIME_CPU_POWERPC_TRUE@am__objects_28 = config/powerpc/libgdruntime_la-switchcontext.lo +-@DRUNTIME_CPU_X86_TRUE@@DRUNTIME_OS_MINGW_TRUE@am__objects_29 = config/mingw/libgdruntime_la-switchcontext.lo +-@DRUNTIME_CPU_X86_TRUE@@DRUNTIME_OS_MINGW_FALSE@am__objects_30 = config/x86/libgdruntime_la-switchcontext.lo +-@DRUNTIME_CPU_SYSTEMZ_TRUE@am__objects_31 = config/systemz/libgdruntime_la-get_tls_offset.lo +-@DRUNTIME_CPU_S390_TRUE@am__objects_32 = config/s390/libgdruntime_la-get_tls_offset.lo +-am__objects_33 = $(am__objects_6) $(am__objects_8) $(am__objects_10) \ ++@DRUNTIME_CPU_MIPS_TRUE@am__objects_26 = config/mips/libgdruntime_la-switchcontext.lo ++@DRUNTIME_CPU_POWERPC_TRUE@am__objects_27 = config/powerpc/libgdruntime_la-switchcontext.lo ++@DRUNTIME_CPU_X86_TRUE@@DRUNTIME_OS_MINGW_TRUE@am__objects_28 = config/mingw/libgdruntime_la-switchcontext.lo ++@DRUNTIME_CPU_X86_TRUE@@DRUNTIME_OS_MINGW_FALSE@am__objects_29 = config/x86/libgdruntime_la-switchcontext.lo ++@DRUNTIME_CPU_SYSTEMZ_TRUE@am__objects_30 = config/systemz/libgdruntime_la-get_tls_offset.lo ++@DRUNTIME_CPU_S390_TRUE@am__objects_31 = config/s390/libgdruntime_la-get_tls_offset.lo ++@DRUNTIME_CPU_LOONGARCH_TRUE@am__objects_32 = config/loongarch/libgdruntime_la-switchcontext.lo ++am__objects_33 = $(am__objects_5) $(am__objects_7) $(am__objects_9) \ + $(am__objects_11) $(am__objects_13) $(am__objects_15) \ + $(am__objects_17) $(am__objects_19) $(am__objects_21) \ + $(am__objects_23) $(am__objects_24) $(am__objects_25) \ +@@ -500,22 +500,22 @@ am__objects_36 = core/stdc/libgdruntime_convenience_la-errno_.lo + @DRUNTIME_OS_MINGW_TRUE@ config/mingw/libgdruntime_convenience_la-msvc.lo + @DRUNTIME_CPU_AARCH64_TRUE@am__objects_38 = config/aarch64/libgdruntime_convenience_la-switchcontext.lo + @DRUNTIME_CPU_ARM_TRUE@am__objects_39 = config/arm/libgdruntime_convenience_la-switchcontext.lo +-@DRUNTIME_CPU_LOONGARCH_TRUE@am__objects_40 = config/loongarch/libgdruntime_convenience_la-switchcontext.lo +-@DRUNTIME_CPU_MIPS_TRUE@am__objects_41 = config/mips/libgdruntime_convenience_la-switchcontext.lo +-@DRUNTIME_CPU_POWERPC_TRUE@am__objects_42 = config/powerpc/libgdruntime_convenience_la-switchcontext.lo +-@DRUNTIME_CPU_X86_TRUE@@DRUNTIME_OS_MINGW_TRUE@am__objects_43 = config/mingw/libgdruntime_convenience_la-switchcontext.lo +-@DRUNTIME_CPU_X86_TRUE@@DRUNTIME_OS_MINGW_FALSE@am__objects_44 = config/x86/libgdruntime_convenience_la-switchcontext.lo +-@DRUNTIME_CPU_SYSTEMZ_TRUE@am__objects_45 = config/systemz/libgdruntime_convenience_la-get_tls_offset.lo +-@DRUNTIME_CPU_S390_TRUE@am__objects_46 = config/s390/libgdruntime_convenience_la-get_tls_offset.lo ++@DRUNTIME_CPU_MIPS_TRUE@am__objects_40 = config/mips/libgdruntime_convenience_la-switchcontext.lo ++@DRUNTIME_CPU_POWERPC_TRUE@am__objects_41 = config/powerpc/libgdruntime_convenience_la-switchcontext.lo ++@DRUNTIME_CPU_X86_TRUE@@DRUNTIME_OS_MINGW_TRUE@am__objects_42 = config/mingw/libgdruntime_convenience_la-switchcontext.lo ++@DRUNTIME_CPU_X86_TRUE@@DRUNTIME_OS_MINGW_FALSE@am__objects_43 = config/x86/libgdruntime_convenience_la-switchcontext.lo ++@DRUNTIME_CPU_SYSTEMZ_TRUE@am__objects_44 = config/systemz/libgdruntime_convenience_la-get_tls_offset.lo ++@DRUNTIME_CPU_S390_TRUE@am__objects_45 = config/s390/libgdruntime_convenience_la-get_tls_offset.lo ++@DRUNTIME_CPU_LOONGARCH_TRUE@am__objects_46 = config/loongarch/libgdruntime_convenience_la-switchcontext.lo + am__objects_47 = $(am__objects_5) $(am__objects_7) $(am__objects_9) \ + $(am__objects_11) $(am__objects_13) $(am__objects_15) \ +- $(am__objects_17) $(am__objects_19) $(am__objects_36) \ +- $(am__objects_23) $(am__objects_37) $(am__objects_38) \ +- $(am__objects_39) $(am__objects_40) $(am__objects_41) \ +- $(am__objects_42) $(am__objects_43) $(am__objects_44) \ +- $(am__objects_45) $(am__objects_46) +-am__objects_48 = $(am__objects_1) $(am__objects_35) $(am__objects_3) \ +- $(am__objects_47) $(am__objects_33) ++ $(am__objects_17) $(am__objects_19) $(am__objects_37) \ ++ $(am__objects_23) $(am__objects_38) $(am__objects_39) \ ++ $(am__objects_40) $(am__objects_41) $(am__objects_42) \ ++ $(am__objects_43) $(am__objects_44) $(am__objects_45) \ ++ $(am__objects_46) ++am__objects_48 = $(am__objects_1) $(am__objects_36) $(am__objects_3) \ ++ $(am__objects_47) $(am__objects_34) + am__objects_49 = $(am__objects_48) + am_libgdruntime_convenience_la_OBJECTS = $(am__objects_49) + libgdruntime_convenience_la_OBJECTS = \ +@@ -1905,11 +1905,6 @@ config/arm/$(am__dirstamp): + @: > config/arm/$(am__dirstamp) + config/arm/libgdruntime_la-switchcontext.lo: \ + config/arm/$(am__dirstamp) +-config/loongarch/$(am__dirstamp): +- @$(MKDIR_P) config/loongarch +- @: > config/loongarch/$(am__dirstamp) +-config/loongarch/libgdruntime_la-switchcontext.lo: \ +- config/loongarch/$(am__dirstamp) + config/mips/$(am__dirstamp): + @$(MKDIR_P) config/mips + @: > config/mips/$(am__dirstamp) +@@ -1937,6 +1932,11 @@ config/s390/$(am__dirstamp): + @: > config/s390/$(am__dirstamp) + config/s390/libgdruntime_la-get_tls_offset.lo: \ + config/s390/$(am__dirstamp) ++config/loongarch/$(am__dirstamp): ++ @$(MKDIR_P) config/loongarch ++ @: > config/loongarch/$(am__dirstamp) ++config/loongarch/libgdruntime_la-switchcontext.lo: \ ++ config/loongarch/$(am__dirstamp) + gcc/config.lo: gcc/$(am__dirstamp) + gcc/libbacktrace.lo: gcc/$(am__dirstamp) + +@@ -1950,8 +1950,6 @@ config/aarch64/libgdruntime_convenience_la-switchcontext.lo: \ + config/aarch64/$(am__dirstamp) + config/arm/libgdruntime_convenience_la-switchcontext.lo: \ + config/arm/$(am__dirstamp) +-config/loongarch/libgdruntime_convenience_la-switchcontext.lo: \ +- config/loongarch/$(am__dirstamp) + config/mips/libgdruntime_convenience_la-switchcontext.lo: \ + config/mips/$(am__dirstamp) + config/powerpc/libgdruntime_convenience_la-switchcontext.lo: \ +@@ -1964,6 +1962,8 @@ config/systemz/libgdruntime_convenience_la-get_tls_offset.lo: \ + config/systemz/$(am__dirstamp) + config/s390/libgdruntime_convenience_la-get_tls_offset.lo: \ + config/s390/$(am__dirstamp) ++config/loongarch/libgdruntime_convenience_la-switchcontext.lo: \ ++ config/loongarch/$(am__dirstamp) + + libgdruntime_convenience.la: $(libgdruntime_convenience_la_OBJECTS) $(libgdruntime_convenience_la_DEPENDENCIES) $(EXTRA_libgdruntime_convenience_la_DEPENDENCIES) + $(AM_V_GEN)$(libgdruntime_convenience_la_LINK) $(libgdruntime_convenience_la_OBJECTS) $(libgdruntime_convenience_la_LIBADD) $(LIBS) +@@ -1976,14 +1976,14 @@ mostlyclean-compile: + -rm -f config/arm/*.lo + -rm -f config/mingw/*.$(OBJEXT) + -rm -f config/mingw/*.lo +- -rm -f config/loongarch/*.$(OBJEXT) +- -rm -f config/loongarch/*.lo + -rm -f config/mips/*.$(OBJEXT) + -rm -f config/mips/*.lo + -rm -f config/powerpc/*.$(OBJEXT) + -rm -f config/powerpc/*.lo + -rm -f config/s390/*.$(OBJEXT) + -rm -f config/s390/*.lo ++ -rm -f config/loongarch/*.$(OBJEXT) ++ -rm -f config/loongarch/*.lo + -rm -f config/systemz/*.$(OBJEXT) + -rm -f config/systemz/*.lo + -rm -f config/x86/*.$(OBJEXT) +@@ -2101,10 +2101,7 @@ config/aarch64/libgdruntime_la-switchcontext.lo: config/aarch64/switchcontext.S + config/arm/libgdruntime_la-switchcontext.lo: config/arm/switchcontext.S + $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) $(libgdruntime_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o config/arm/libgdruntime_la-switchcontext.lo `test -f 'config/arm/switchcontext.S' || echo '$(srcdir)/'`config/arm/switchcontext.S + +-config/loongarch/libgdruntime_la-switchcontext.lo: config/loongarch/switchcontext.S +- $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) $(libgdruntime_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) +- +-onfig/mips/libgdruntime_la-switchcontext.lo: config/mips/switchcontext.S ++config/mips/libgdruntime_la-switchcontext.lo: config/mips/switchcontext.S + $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) $(libgdruntime_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o config/mips/libgdruntime_la-switchcontext.lo `test -f 'config/mips/switchcontext.S' || echo '$(srcdir)/'`config/mips/switchcontext.S + + config/powerpc/libgdruntime_la-switchcontext.lo: config/powerpc/switchcontext.S +@@ -2122,18 +2119,21 @@ config/systemz/libgdruntime_la-get_tls_offset.lo: config/systemz/get_tls_offset. + config/s390/libgdruntime_la-get_tls_offset.lo: config/s390/get_tls_offset.S + $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) $(libgdruntime_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o config/s390/libgdruntime_la-get_tls_offset.lo `test -f 'config/s390/get_tls_offset.S' || echo '$(srcdir)/'`config/s390/get_tls_offset.S + ++config/loongarch/libgdruntime_la-switchcontext.lo: config/loongarch/switchcontext.S ++ $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) $(libgdruntime_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o config/loongarch/libgdruntime_la-switchcontext.lo `test -f 'config/loongarch/switchcontext.S' || echo '$(srcdir)/'`config/loongarch/switchcontext.S ++ + config/aarch64/libgdruntime_convenience_la-switchcontext.lo: config/aarch64/switchcontext.S + $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) $(libgdruntime_convenience_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o config/aarch64/libgdruntime_convenience_la-switchcontext.lo `test -f 'config/aarch64/switchcontext.S' || echo '$(srcdir)/'`config/aarch64/switchcontext.S + + config/arm/libgdruntime_convenience_la-switchcontext.lo: config/arm/switchcontext.S + $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) $(libgdruntime_convenience_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o config/arm/libgdruntime_convenience_la-switchcontext.lo `test -f 'config/arm/switchcontext.S' || echo '$(srcdir)/'`config/arm/switchcontext.S + +-config/loongarch/libgdruntime_convenience_la-switchcontext.lo: config/loongarch/switchcontext.S +- $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) $(libgdruntime_convenience_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM +- + config/mips/libgdruntime_convenience_la-switchcontext.lo: config/mips/switchcontext.S + $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) $(libgdruntime_convenience_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o config/mips/libgdruntime_convenience_la-switchcontext.lo `test -f 'config/mips/switchcontext.S' || echo '$(srcdir)/'`config/mips/switchcontext.S + ++config/loongarch/libgdruntime_convenience_la-switchcontext.lo: config/loongarch/switchcontext.S ++ $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) $(libgdruntime_convenience_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o config/loongarch/libgdruntime_convenience_la-switchcontext.lo `test -f 'config/loongarch/switchcontext.S' || echo '$(srcdir)/'`config/loongarch/switchcontext.S ++ + config/powerpc/libgdruntime_convenience_la-switchcontext.lo: config/powerpc/switchcontext.S + $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) $(libgdruntime_convenience_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o config/powerpc/libgdruntime_convenience_la-switchcontext.lo `test -f 'config/powerpc/switchcontext.S' || echo '$(srcdir)/'`config/powerpc/switchcontext.S + +@@ -2178,10 +2178,10 @@ clean-libtool: + -rm -rf config/aarch64/.libs config/aarch64/_libs + -rm -rf config/arm/.libs config/arm/_libs + -rm -rf config/mingw/.libs config/mingw/_libs +- -rm -rf config/loongarch/.libs config/loongarch/_libs + -rm -rf config/mips/.libs config/mips/_libs + -rm -rf config/powerpc/.libs config/powerpc/_libs + -rm -rf config/s390/.libs config/s390/_libs ++ -rm -rf config/loongarch/.libs config/loongarch/_libs + -rm -rf config/systemz/.libs config/systemz/_libs + -rm -rf config/x86/.libs config/x86/_libs + -rm -rf core/.libs core/_libs +@@ -2340,10 +2340,10 @@ distclean-generic: + -rm -f config/aarch64/$(am__dirstamp) + -rm -f config/arm/$(am__dirstamp) + -rm -f config/mingw/$(am__dirstamp) +- -rm -f config/loongarch/$(am__dirstamp) + -rm -f config/mips/$(am__dirstamp) + -rm -f config/powerpc/$(am__dirstamp) + -rm -f config/s390/$(am__dirstamp) ++ -rm -f config/loongarch/$(am__dirstamp) + -rm -f config/systemz/$(am__dirstamp) + -rm -f config/x86/$(am__dirstamp) + -rm -f core/$(am__dirstamp) diff --git a/Fix-indentation-and-numbering-errors.patch b/Fix-indentation-and-numbering-errors.patch new file mode 100644 index 0000000000000000000000000000000000000000..261d622858a9384c795b890efd09e03ae06df8ce --- /dev/null +++ b/Fix-indentation-and-numbering-errors.patch @@ -0,0 +1,205 @@ +diff --git a/libphobos/libdruntime/Makefile.in b/libphobos/libdruntime/Makefile.in +index 91cd653623b..b686f5eb492 100644 +--- a/libphobos/libdruntime/Makefile.in ++++ b/libphobos/libdruntime/Makefile.in +@@ -124,13 +124,13 @@ target_triplet = @target@ + # CPU specific sources + @DRUNTIME_CPU_AARCH64_TRUE@am__append_11 = config/aarch64/switchcontext.S + @DRUNTIME_CPU_ARM_TRUE@am__append_12 = config/arm/switchcontext.S +-@DRUNTIME_CPU_LOONGARCH_TRUE@am__append_13 = config/loongarch/switchcontext.S +-@DRUNTIME_CPU_MIPS_TRUE@am__append_14 = config/mips/switchcontext.S +-@DRUNTIME_CPU_POWERPC_TRUE@am__append_15 = config/powerpc/switchcontext.S +-@DRUNTIME_CPU_X86_TRUE@@DRUNTIME_OS_MINGW_TRUE@am__append_16 = config/mingw/switchcontext.S +-@DRUNTIME_CPU_X86_TRUE@@DRUNTIME_OS_MINGW_FALSE@am__append_17 = config/x86/switchcontext.S +-@DRUNTIME_CPU_SYSTEMZ_TRUE@am__append_18 = config/systemz/get_tls_offset.S +-@DRUNTIME_CPU_S390_TRUE@am__append_19 = config/s390/get_tls_offset.S ++@DRUNTIME_CPU_MIPS_TRUE@am__append_13 = config/mips/switchcontext.S ++@DRUNTIME_CPU_POWERPC_TRUE@am__append_14 = config/powerpc/switchcontext.S ++@DRUNTIME_CPU_X86_TRUE@@DRUNTIME_OS_MINGW_TRUE@am__append_15 = config/mingw/switchcontext.S ++@DRUNTIME_CPU_X86_TRUE@@DRUNTIME_OS_MINGW_FALSE@am__append_16 = config/x86/switchcontext.S ++@DRUNTIME_CPU_SYSTEMZ_TRUE@am__append_17 = config/systemz/get_tls_offset.S ++@DRUNTIME_CPU_S390_TRUE@am__append_18 = config/s390/get_tls_offset.S ++@DRUNTIME_CPU_LOONGARCH_TRUE@am__append_19 = config/loongarch/switchcontext.S + subdir = libdruntime + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ +@@ -475,14 +475,14 @@ am__objects_22 = core/sys/solaris/dlfcn.lo core/sys/solaris/elf.lo \ + @DRUNTIME_OS_SOLARIS_TRUE@am__objects_23 = $(am__objects_22) + @DRUNTIME_CPU_AARCH64_TRUE@am__objects_24 = config/aarch64/libgdruntime_la-switchcontext.lo + @DRUNTIME_CPU_ARM_TRUE@am__objects_25 = config/arm/libgdruntime_la-switchcontext.lo +-@DRUNTIME_CPU_LOONGARCH_TRUE@am__objects_26 = config/loongarch/libgdruntime_la-switchcontext.lo +-@DRUNTIME_CPU_MIPS_TRUE@am__objects_27 = config/mips/libgdruntime_la-switchcontext.lo +-@DRUNTIME_CPU_POWERPC_TRUE@am__objects_28 = config/powerpc/libgdruntime_la-switchcontext.lo +-@DRUNTIME_CPU_X86_TRUE@@DRUNTIME_OS_MINGW_TRUE@am__objects_29 = config/mingw/libgdruntime_la-switchcontext.lo +-@DRUNTIME_CPU_X86_TRUE@@DRUNTIME_OS_MINGW_FALSE@am__objects_30 = config/x86/libgdruntime_la-switchcontext.lo +-@DRUNTIME_CPU_SYSTEMZ_TRUE@am__objects_31 = config/systemz/libgdruntime_la-get_tls_offset.lo +-@DRUNTIME_CPU_S390_TRUE@am__objects_32 = config/s390/libgdruntime_la-get_tls_offset.lo +-am__objects_33 = $(am__objects_6) $(am__objects_8) $(am__objects_10) \ ++@DRUNTIME_CPU_MIPS_TRUE@am__objects_26 = config/mips/libgdruntime_la-switchcontext.lo ++@DRUNTIME_CPU_POWERPC_TRUE@am__objects_27 = config/powerpc/libgdruntime_la-switchcontext.lo ++@DRUNTIME_CPU_X86_TRUE@@DRUNTIME_OS_MINGW_TRUE@am__objects_28 = config/mingw/libgdruntime_la-switchcontext.lo ++@DRUNTIME_CPU_X86_TRUE@@DRUNTIME_OS_MINGW_FALSE@am__objects_29 = config/x86/libgdruntime_la-switchcontext.lo ++@DRUNTIME_CPU_SYSTEMZ_TRUE@am__objects_30 = config/systemz/libgdruntime_la-get_tls_offset.lo ++@DRUNTIME_CPU_S390_TRUE@am__objects_31 = config/s390/libgdruntime_la-get_tls_offset.lo ++@DRUNTIME_CPU_LOONGARCH_TRUE@am__objects_32 = config/loongarch/libgdruntime_la-switchcontext.lo ++am__objects_33 = $(am__objects_5) $(am__objects_7) $(am__objects_9) \ + $(am__objects_11) $(am__objects_13) $(am__objects_15) \ + $(am__objects_17) $(am__objects_19) $(am__objects_21) \ + $(am__objects_23) $(am__objects_24) $(am__objects_25) \ +@@ -500,22 +500,22 @@ am__objects_36 = core/stdc/libgdruntime_convenience_la-errno_.lo + @DRUNTIME_OS_MINGW_TRUE@ config/mingw/libgdruntime_convenience_la-msvc.lo + @DRUNTIME_CPU_AARCH64_TRUE@am__objects_38 = config/aarch64/libgdruntime_convenience_la-switchcontext.lo + @DRUNTIME_CPU_ARM_TRUE@am__objects_39 = config/arm/libgdruntime_convenience_la-switchcontext.lo +-@DRUNTIME_CPU_LOONGARCH_TRUE@am__objects_40 = config/loongarch/libgdruntime_convenience_la-switchcontext.lo +-@DRUNTIME_CPU_MIPS_TRUE@am__objects_41 = config/mips/libgdruntime_convenience_la-switchcontext.lo +-@DRUNTIME_CPU_POWERPC_TRUE@am__objects_42 = config/powerpc/libgdruntime_convenience_la-switchcontext.lo +-@DRUNTIME_CPU_X86_TRUE@@DRUNTIME_OS_MINGW_TRUE@am__objects_43 = config/mingw/libgdruntime_convenience_la-switchcontext.lo +-@DRUNTIME_CPU_X86_TRUE@@DRUNTIME_OS_MINGW_FALSE@am__objects_44 = config/x86/libgdruntime_convenience_la-switchcontext.lo +-@DRUNTIME_CPU_SYSTEMZ_TRUE@am__objects_45 = config/systemz/libgdruntime_convenience_la-get_tls_offset.lo +-@DRUNTIME_CPU_S390_TRUE@am__objects_46 = config/s390/libgdruntime_convenience_la-get_tls_offset.lo ++@DRUNTIME_CPU_MIPS_TRUE@am__objects_40 = config/mips/libgdruntime_convenience_la-switchcontext.lo ++@DRUNTIME_CPU_POWERPC_TRUE@am__objects_41 = config/powerpc/libgdruntime_convenience_la-switchcontext.lo ++@DRUNTIME_CPU_X86_TRUE@@DRUNTIME_OS_MINGW_TRUE@am__objects_42 = config/mingw/libgdruntime_convenience_la-switchcontext.lo ++@DRUNTIME_CPU_X86_TRUE@@DRUNTIME_OS_MINGW_FALSE@am__objects_43 = config/x86/libgdruntime_convenience_la-switchcontext.lo ++@DRUNTIME_CPU_SYSTEMZ_TRUE@am__objects_44 = config/systemz/libgdruntime_convenience_la-get_tls_offset.lo ++@DRUNTIME_CPU_S390_TRUE@am__objects_45 = config/s390/libgdruntime_convenience_la-get_tls_offset.lo ++@DRUNTIME_CPU_LOONGARCH_TRUE@am__objects_46 = config/loongarch/libgdruntime_convenience_la-switchcontext.lo + am__objects_47 = $(am__objects_5) $(am__objects_7) $(am__objects_9) \ + $(am__objects_11) $(am__objects_13) $(am__objects_15) \ +- $(am__objects_17) $(am__objects_19) $(am__objects_36) \ +- $(am__objects_23) $(am__objects_37) $(am__objects_38) \ +- $(am__objects_39) $(am__objects_40) $(am__objects_41) \ +- $(am__objects_42) $(am__objects_43) $(am__objects_44) \ +- $(am__objects_45) $(am__objects_46) +-am__objects_48 = $(am__objects_1) $(am__objects_35) $(am__objects_3) \ +- $(am__objects_47) $(am__objects_33) ++ $(am__objects_17) $(am__objects_19) $(am__objects_37) \ ++ $(am__objects_23) $(am__objects_38) $(am__objects_39) \ ++ $(am__objects_40) $(am__objects_41) $(am__objects_42) \ ++ $(am__objects_43) $(am__objects_44) $(am__objects_45) \ ++ $(am__objects_46) ++am__objects_48 = $(am__objects_1) $(am__objects_36) $(am__objects_3) \ ++ $(am__objects_47) $(am__objects_34) + am__objects_49 = $(am__objects_48) + am_libgdruntime_convenience_la_OBJECTS = $(am__objects_49) + libgdruntime_convenience_la_OBJECTS = \ +@@ -1905,11 +1905,6 @@ config/arm/$(am__dirstamp): + @: > config/arm/$(am__dirstamp) + config/arm/libgdruntime_la-switchcontext.lo: \ + config/arm/$(am__dirstamp) +-config/loongarch/$(am__dirstamp): +- @$(MKDIR_P) config/loongarch +- @: > config/loongarch/$(am__dirstamp) +-config/loongarch/libgdruntime_la-switchcontext.lo: \ +- config/loongarch/$(am__dirstamp) + config/mips/$(am__dirstamp): + @$(MKDIR_P) config/mips + @: > config/mips/$(am__dirstamp) +@@ -1937,6 +1932,11 @@ config/s390/$(am__dirstamp): + @: > config/s390/$(am__dirstamp) + config/s390/libgdruntime_la-get_tls_offset.lo: \ + config/s390/$(am__dirstamp) ++config/loongarch/$(am__dirstamp): ++ @$(MKDIR_P) config/loongarch ++ @: > config/loongarch/$(am__dirstamp) ++config/loongarch/libgdruntime_la-switchcontext.lo: \ ++ config/loongarch/$(am__dirstamp) + gcc/config.lo: gcc/$(am__dirstamp) + gcc/libbacktrace.lo: gcc/$(am__dirstamp) + +@@ -1950,8 +1950,6 @@ config/aarch64/libgdruntime_convenience_la-switchcontext.lo: \ + config/aarch64/$(am__dirstamp) + config/arm/libgdruntime_convenience_la-switchcontext.lo: \ + config/arm/$(am__dirstamp) +-config/loongarch/libgdruntime_convenience_la-switchcontext.lo: \ +- config/loongarch/$(am__dirstamp) + config/mips/libgdruntime_convenience_la-switchcontext.lo: \ + config/mips/$(am__dirstamp) + config/powerpc/libgdruntime_convenience_la-switchcontext.lo: \ +@@ -1964,6 +1962,8 @@ config/systemz/libgdruntime_convenience_la-get_tls_offset.lo: \ + config/systemz/$(am__dirstamp) + config/s390/libgdruntime_convenience_la-get_tls_offset.lo: \ + config/s390/$(am__dirstamp) ++config/loongarch/libgdruntime_convenience_la-switchcontext.lo: \ ++ config/loongarch/$(am__dirstamp) + + libgdruntime_convenience.la: $(libgdruntime_convenience_la_OBJECTS) $(libgdruntime_convenience_la_DEPENDENCIES) $(EXTRA_libgdruntime_convenience_la_DEPENDENCIES) + $(AM_V_GEN)$(libgdruntime_convenience_la_LINK) $(libgdruntime_convenience_la_OBJECTS) $(libgdruntime_convenience_la_LIBADD) $(LIBS) +@@ -1976,14 +1976,14 @@ mostlyclean-compile: + -rm -f config/arm/*.lo + -rm -f config/mingw/*.$(OBJEXT) + -rm -f config/mingw/*.lo +- -rm -f config/loongarch/*.$(OBJEXT) +- -rm -f config/loongarch/*.lo + -rm -f config/mips/*.$(OBJEXT) + -rm -f config/mips/*.lo + -rm -f config/powerpc/*.$(OBJEXT) + -rm -f config/powerpc/*.lo + -rm -f config/s390/*.$(OBJEXT) + -rm -f config/s390/*.lo ++ -rm -f config/loongarch/*.$(OBJEXT) ++ -rm -f config/loongarch/*.lo + -rm -f config/systemz/*.$(OBJEXT) + -rm -f config/systemz/*.lo + -rm -f config/x86/*.$(OBJEXT) +@@ -2101,10 +2101,7 @@ config/aarch64/libgdruntime_la-switchcontext.lo: config/aarch64/switchcontext.S + config/arm/libgdruntime_la-switchcontext.lo: config/arm/switchcontext.S + $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) $(libgdruntime_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o config/arm/libgdruntime_la-switchcontext.lo `test -f 'config/arm/switchcontext.S' || echo '$(srcdir)/'`config/arm/switchcontext.S + +-config/loongarch/libgdruntime_la-switchcontext.lo: config/loongarch/switchcontext.S +- $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) $(libgdruntime_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) +- +-onfig/mips/libgdruntime_la-switchcontext.lo: config/mips/switchcontext.S ++config/mips/libgdruntime_la-switchcontext.lo: config/mips/switchcontext.S + $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) $(libgdruntime_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o config/mips/libgdruntime_la-switchcontext.lo `test -f 'config/mips/switchcontext.S' || echo '$(srcdir)/'`config/mips/switchcontext.S + + config/powerpc/libgdruntime_la-switchcontext.lo: config/powerpc/switchcontext.S +@@ -2122,18 +2119,21 @@ config/systemz/libgdruntime_la-get_tls_offset.lo: config/systemz/get_tls_offset. + config/s390/libgdruntime_la-get_tls_offset.lo: config/s390/get_tls_offset.S + $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) $(libgdruntime_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o config/s390/libgdruntime_la-get_tls_offset.lo `test -f 'config/s390/get_tls_offset.S' || echo '$(srcdir)/'`config/s390/get_tls_offset.S + ++config/loongarch/libgdruntime_la-switchcontext.lo: config/loongarch/switchcontext.S ++ $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) $(libgdruntime_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o config/loongarch/libgdruntime_la-switchcontext.lo `test -f 'config/loongarch/switchcontext.S' || echo '$(srcdir)/'`config/loongarch/switchcontext.S ++ + config/aarch64/libgdruntime_convenience_la-switchcontext.lo: config/aarch64/switchcontext.S + $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) $(libgdruntime_convenience_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o config/aarch64/libgdruntime_convenience_la-switchcontext.lo `test -f 'config/aarch64/switchcontext.S' || echo '$(srcdir)/'`config/aarch64/switchcontext.S + + config/arm/libgdruntime_convenience_la-switchcontext.lo: config/arm/switchcontext.S + $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) $(libgdruntime_convenience_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o config/arm/libgdruntime_convenience_la-switchcontext.lo `test -f 'config/arm/switchcontext.S' || echo '$(srcdir)/'`config/arm/switchcontext.S + +-config/loongarch/libgdruntime_convenience_la-switchcontext.lo: config/loongarch/switchcontext.S +- $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) $(libgdruntime_convenience_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM +- + config/mips/libgdruntime_convenience_la-switchcontext.lo: config/mips/switchcontext.S + $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) $(libgdruntime_convenience_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o config/mips/libgdruntime_convenience_la-switchcontext.lo `test -f 'config/mips/switchcontext.S' || echo '$(srcdir)/'`config/mips/switchcontext.S + ++config/loongarch/libgdruntime_convenience_la-switchcontext.lo: config/loongarch/switchcontext.S ++ $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) $(libgdruntime_convenience_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o config/loongarch/libgdruntime_convenience_la-switchcontext.lo `test -f 'config/loongarch/switchcontext.S' || echo '$(srcdir)/'`config/loongarch/switchcontext.S ++ + config/powerpc/libgdruntime_convenience_la-switchcontext.lo: config/powerpc/switchcontext.S + $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) $(libgdruntime_convenience_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o config/powerpc/libgdruntime_convenience_la-switchcontext.lo `test -f 'config/powerpc/switchcontext.S' || echo '$(srcdir)/'`config/powerpc/switchcontext.S + +@@ -2178,10 +2178,10 @@ clean-libtool: + -rm -rf config/aarch64/.libs config/aarch64/_libs + -rm -rf config/arm/.libs config/arm/_libs + -rm -rf config/mingw/.libs config/mingw/_libs +- -rm -rf config/loongarch/.libs config/loongarch/_libs + -rm -rf config/mips/.libs config/mips/_libs + -rm -rf config/powerpc/.libs config/powerpc/_libs + -rm -rf config/s390/.libs config/s390/_libs ++ -rm -rf config/loongarch/.libs config/loongarch/_libs + -rm -rf config/systemz/.libs config/systemz/_libs + -rm -rf config/x86/.libs config/x86/_libs + -rm -rf core/.libs core/_libs +@@ -2340,10 +2340,10 @@ distclean-generic: + -rm -f config/aarch64/$(am__dirstamp) + -rm -f config/arm/$(am__dirstamp) + -rm -f config/mingw/$(am__dirstamp) +- -rm -f config/loongarch/$(am__dirstamp) + -rm -f config/mips/$(am__dirstamp) + -rm -f config/powerpc/$(am__dirstamp) + -rm -f config/s390/$(am__dirstamp) ++ -rm -f config/loongarch/$(am__dirstamp) + -rm -f config/systemz/$(am__dirstamp) + -rm -f config/x86/$(am__dirstamp) + -rm -f core/$(am__dirstamp) diff --git a/Revert-tree-optimization-110702-avoid-zero-based-memory-ref.patch b/Revert-tree-optimization-110702-avoid-zero-based-memory-ref.patch new file mode 100644 index 0000000000000000000000000000000000000000..5e3eab36a51657257f4349a98f48be34df8d3c6a --- /dev/null +++ b/Revert-tree-optimization-110702-avoid-zero-based-memory-ref.patch @@ -0,0 +1,65 @@ +diff --git a/gcc/testsuite/gcc.dg/torture/pr110702.c b/gcc/testsuite/gcc.dg/torture/pr110702.c +deleted file mode 100644 +index aab9c7d923e..00000000000 +--- a/gcc/testsuite/gcc.dg/torture/pr110702.c ++++ /dev/null +@@ -1,31 +0,0 @@ +-/* { dg-do run } */ +- +-void abort (void); +- +-int a, b, c, d; +-long e[9][7][4]; +- +-void f() +-{ +- for (; a >= 0; a--) +- { +- b = 0; +- for (; b <= 3; b++) +- { +- c = 0; +- for (; c <= 3; c++) +- { +- int *g = &d; +- *g = e[0][0][b] | e[a][b][a]; +- } +- } +- } +-} +- +-int main() +-{ +- f(); +- if (a != -1) +- abort (); +- return 0; +-} +diff --git a/gcc/tree-ssa-loop-ivopts.cc b/gcc/tree-ssa-loop-ivopts.cc +index eb4d8388906..59e8df1b5a9 100644 +--- a/gcc/tree-ssa-loop-ivopts.cc ++++ b/gcc/tree-ssa-loop-ivopts.cc +@@ -7616,22 +7616,7 @@ rewrite_use_address (struct ivopts_data *data, + true, GSI_SAME_STMT); + } + else +- { +- /* When we end up confused enough and have no suitable base but +- stuffed everything to index2 use a LEA for the address and +- create a plain MEM_REF to avoid basing a memory reference +- on address zero which create_mem_ref_raw does as fallback. */ +- if (TREE_CODE (ref) == TARGET_MEM_REF +- && TMR_INDEX2 (ref) != NULL_TREE +- && integer_zerop (TREE_OPERAND (ref, 0))) +- { +- ref = fold_build1 (ADDR_EXPR, TREE_TYPE (TREE_OPERAND (ref, 0)), ref); +- ref = force_gimple_operand_gsi (&bsi, ref, true, NULL_TREE, +- true, GSI_SAME_STMT); +- ref = build2 (MEM_REF, type, ref, build_zero_cst (alias_ptr_type)); +- } +- copy_ref_info (ref, *use->op_p); +- } ++ copy_ref_info (ref, *use->op_p); + + *use->op_p = ref; + } diff --git a/STAGE1-gcc b/STAGE1-gcc deleted file mode 100644 index 11744b83b837c9e31f3bf298bc861c97fed565cf..0000000000000000000000000000000000000000 --- a/STAGE1-gcc +++ /dev/null @@ -1,35 +0,0 @@ -srpm gcc -mcd $BUILDDIR/gcc - -# These are for gcc cross-tools (politics sometime result in slightly -# different arch names) -GCC_CONFIGARGS="--prefix=$PREFIX - --libdir=$PREFIX/lib${SUFFIX} - --target=$TARGET - ${GCC_CONFIG_EXTRA} - --enable-languages=c,c++ - --with-sysroot=$ROOTFS - --with-build-sysroot=$ROOTFS - --cache-file=config.cache - --disable-bootstrap - --enable-threads=posix - --enable-64-bit-bfd - --disable-lto - $WITHPPL -" - -# prefill gcc cache -echo 'lt_cv_shlibpath_overrides_runpath=no' > config.cache -echo 'gcc_cv_libc_provides_ssp=yes' >> config.cache - -if [ ! "$BUILDER_ARCH" = "$TARGET_ARCH" ]; then - WITH_HEADERS="--with-headers=$ROOTFS/usr/include" -fi - -$SRC/gcc-*/configure $GCC_CONFIGARGS $WITH_HEADERS -notparallel -make $J -make $J install -mcd $ROOTFS/lib${SUFFIX}/gcc -rsync -av $PREFIX/lib${SUFFIX}/gcc/ $ROOTFS/lib${SUFFIX}/gcc/ -rsync -av $PREFIX/$TARGET/lib/ $ROOTFS/lib${SUFFIX}/ diff --git a/STAGE1-gcc-host b/STAGE1-gcc-host deleted file mode 100644 index 514a58fd664a78c393ab8751040b7316b2685c3a..0000000000000000000000000000000000000000 --- a/STAGE1-gcc-host +++ /dev/null @@ -1,48 +0,0 @@ -srpm gcc -mcd $BUILDDIR/gcc-host - -# These are for gcc cross-tools (politics sometime result in slightly -# different arch names) -GCC_CONFIGARGS="--prefix=$PREFIX - --libdir=$PREFIX/lib${SUFFIX} - --target=$TARGET - ${GCC_CONFIG_EXTRA} - --enable-languages=c,c++ - --with-sysroot=$ROOTFS - --with-build-sysroot=$ROOTFS - --cache-file=config.cache - --disable-bootstrap - --enable-threads=posix - --enable-64-bit-bfd - --disable-lto - $WITHPPL -" - -# prefill gcc cache -echo 'lt_cv_shlibpath_overrides_runpath=no' > config.cache -echo 'gcc_cv_libc_provides_ssp=yes' >> config.cache - -if [ ! "$BUILDER_ARCH" = "$TARGET_ARCH" ]; then - WITH_HEADERS="--with-headers=$ROOTFS/usr/include" -fi - -$SRC/gcc-*/configure $GCC_CONFIGARGS $WITH_HEADERS -notparallel - -# Pass gcc_cv_libc_provides_ssp down, because the config.cache -# version is not passed down to the gcc subdir. -make $J all-host gcc_cv_libc_provides_ssp=yes -make $J install-host gcc_cv_libc_provides_ssp=yes - - -if false; then - mkdirp $ROOTFS/usr/lib${SUFFIX} - for o in crt Scrt1 crti crtbegin crtbeginS crtend crtendS crtn - do - $TARGET-gcc -nostdlib -nostartfiles -c -x c /dev/null -c -o $ROOTFS/usr/lib${SUFFIX}/$o.o - done - for so in gcc gcc_s c - do - $TARGET-gcc -nostdlib -nostartfiles -shared -x c /dev/null -o $ROOTFS/usr/lib${SUFFIX}/lib$so.so - done -fi diff --git a/STAGE1-gcc-libgcc b/STAGE1-gcc-libgcc deleted file mode 100644 index 26001721a70c3a9e11d219d09d8bb6a8d5df9639..0000000000000000000000000000000000000000 --- a/STAGE1-gcc-libgcc +++ /dev/null @@ -1,34 +0,0 @@ -srpm gcc -mcd $BUILDDIR/gcc-libgcc - -# These are for gcc cross-tools (politics sometime result in slightly -# different arch names) -GCC_CONFIGARGS="--prefix=$PREFIX - --libdir=$PREFIX/lib${SUFFIX} - --target=$TARGET - ${GCC_CONFIG_EXTRA} - --enable-languages=c,c++ - --with-sysroot=$ROOTFS - --with-build-sysroot=$ROOTFS - --cache-file=config.cache - --disable-bootstrap - --enable-threads=posix - --enable-64-bit-bfd - --disable-lto - $WITHPPL -" - -# prefill gcc cache -echo 'lt_cv_shlibpath_overrides_runpath=no' > config.cache -echo 'gcc_cv_libc_provides_ssp=yes' >> config.cache - -if [ ! "$BUILDER_ARCH" = "$TARGET_ARCH" ]; then - WITH_HEADERS="--with-headers=$ROOTFS/usr/include" -fi - -$SRC/gcc-*/configure $GCC_CONFIGARGS $WITH_HEADERS -notparallel -# Pass gcc_cv_libc_provides_ssp down, because the config.cache -# version is not passed down to the gcc subdir. -make $J all-target-libgcc all-target-libssp gcc_cv_libc_provides_ssp=yes -make $J install-target-libgcc install-target-libssp gcc_cv_libc_provides_ssp=yes diff --git a/STAGE1-t-gcc b/STAGE1-t-gcc deleted file mode 100644 index ed20101d09554c23bd21e6814ad15e34c12ca635..0000000000000000000000000000000000000000 --- a/STAGE1-t-gcc +++ /dev/null @@ -1,28 +0,0 @@ -srpm gcc -mcd $BUILDDIR/t-gcc - -GCC_TCONFIGARGS="--prefix=/usr - --libdir=/usr/lib${SUFFIX} - --with-sysroot=/ - --with-build-sysroot=$ROOTFS - --build=$BUILD - --host=$TARGET - --target=$TARGET - --disable-bootstrap - --enable-werror=no - --enable-cxx - ${GCC_CONFIG_EXTRA} - --enable-languages=c,c++ - --enable-threads=posix - --enable-linker-build-id -" - -$SRC/gcc-*/configure $GCC_TCONFIGARGS -notparallel -make $J -make $J install DESTDIR=${ROOTFS} -test -e ${ROOTFS}/usr/bin/cc && rm ${ROOTFS}/usr/bin/cc -ln -s gcc ${ROOTFS}/usr/bin/cc -mkdir -p ${ROOTFS}/usr/share/gdb/auto-load/usr/lib${SUFFIX} -mv -f ${ROOTFS}/usr/lib${SUFFIX}/libstdc++*gdb.py* \ - ${ROOTFS}/usr/share/gdb/auto-load/usr/lib${SUFFIX} diff --git a/gcc.spec b/gcc.spec index ee477cabb8577b2bc7c90034889f23111f3e7b13..23881fc13f616ba264043ac8c7c807560e03deb2 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,6 +1,6 @@ -%global gcc_version 12.3.1.2 +%global gcc_version 12.3.1.3 %global gcc_major 12 -%global gcc_release 6 +%global gcc_release 1 %global isl_version 0.18 %global tgcc_summary Tencent Compiler %global _unpackaged_files_terminate_build 0 @@ -127,9 +127,10 @@ Patch3005: gcc12-no-add-needed.patch Patch3006: gcc12-Wno-format-security.patch Patch3007: gcc12-rh1574936.patch Patch3008: gcc12-d-shared-libphobos.patch -# Fix GNOME desktop startup failure on loongarch architecture -Patch3009: 0001-LoongArch-Optimize-the-loading-of-immediate-numbers-.patch -Patch3010: 0002-LoongArch-Fixed-bug-in-bstrins_-mode-_for_ior_mask-t.patch +# tgcc 12.3.1.3 has a syntax error in makefile.in +Patch3009: Fix-indentation-and-numbering-errors.patch +# tgcc 12.3.1.3 backports a common modify from high version upstream gcc, revert it temply in x64 and arm64 +Patch3010: Revert-tree-optimization-110702-avoid-zero-based-memory-ref.patch BuildRequires: binutils >= 2.31, elfutils-devel >= 0.147, elfutils-libelf-devel >= 0.147, sharutils, gcc, gcc-c++, make BuildRequires: glibc-static, glibc-devel >= 2.4.90-13, gdb @@ -853,8 +854,11 @@ for cross toolchains %patch 3006 -p0 %patch 3007 -p0 %patch 3008 -p0 + %patch 3009 -p1 +%ifnarch loongarch64 %patch 3010 -p1 +%endif rm -f libphobos/testsuite/libphobos.gc/forkgc2.d @@ -2402,6 +2406,49 @@ end %changelog +* Tue Nov 12 2024 Zhao Zhen - 12.3.1.3-1 +- [Type] other +- [DESC] backport LoongArch patches +- Fixed duplicate link errors when building libgccjit. +- Changed the value of branch_cost: Optimized the generation of branch-related instructions. +- Fixed build and test errors caused by version differences. +- Optimized the generation of instructions for immediate loading. +- Optimized the implementation of stack-check. +- Optimized the generation of multiplication instructions. +- Added support for 3A6000. +- Modified the library installation path. +- Fixed GNOME desktop startup failure. +- Fixed dependencies on loongarch header files. +- Fixed the behavior of the macro instruction .align. +- Fixed the vec_initv32qiv16qi template to avoid ICE errors. +- Optimized the use of fcmp.caf.s instead of movgr2cf for copying from the zero register. +- Fixed the lsx_vreplgr2vr_ instruction template error. +- Fixed backend subreg nesting errors. +- Fixed redundant barrier instructions before LL-SC. +- Optimized immediate loading. +- Fixed runtime errors when building gcc. +- Fixed incorrect use of frint and ftint instructions. +- Changed vector usage to standard template names. +- Allowed S9 as an alias for the r22 register. +- Changed the dynamic library installation path to lib64. +- Fixed memory reference errors with base address 0. +- Added a test suite for vector instructions. +- Added support for Ada, libffi, libvtv, libitm on LoongArch. +- Added support for prefetch instructions, commonly used floating-point instructions, and [f]copysign. +- Added support for mcmodel=medium and extreme. +- Added fmin/fmax RTL backend templates. +- Added the -mdirect-extern-access option. +- Added support for libsanitizer. +- Added the -mexplicit-relocs option as an optional target. +- Implemented __builtin_thread_pointer. +- Added support for xorsign. +- Added the alslsi3_extend template. +- Added a D language frontend. +- Added TLS relocation types. +- Added fmin/fmax RTL templates. +- Added a test suite for vector instructions. +- Defined ISA versions. + * Thu Sep 26 2024 OpenCloudOS Release Engineering - 12.3.1.2-6 - Rebuilt for clarifying the packages requirement in BaseOS and AppStream diff --git a/sources b/sources index 8f9b1a0ecb9e0bc8988170a2c73e320c22060c36..83be9b8a147179ed8dd88dbe82f5dcf8566886d4 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (tgcc-12.3.1.2.tar.gz) = 200c68a7b39eef3d621ea9ebab6051755627709a1cac4cb995b6d731f537831d89c670404c8e355a9f6be12bd70f58a7479e9944a6d3e12a4b582735aa45721b +SHA512 (tgcc-12.3.1.3.tar.gz) = 1e56b2e7581a0bb845e9615ac9704a9180855f607d43d6a77930ba72a12782d720876b43b1f5c7da1bf1d173dc5c324e7068a5c2e9b20646e3a808067a1bbca5 SHA512 (isl-0.18.tar.bz2) = 85d0b40f4dbf14cb99d17aa07048cdcab2dc3eb527d2fbb1e84c41b2de5f351025370e57448b63b2b8a8cf8a0843a089c3263f9baee1542d5c2e1cb37ed39d94 diff --git a/update-gcc.sh b/update-gcc.sh deleted file mode 100755 index b9e83304a8d73b70c62974155f8ceb64630d5583..0000000000000000000000000000000000000000 --- a/update-gcc.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -[ -d gcc-dir.tmp ] && echo gcc-dir.tmp already exists && exit 1 -git clone --depth 1 git://gcc.gnu.org/git/gcc.git gcc-dir.tmp -git --git-dir=gcc-dir.tmp/.git fetch --depth 1 origin $1 -d=`date --iso | sed 's/-//g'` -git --git-dir=gcc-dir.tmp/.git archive --prefix=gcc-12.0.1-$d/ $1 | xz -9e > gcc-12.0.1-$d.tar.xz -rm -rf gcc-dir.tmp