Source: gcc-12
Version: 12.2.0-14
Tags: patch
User: debian-cr...@lists.debian.org
Usertags: ftcbfs

Hi Matthias,

gcc-12 fails to cross build since gm2 was introduced as a frontend due
to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92336 and we cannot make
a dent on it, but recently it started failing way earlier. It now fails
finding <triplet>-gm2 (the cross compiler). This is due to Build-Depends
relying on a particular gcc version (which is good) but failing to
supply the version suffix to the build. As with many other frontends, we
need to pass GM2_FOR_TARGET to the build. I'm attaching a patch for this
particular issue and that moves us back to the previous one.

Helmut
diff --minimal -Nru gcc-12-12.2.0/debian/changelog 
gcc-12-12.2.0/debian/changelog
--- gcc-12-12.2.0/debian/changelog      2023-01-08 10:12:42.000000000 +0100
+++ gcc-12-12.2.0/debian/changelog      2023-02-27 13:33:34.000000000 +0100
@@ -1,3 +1,10 @@
+gcc-12 (12.2.0-14.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Improve cross building: Pass GM2_FOR_TARGET. (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Mon, 27 Feb 2023 13:33:34 +0100
+
 gcc-12 (12.2.0-14) unstable; urgency=medium
 
   * Update to git 20230108 from the gcc-12 branch.
diff --minimal -Nru gcc-12-12.2.0/debian/rules2 gcc-12-12.2.0/debian/rules2
--- gcc-12-12.2.0/debian/rules2 2022-10-31 14:42:14.000000000 +0100
+++ gcc-12-12.2.0/debian/rules2 2023-02-27 13:33:34.000000000 +0100
@@ -125,7 +125,8 @@
        GFORTRAN_FOR_TARGET=$(DEB_TARGET_GNU_TYPE)-gfortran-$(BASE_VERSION) \
        GOC_FOR_TARGET=$(DEB_TARGET_GNU_TYPE)-gccgo-$(BASE_VERSION) \
        GNAT_FOR_TARGET=$(DEB_TARGET_GNU_TYPE)-gnat-$(BASE_VERSION) \
-       GDC_FOR_TARGET=$(DEB_TARGET_GNU_TYPE)-gdc-$(BASE_VERSION)
+       GDC_FOR_TARGET=$(DEB_TARGET_GNU_TYPE)-gdc-$(BASE_VERSION) \
+       GM2_FOR_TARGET=$(DEB_TARGET_GNU_TYPE)-gm2-$(BASE_VERSION)
 endif
 
 ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_TARGET_GNU_TYPE))

Reply via email to