Source: gcc-defaults
Version: 1.217
Severity: normal
Tags: ftbfs patch
User: debian-loonga...@lists.debian.org
Usertags: loong64

Dear maintainers,

For loong64, the D, Ada, Modula-2 modules have been supported in gcc-14 14-20240330-1. I duploaded the gdc-14, gnat-14 and other packages built from gcc-14 14-20240330-1 that support the loong64 architecture for the first time to debian ports.

Due to "default to GCC 13" is used in gcc-defaults 1.214, we need to enable build gdc and gm2 for loong64 in gcc-defaults 1.217.
Please consider the patch I attached.
Your opinions are welcome.

Thanks,
Dandan Zhang

diff -Nru gcc-defaults-1.217/debian/control gcc-defaults-1.217/debian/control
--- gcc-defaults-1.217/debian/control   2024-01-31 13:17:32.000000000 +0000
+++ gcc-defaults-1.217/debian/control   2024-01-31 13:17:32.000000000 +0000
@@ -2740,6 +2740,39 @@
  This is a dependency package providing the default GNU Fortran 95
  cross-compiler for the loong64 architecture.
 
+Package: gdc-loongarch64-linux-gnu
+Priority: optional
+Architecture: loong64 
+Multi-Arch: foreign
+Depends: cpp-loongarch64-linux-gnu (>= ${version:cpp}),
+  gdc-${pv:gdc}-loongarch64-linux-gnu ${reqv:gdc},
+  ${misc:Depends}
+Breaks: gdc (<< 4:13.2.0-3)
+Replaces: gdc (<< 4:13.2.0-3)
+Description: GNU D compiler (based on GCC) for the loong64 architecture
+ This is the GNU D compiler, which compiles D on platforms supported by
+ the gcc compiler. It uses the gcc backend to generate optimized code.
+ .
+ This is a dependency package providing the default GNU D cross-compiler
+ for the loong64 architecture.
+
+Package: gm2-loongarch64-linux-gnu
+Priority: optional
+Architecture: loong64 
+Multi-Arch: foreign
+Depends: cpp-loongarch64-linux-gnu (= ${version:cpp}),
+  gm2-${pv:gm2}-loongarch64-linux-gnu ${reqv:gm2},
+  ${misc:Depends}
+Breaks: gm2 (<< 4:13.2.0-3)
+Replaces: gm2 (<< 4:13.2.0-3)
+Description: GNU Modula-2 compiler (based on GCC) for the loong64 architecture
+ This is the GNU Modula-2 compiler, which compiles Modula-2 on platforms
+ supported by the gcc compiler. It uses the gcc backend to generate optimized
+ code.
+ .
+ This is a dependency package providing the default GNU Modula-2 cross-compiler
+ for the loong64 architecture.
+
 Package: cpp-powerpc-linux-gnu
 Priority: optional
 Architecture: powerpc
diff -Nru gcc-defaults-1.217/debian/rules gcc-defaults-1.217/debian/rules
--- gcc-defaults-1.217/debian/rules     2024-01-31 13:17:32.000000000 +0000
+++ gcc-defaults-1.217/debian/rules     2024-01-31 13:17:32.000000000 +0000
@@ -231,11 +231,11 @@
        $(all_archs_mips)
 
 gcc13_archs =
-gcc14_archs  = alpha arc amd64 armel armhf arm64 hppa i386 ia64 m68k or1k 
powerpc ppc64 ppc64el riscv64 s390 s390x sh4 sparc sparc64 x32 hurd-amd64 
hurd-i386 kfreebsd-amd64 kfreebsd-i386 \
+gcc14_archs  = alpha arc amd64 armel armhf arm64 hppa i386 ia64 loong64 m68k 
or1k powerpc ppc64 ppc64el riscv64 s390 s390x sh4 sparc sparc64 x32 hurd-amd64 
hurd-i386 kfreebsd-amd64 kfreebsd-i386 \
             $(all_archs_mips)
 
 gnat13_archs  =
-gnat14_archs  = alpha amd64 armel armhf arm64 hppa i386 ia64 m68k or1k powerpc 
ppc64 ppc64el s390 s390x sh4 sparc sparc64 x32 hurd-amd64 hurd-i386 
kfreebsd-amd64 kfreebsd-i386 \
+gnat14_archs  = alpha amd64 armel armhf arm64 hppa i386 ia64 loong64 m68k or1k 
powerpc ppc64 ppc64el s390 s390x sh4 sparc sparc64 x32 hurd-amd64 hurd-i386 
kfreebsd-amd64 kfreebsd-i386 \
             $(all_archs_mips)
 
 # CV_XXX is the complete version number, including the release, without epoch
@@ -338,7 +338,7 @@
        $(all_archs_mips) \
        powerpc ppc64 ppc64el riscv64 s390 s390x sparc sparc64 x32
 
-d_archs = amd64 arm64 armel armhf i386 \
+d_archs = amd64 arm64 armel armhf i386 loong64 \
        $(all_archs_mips) \
        powerpc ppc64 ppc64el riscv64 s390x x32
 phobos_archs = $(filter-out powerpc ppc64 ppc64el, $(d_archs))
@@ -347,7 +347,7 @@
 
 d_multilib_archs = $(filter $(d_archs), $(filter-out armel sparc64, 
$(multilib_archs)))
 
-ada_archs = alpha amd64 arm64 armel armhf hppa i386 ia64 m68k \
+ada_archs = alpha amd64 arm64 armel armhf hppa i386 ia64 m68k loong64 \
        $(all_archs_mips) \
        powerpc ppc64 ppc64el riscv64 s390 s390x sh4 sparc sparc64 \
        kfreebsd-amd64 kfreebsd-i386 hurd-amd64 hurd-i386
@@ -357,7 +357,7 @@
 
 hppa64_archs = amd64 hppa i386 x32
 
-m2_archs = alpha arc amd64 arm64 armel armhf i386 ia64 \
+m2_archs = alpha arc amd64 arm64 armel armhf i386 ia64 loong64 \
        $(all_archs_mips) \
        ppc64el riscv64 s390 s390x sparc64
 
@@ -368,6 +368,7 @@
   HOST_ARCHS_arm64 = amd64 i386 x32 ppc64el s390x
   HOST_ARCHS_armhf = amd64 i386 x32 arm64 ppc64el s390x
   HOST_ARCHS_i386 = amd64 arm64 ppc64el x32 s390x
+  HOST_ARCHS_loong64 = amd64 i386 x32 arm64 ppc64el s390x
   ifeq ($(vendor),Ubuntu)
     HOST_ARCHS_powerpc = amd64 arm64 i386 x32 ppc64el s390x
   endif
@@ -517,13 +518,11 @@
        gccgo-multilib-arm-linux-gnueabihf \
        gdc-alpha-linux-gnu \
        gdc-arc-linux-gnu \
-       gdc-loongarch64-linux-gnu \
        gdc-m68k-linux-gnu \
        gdc-sh4-linux-gnu \
        gdc-sparc64-linux-gnu \
        gdc-multilib-arm-linux-gnueabi \
        gdc-multilib-sparc64-linux-gnu \
-       gm2-loongarch64-linux-gnu \
        gm2-powerpc-linux-gnu \
        gm2-powerpc64-linux-gnu \
        gm2-sh4-linux-gnu \
@@ -749,9 +748,9 @@
            debian/control.cross.in \
            $(if $(and $(filter yes,$(with_cross)),$(filter 
$(a),$(multilib_archs))), debian/control.cross-ml.in) \
            | awk '/^Package: gccgo-(arc|hppa|loongarch64|m68k|sh4)/ {skip=1} 
skip == 0 {print } /^$$/ && skip == 1 {skip=0}' \
-           | awk '/^Package: gdc-(alpha|arc|loongarch64|m68k|sh4|sparc64)/ 
{skip=1} skip == 0 {print } /^$$/ && skip == 1 {skip=0}' \
+           | awk '/^Package: gdc-(alpha|arc|m68k|sh4|sparc64)/ {skip=1} skip 
== 0 {print } /^$$/ && skip == 1 {skip=0}' \
            | awk '/^Package: gdc-multilib-sparc64/ {skip=1} skip == 0 {print } 
/^$$/ && skip == 1 {skip=0}' \
-           | awk '/^Package: gm2-(loongarch64|powerpc|powerpc64|sh4)-/ 
{skip=1} skip == 0 {print } /^$$/ && skip == 1 {skip=0}' \
+           | awk '/^Package: gm2-(powerpc|powerpc64|sh4)-/ {skip=1} skip == 0 
{print } /^$$/ && skip == 1 {skip=0}' \
            | sed '/./{H;$$!d};x;/\nArchitecture:\s*\n/d' \
            >> debian/control; \
        )

Reply via email to