* [bug#70351] [PATCH 1/3] gnu: cross-gcc-patches: Avoid patch for GCC 13+.
2024-04-12 10:49 [bug#70351] [PATCH 0/3] gnu: cross-gcc: Support GCC 13 Jean-Pierre De Jesus DIAZ
@ 2024-04-12 10:53 ` Jean-Pierre De Jesus DIAZ
2024-04-12 10:53 ` [bug#70351] [PATCH 2/3] gnu: cross-gcc: Add patch for GCC 13 Jean-Pierre De Jesus DIAZ
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Jean-Pierre De Jesus DIAZ @ 2024-04-12 10:53 UTC (permalink / raw)
To: 70351; +Cc: Jean-Pierre De Jesus DIAZ, Ludovic Courtès
* 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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [bug#70351] [PATCH 2/3] gnu: cross-gcc: Add patch for GCC 13.
2024-04-12 10:49 [bug#70351] [PATCH 0/3] gnu: cross-gcc: Support GCC 13 Jean-Pierre De Jesus DIAZ
2024-04-12 10:53 ` [bug#70351] [PATCH 1/3] gnu: cross-gcc-patches: Avoid patch for GCC 13+ Jean-Pierre De Jesus DIAZ
@ 2024-04-12 10:53 ` Jean-Pierre De Jesus DIAZ
2024-04-12 10:53 ` [bug#70351] [PATCH 3/3] gnu: Add gcc-cross-x86_64-w64-mingw32-toolchain-13 Jean-Pierre De Jesus DIAZ
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Jean-Pierre De Jesus DIAZ @ 2024-04-12 10:53 UTC (permalink / raw)
To: 70351; +Cc: Jean-Pierre De Jesus DIAZ, Ludovic Courtès
* 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 +++
| 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"))
--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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [bug#70351] [PATCH 3/3] gnu: Add gcc-cross-x86_64-w64-mingw32-toolchain-13.
2024-04-12 10:49 [bug#70351] [PATCH 0/3] gnu: cross-gcc: Support GCC 13 Jean-Pierre De Jesus DIAZ
2024-04-12 10:53 ` [bug#70351] [PATCH 1/3] gnu: cross-gcc-patches: Avoid patch for GCC 13+ Jean-Pierre De Jesus DIAZ
2024-04-12 10:53 ` [bug#70351] [PATCH 2/3] gnu: cross-gcc: Add patch for GCC 13 Jean-Pierre De Jesus DIAZ
@ 2024-04-12 10:53 ` Jean-Pierre De Jesus DIAZ
2024-04-12 11:22 ` [bug#70351] [PATCH 0/3] gnu: cross-gcc: Support GCC 13 Jean-Pierre De Jesus Diaz
2024-04-15 9:41 ` bug#70351: " Christopher Baines
4 siblings, 0 replies; 6+ messages in thread
From: Jean-Pierre De Jesus DIAZ @ 2024-04-12 10:53 UTC (permalink / raw)
To: 70351; +Cc: Jean-Pierre De Jesus DIAZ
* 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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [bug#70351] [PATCH 0/3] gnu: cross-gcc: Support GCC 13.
2024-04-12 10:49 [bug#70351] [PATCH 0/3] gnu: cross-gcc: Support GCC 13 Jean-Pierre De Jesus DIAZ
` (2 preceding siblings ...)
2024-04-12 10:53 ` [bug#70351] [PATCH 3/3] gnu: Add gcc-cross-x86_64-w64-mingw32-toolchain-13 Jean-Pierre De Jesus DIAZ
@ 2024-04-12 11:22 ` Jean-Pierre De Jesus Diaz
2024-04-15 9:41 ` bug#70351: " Christopher Baines
4 siblings, 0 replies; 6+ messages in thread
From: Jean-Pierre De Jesus Diaz @ 2024-04-12 11:22 UTC (permalink / raw)
To: 70351
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:
>
> *** 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
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#70351: [PATCH 0/3] gnu: cross-gcc: Support GCC 13.
2024-04-12 10:49 [bug#70351] [PATCH 0/3] gnu: cross-gcc: Support GCC 13 Jean-Pierre De Jesus DIAZ
` (3 preceding siblings ...)
2024-04-12 11:22 ` [bug#70351] [PATCH 0/3] gnu: cross-gcc: Support GCC 13 Jean-Pierre De Jesus Diaz
@ 2024-04-15 9:41 ` Christopher Baines
4 siblings, 0 replies; 6+ messages in thread
From: Christopher Baines @ 2024-04-15 9:41 UTC (permalink / raw)
To: Jean-Pierre De Jesus DIAZ; +Cc: 70351-done
[-- Attachment #1: Type: text/plain, Size: 834 bytes --]
Jean-Pierre De Jesus DIAZ <jean@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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread