[PATCH 0/3] gnu: cross-gcc: Support GCC 13.

  • Done
  • quality assurance status badge
Details
2 participants
  • Jean-Pierre De Jesus DIAZ
  • Christopher Baines
Owner
unassigned
Submitted by
Jean-Pierre De Jesus DIAZ
Severity
normal
J
J
Jean-Pierre De Jesus DIAZ wrote on 12 Apr 12:49 +0200
(address . guix-patches@gnu.org)(name . Jean-Pierre De Jesus DIAZ)(address . jean@foundation.xyz)
cover.1712918802.git.jean@foundation.xyz
*** 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
J
J
Jean-Pierre De Jesus DIAZ wrote on 12 Apr 12:53 +0200
[PATCH 1/3] gnu: cross-gcc-patches: Avoid patch for GCC 13+.
(address . 70351@debbugs.gnu.org)(name . Jean-Pierre De Jesus DIAZ)(address . jean@foundation.xyz)
ff78fca79ba574030ca78880a5b53bf002742b49.1712918802.git.jean@foundation.xyz
* 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(-)

Toggle diff (17 lines)
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
J
J
Jean-Pierre De Jesus DIAZ wrote on 12 Apr 12:53 +0200
[PATCH 2/3] gnu: cross-gcc: Add patch for GCC 13.
(address . 70351@debbugs.gnu.org)(name . Jean-Pierre De Jesus DIAZ)(address . jean@foundation.xyz)
c85427c66bc0eaea3d0f30064de77b7c29746e38.1712918802.git.jean@foundation.xyz
* 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

Toggle diff (67 lines)
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@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
J
J
Jean-Pierre De Jesus DIAZ wrote on 12 Apr 12:53 +0200
[PATCH 3/3] gnu: Add gcc-cross-x86_64-w64-mingw32-toolchain-13.
(address . 70351@debbugs.gnu.org)(name . Jean-Pierre De Jesus DIAZ)(address . jean@foundation.xyz)
caf1a2ce736a537fb52713c2f9607ca5ff6ac1b4.1712918802.git.jean@foundation.xyz
* 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(+)

Toggle diff (24 lines)
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
J
J
Jean-Pierre De Jesus Diaz wrote on 12 Apr 13:22 +0200
Re: [PATCH 0/3] gnu: cross-gcc: Support GCC 13.
(address . guix-patches@gnu.org)
CAG1gdUq=JY9Ce3cqm_pG8F166m9P-Y6ntPCsMFmP8H-CR=8Qww@mail.gmail.com
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@foundation.xyz> wrote:
Toggle quote (20 lines)
>
> *** 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
>
C
C
Christopher Baines wrote on 15 Apr 11:41 +0200
Re: [bug#70351] [PATCH 0/3] gnu: cross-gcc: Support GCC 13.
(name . Jean-Pierre De Jesus DIAZ)(address . jean@foundation.xyz)(address . 70351-done@debbugs.gnu.org)
8734rnyncn.fsf@cbaines.net
Jean-Pierre De Jesus DIAZ <jean@foundation.xyz> writes:

Toggle quote (16 lines)
> 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
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmYc9khfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9Xf/Ww//W+wvG+vSybBHIc0V2DCFCWaNyk+wNaDk
0UuwLCG0vOxsuIvJqBcNOPxjCDQXs/hu0TUxXmyjJFaC4dnPWIu7Ah1UfW+unh/+
v+y8NwgeF5JJf8KMsgPrKNQqgPQoI005AyhL+pdMCq3grNDwSfUafhfa1m2SP7Uu
Hi0lkyxYDxRUfVSwJErcSs+i67GXVn/9Ux3jAe9fOIwIWQlKUYK0CdBBx3E6hhYd
t2GVbSL+JftvqHAR5z3zGI7zNZQWfKpbDq2HJ/rte2HN/5QhnbRrzFV7QqS61HPu
FkEdm8HR6YpzNR+TNVVsnp+F5n1n/VdDVhu03pBB4ZKBxHWqDeolpPuoepO9vtM0
7uc4khevUI4pX2SuxgIIQr0c3P3k57PvnIsek50zRLjOoP13ikdgeX74ZR2otwxm
lgodVEN4r+/wmQoQXchhZNY97fGMNuZS34zDhQLJNNU/UhzDNrNJ/34rt7TjiXWJ
yEW+IMAr1unXnhD1GqUbjUp9WAHZj3nQoFaQURWDY+xwCdtfvZMEmmVn/IrolwrO
86cdq0oAW9YX+3TUKU1/mNuR5YgBTKD1kCTFj1uCh3wKntJwElxxbjMA7cSvpaZ6
Vn5fIHLdPn4MzAOb+PQ+/Tu6bVTWfhXdOP0hRM3iSt0zR0FwcHwyZxVbLMO2BAlZ
i1iSrrCywgg=
=7aw4
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 70351@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 70351
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch