GNU bug report logs - #70351
[PATCH 0/3] gnu: cross-gcc: Support GCC 13.

Previous Next

Package: guix-patches;

Reported by: Jean-Pierre De Jesus DIAZ <jean <at> foundation.xyz>

Date: Fri, 12 Apr 2024 10:51:03 UTC

Severity: normal

Tags: patch

Done: Christopher Baines <mail <at> cbaines.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 70351 in the body.
You can then email your comments to 70351 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#70351; Package guix-patches. (Fri, 12 Apr 2024 10:51:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jean-Pierre De Jesus DIAZ <jean <at> foundation.xyz>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 12 Apr 2024 10:51:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jean-Pierre De Jesus DIAZ <jean <at> foundation.xyz>
To: guix-patches <at> gnu.org
Cc: Jean-Pierre De Jesus DIAZ <jean <at> foundation.xyz>
Subject: [PATCH 0/3] gnu: cross-gcc: Support GCC 13.
Date: Fri, 12 Apr 2024 12:49:36 +0200
*** BLURB HERE ***

Jean-Pierre De Jesus DIAZ (3):
  gnu: cross-gcc-patches: Avoid patch for GCC 13+.
  gnu: cross-gcc: Add patch for GCC 13.
  gnu: Add gcc-cross-x86_64-w64-mingw32-toolchain-13.

 gnu/local.mk                                  |  1 +
 gnu/packages/cross-base.scm                   |  8 ++++-
 gnu/packages/cross-toolchain.scm              |  5 +++
 .../gcc-13-cross-system-header-dir.patch      | 32 +++++++++++++++++++
 4 files changed, 45 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/gcc-13-cross-system-header-dir.patch


base-commit: 4e7337536ba41e888a601c92fada8a4adca9d2c6
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#70351; Package guix-patches. (Fri, 12 Apr 2024 10:54:03 GMT) Full text and rfc822 format available.

Information forwarded to ludo <at> gnu.org, guix-patches <at> gnu.org:
bug#70351; Package guix-patches. (Fri, 12 Apr 2024 10:54:04 GMT) Full text and rfc822 format available.

Message #11 received at 70351 <at> debbugs.gnu.org (full text, mbox):

From: Jean-Pierre De Jesus DIAZ <jean <at> foundation.xyz>
To: 70351 <at> debbugs.gnu.org
Cc: Jean-Pierre De Jesus DIAZ <jean <at> foundation.xyz>
Subject: [PATCH 1/3] gnu: cross-gcc-patches: Avoid patch for GCC 13+.
Date: Fri, 12 Apr 2024 12:53:00 +0200
* gnu/packages/cross-base.scm (cross-gcc-patches): Avoid
gcc-4.9.3-mingw-gthr-default.patch patch for GCC 13+ versions since it
does not apply.

Change-Id: I4bb14d687c53733d77099a761844815900b1266a
---
 gnu/packages/cross-base.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 2d79e0acf6..e62402a09e 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -250,7 +250,9 @@ (define (cross-gcc-patches xgcc target)
          ;; Patch by Qualcomm needed to build the ath9k-htc firmware.
          (search-patches "ath9k-htc-firmware-gcc.patch"))
         ((target-mingw? target)
-         (append (search-patches "gcc-4.9.3-mingw-gthr-default.patch")
+         (append (if (not (version>=? (package-version xgcc) "13.0"))
+                     (search-patches "gcc-4.9.3-mingw-gthr-default.patch")
+                     '())
                  (if (version>=? (package-version xgcc) "7.0")
                      (search-patches "gcc-7-cross-mingw.patch")
                      '())))
-- 
2.41.0





Information forwarded to ludo <at> gnu.org, guix-patches <at> gnu.org:
bug#70351; Package guix-patches. (Fri, 12 Apr 2024 10:54:04 GMT) Full text and rfc822 format available.

Message #14 received at 70351 <at> debbugs.gnu.org (full text, mbox):

From: Jean-Pierre De Jesus DIAZ <jean <at> foundation.xyz>
To: 70351 <at> debbugs.gnu.org
Cc: Jean-Pierre De Jesus DIAZ <jean <at> foundation.xyz>
Subject: [PATCH 2/3] gnu: cross-gcc: Add patch for GCC 13.
Date: Fri, 12 Apr 2024 12:53:01 +0200
* gnu/local.mk (dist_patch_DATA): Add gcc-13-cross-system-header-dir.patch.
* gnu/packages/cross-base.scm (cross-gcc) <source>: Add patch for
GCC 13.
* gnu/packages/patches/gcc-13-cross-system-header-dir.patch: New patch.

Change-Id: Ib4771ff78222fb7b7df58891d25938d338bd5df8
---
 gnu/local.mk                                  |  1 +
 gnu/packages/cross-base.scm                   |  4 +++
 .../gcc-13-cross-system-header-dir.patch      | 32 +++++++++++++++++++
 3 files changed, 37 insertions(+)
 create mode 100644 gnu/packages/patches/gcc-13-cross-system-header-dir.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 1169604891..bdaa57a40e 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1297,6 +1297,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/gcc-12-cross-environment-variables.patch \
   %D%/packages/patches/gcc-10-tree-sra-union-handling.patch	\
   %D%/packages/patches/gcc-11-libstdc++-powerpc.patch           \
+  %D%/packages/patches/gcc-13-cross-system-header-dir.patch     \
   %D%/packages/patches/gcolor3-update-libportal-usage.patch	\
   %D%/packages/patches/gd-fix-tests-on-i686.patch		\
   %D%/packages/patches/gd-brect-bounds.patch			\
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index e62402a09e..36307698a8 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -321,6 +321,10 @@ (define* (cross-gcc target
         (append
          (origin-patches (package-source xgcc))
          (append (cond
+                  ((version>=? (package-version xgcc) "13.0")
+                   (search-patches "gcc-13-cross-system-header-dir.patch"
+                                   "gcc-12-cross-environment-variables.patch"
+                                   "gcc-cross-gxx-include-dir.patch"))
                   ((version>=? (package-version xgcc) "12.0")
                    (search-patches "gcc-12-cross-environment-variables.patch"
                                    "gcc-cross-gxx-include-dir.patch"))
diff --git a/gnu/packages/patches/gcc-13-cross-system-header-dir.patch b/gnu/packages/patches/gcc-13-cross-system-header-dir.patch
new file mode 100644
index 0000000000..75f80ea9d2
--- /dev/null
+++ b/gnu/packages/patches/gcc-13-cross-system-header-dir.patch
@@ -0,0 +1,32 @@
+From 8b001f38cc713190642194b55e02a56346f51494 Mon Sep 17 00:00:00 2001
+From: Jean-Pierre De Jesus DIAZ <jean <at> foundation.xyz>
+Date: Fri, 12 Apr 2024 12:18:24 +0200
+Subject: [PATCH] Fix CROSS_SYSTEM_HEADER_DIR value for Guix.
+
+* gcc/Makefile.in (CROSS_SYSTEM_HEADER_DIR): Always use default value.
+---
+ gcc/Makefile.in | 6 +-----
+ 1 file changed, 1 insertion(+), 5 deletions(-)
+
+diff --git a/gcc/Makefile.in b/gcc/Makefile.in
+index 775aaa1b3c4..06d192fa9ed 100644
+--- a/gcc/Makefile.in
++++ b/gcc/Makefile.in
+@@ -532,11 +532,7 @@ LINKER_PLUGIN_API_H = $(srcdir)/../include/plugin-api.h
+ # Default native SYSTEM_HEADER_DIR, to be overridden by targets.
+ NATIVE_SYSTEM_HEADER_DIR = @NATIVE_SYSTEM_HEADER_DIR@
+ # Default cross SYSTEM_HEADER_DIR, to be overridden by targets.
+-ifeq (@includedir@,$(prefix)/include)
+-  CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
+-else
+-  CROSS_SYSTEM_HEADER_DIR = @includedir@
+-endif
++CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
+ 
+ # autoconf sets SYSTEM_HEADER_DIR to one of the above.
+ # Purge it of unnecessary internal relative paths
+
+base-commit: c891d8dc23e1a46ad9f3e757d09e57b500d40044
+-- 
+2.41.0
+
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#70351; Package guix-patches. (Fri, 12 Apr 2024 10:54:06 GMT) Full text and rfc822 format available.

Message #17 received at 70351 <at> debbugs.gnu.org (full text, mbox):

From: Jean-Pierre De Jesus DIAZ <jean <at> foundation.xyz>
To: 70351 <at> debbugs.gnu.org
Cc: Jean-Pierre De Jesus DIAZ <jean <at> foundation.xyz>
Subject: [PATCH 3/3] gnu: Add gcc-cross-x86_64-w64-mingw32-toolchain-13.
Date: Fri, 12 Apr 2024 12:53:02 +0200
* gnu/packages/cross-toolchain.scm
(gcc-cross-x86_64-w64-mingw32-toolchain-13): New variable.

Change-Id: I64fbce5d4af30c9c5df2faf61d3243fcf6dfbf5b
---
 gnu/packages/cross-toolchain.scm | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gnu/packages/cross-toolchain.scm b/gnu/packages/cross-toolchain.scm
index 5072462cbb..d0dbb4e1b8 100644
--- a/gnu/packages/cross-toolchain.scm
+++ b/gnu/packages/cross-toolchain.scm
@@ -18,6 +18,7 @@
 
 (define-module (gnu packages cross-toolchain)
   #:use-module (gnu packages cross-base)
+  #:use-module (gnu packages gcc)
   #:use-module (guix packages))
 
 ;;; Commentary:
@@ -41,5 +42,9 @@ (define-public gcc-cross-i686-w64-mingw32-toolchain
 (define-public gcc-cross-or1k-elf-toolchain
   (cross-gcc-toolchain "or1k-elf"))
 
+(define-public gcc-cross-x86_64-w64-mingw32-toolchain-13
+  (cross-gcc-toolchain "x86_64-w64-mingw32"
+                       #:base-gcc gcc-13))
+
 (define-public gcc-cross-x86_64-w64-mingw32-toolchain
   (cross-gcc-toolchain "x86_64-w64-mingw32"))
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#70351; Package guix-patches. (Fri, 12 Apr 2024 11:11:03 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#70351; Package guix-patches. (Fri, 12 Apr 2024 11:24:01 GMT) Full text and rfc822 format available.

Message #23 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jean-Pierre De Jesus Diaz <jean <at> foundation.xyz>
To: guix-patches <at> gnu.org
Subject: Re: [PATCH 0/3] gnu: cross-gcc: Support GCC 13.
Date: Fri, 12 Apr 2024 11:22:59 +0000
This patch series fixes the build of cross compilers for GCC 13,
first a patch was avoided for GCC 13 as it is not needed anymore
and a patch was added to fix compilation as in GCC 13 the way
that --includedir and --with-native-system-header-dir changed
the way it works and assumed that --includedir is where the
system headers are installed.

This fixes the issue: <https://issues.guix.gnu.org/69913>.

(Sent again the cover letter since I forgot to :w it seems).

On Fri, Apr 12, 2024 at 10:49 AM Jean-Pierre De Jesus DIAZ
<jean <at> foundation.xyz> wrote:
>
> *** BLURB HERE ***
>
> Jean-Pierre De Jesus DIAZ (3):
>   gnu: cross-gcc-patches: Avoid patch for GCC 13+.
>   gnu: cross-gcc: Add patch for GCC 13.
>   gnu: Add gcc-cross-x86_64-w64-mingw32-toolchain-13.
>
>  gnu/local.mk                                  |  1 +
>  gnu/packages/cross-base.scm                   |  8 ++++-
>  gnu/packages/cross-toolchain.scm              |  5 +++
>  .../gcc-13-cross-system-header-dir.patch      | 32 +++++++++++++++++++
>  4 files changed, 45 insertions(+), 1 deletion(-)
>  create mode 100644 gnu/packages/patches/gcc-13-cross-system-header-dir.patch
>
>
> base-commit: 4e7337536ba41e888a601c92fada8a4adca9d2c6
> --
> 2.41.0
>




Reply sent to Christopher Baines <mail <at> cbaines.net>:
You have taken responsibility. (Mon, 15 Apr 2024 09:42:03 GMT) Full text and rfc822 format available.

Notification sent to Jean-Pierre De Jesus DIAZ <jean <at> foundation.xyz>:
bug acknowledged by developer. (Mon, 15 Apr 2024 09:42:04 GMT) Full text and rfc822 format available.

Message #28 received at 70351-done <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Jean-Pierre De Jesus DIAZ <jean <at> foundation.xyz>
Cc: 70351-done <at> debbugs.gnu.org
Subject: Re: [bug#70351] [PATCH 0/3] gnu: cross-gcc: Support GCC 13.
Date: Mon, 15 Apr 2024 10:41:28 +0100
[Message part 1 (text/plain, inline)]
Jean-Pierre De Jesus DIAZ <jean <at> foundation.xyz> writes:

> This patch series fixes the build of cross compilers for GCC 13,
> first a patch was avoided for GCC 13 as it is not needed anymore
> and a patch was added to fix compilation as in GCC 13 the way
> that --includedir and --with-native-system-header-dir changed
> the way it works and assumed that --includedir is where the
> system headers are installed.
>
> This fixes the issue: <https://issues.guix.gnu.org/69913>.
>
> (Sent again the cover letter since I forgot to :w it seems).
>
> Jean-Pierre De Jesus DIAZ (3):
>   gnu: cross-gcc-patches: Avoid patch for GCC 13+.
>   gnu: cross-gcc: Add patch for GCC 13.
>   gnu: Add gcc-cross-x86_64-w64-mingw32-toolchain-13.

Looks good to me, I've pushed these patches to master as
4e7c3867ad30d4be761666fe311de90b7b4bd5f9.

Chris
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 13 May 2024 11:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 3 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.