Skip to content

Commit 001412a

Browse files
committed
guix: use GCC 12.3.0
Retain native GCC 10 toolchain for macOS, to prevent compile failures in native tools (this will be removed entirely when we tansition to LLD). Update the vmov-alignment patch, for changes in GCC 12.
1 parent ce54330 commit 001412a

File tree

2 files changed

+46
-17
lines changed

2 files changed

+46
-17
lines changed

contrib/guix/manifest.scm

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ chain for " target " development."))
9191
(home-page (package-home-page xgcc))
9292
(license (package-license xgcc)))))
9393

94-
(define base-gcc gcc-10)
94+
(define base-gcc gcc-12)
9595
(define base-linux-kernel-headers linux-libre-headers-6.1)
9696

9797
(define* (make-bitcoin-cross-toolchain target
@@ -505,9 +505,6 @@ inspecting signatures in Mach-O binaries.")
505505
automake
506506
pkg-config
507507
bison
508-
;; Native GCC 10 toolchain
509-
gcc-toolchain-10
510-
(list gcc-toolchain-10 "static")
511508
;; Scripting
512509
python-minimal ;; (3.10)
513510
;; Git
@@ -516,14 +513,26 @@ inspecting signatures in Mach-O binaries.")
516513
python-lief)
517514
(let ((target (getenv "HOST")))
518515
(cond ((string-suffix? "-mingw32" target)
519-
;; Windows
520-
(list zip
516+
(list ;; Native GCC 12 toolchain
517+
gcc-toolchain-12
518+
(list gcc-toolchain-12 "static")
519+
zip
521520
(make-mingw-pthreads-cross-toolchain "x86_64-w64-mingw32")
522521
nsis-x86_64
523522
nss-certs
524523
osslsigncode))
525524
((string-contains target "-linux-")
526-
(list (make-bitcoin-cross-toolchain target)))
525+
(list ;; Native GCC 12 toolchain
526+
gcc-toolchain-12
527+
(list gcc-toolchain-12 "static")
528+
(make-bitcoin-cross-toolchain target)))
527529
((string-contains target "darwin")
528-
(list clang-toolchain-17 binutils cmake-minimal python-signapple zip))
530+
(list ;; Native GCC 10 toolchain
531+
gcc-toolchain-10
532+
(list gcc-toolchain-10 "static")
533+
binutils
534+
clang-toolchain-17
535+
cmake-minimal
536+
python-signapple
537+
zip))
529538
(else '())))))

contrib/guix/patches/vmov-alignment.patch

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -168,14 +168,19 @@ Based on a patch originally by Claude Heiland-Allen <claude@mathr.co.uk>
168168
default:
169169
gcc_unreachable ();
170170
}
171-
--- a/gcc/config/i386/i386.c
172-
+++ b/gcc/config/i386/i386.c
173-
@@ -4981,13 +4981,13 @@
174-
switch (type)
171+
--- a/gcc/config/i386/i386.cc
172+
+++ b/gcc/config/i386/i386.cc
173+
@@ -5418,17 +5418,15 @@ ix86_get_ssemov (rtx *operands, unsigned size,
175174
{
176175
case opcode_int:
177-
- opcode = misaligned_p ? "vmovdqu32" : "vmovdqa32";
178-
+ opcode = "vmovdqu32";
176+
if (scalar_mode == E_HFmode)
177+
- opcode = (misaligned_p
178+
- ? (TARGET_AVX512BW ? "vmovdqu16" : "vmovdqu64")
179+
- : "vmovdqa64");
180+
+ opcode = TARGET_AVX512BW ? "vmovdqu16" : "vmovdqu64";
181+
else
182+
- opcode = misaligned_p ? "vmovdqu32" : "vmovdqa32";
183+
+ opcode = "vmovdqu32";
179184
break;
180185
case opcode_float:
181186
- opcode = misaligned_p ? "vmovups" : "vmovaps";
@@ -187,9 +192,24 @@ Based on a patch originally by Claude Heiland-Allen <claude@mathr.co.uk>
187192
break;
188193
}
189194
}
190-
@@ -4996,16 +4996,16 @@
191-
switch (scalar_mode)
195+
@@ -5438,29 +5436,21 @@ ix86_get_ssemov (rtx *operands, unsigned size,
192196
{
197+
case E_HFmode:
198+
if (evex_reg_p)
199+
- opcode = (misaligned_p
200+
- ? (TARGET_AVX512BW
201+
- ? "vmovdqu16"
202+
- : "vmovdqu64")
203+
- : "vmovdqa64");
204+
+ opcode = TARGET_AVX512BW ? "vmovdqu16" : "vmovdqu64";
205+
else
206+
- opcode = (misaligned_p
207+
- ? (TARGET_AVX512BW
208+
- ? "vmovdqu16"
209+
- : "%vmovdqu")
210+
- : "%vmovdqa");
211+
+ opcode = TARGET_AVX512BW ? "vmovdqu16" : "%vmovdqu";
212+
break;
193213
case E_SFmode:
194214
- opcode = misaligned_p ? "%vmovups" : "%vmovaps";
195215
+ opcode = "%vmovups";
@@ -208,7 +228,7 @@ Based on a patch originally by Claude Heiland-Allen <claude@mathr.co.uk>
208228
break;
209229
default:
210230
gcc_unreachable ();
211-
@@ -5017,48 +5017,32 @@
231+
@@ -5472,48 +5462,32 @@ ix86_get_ssemov (rtx *operands, unsigned size,
212232
{
213233
case E_QImode:
214234
if (evex_reg_p)

0 commit comments

Comments
 (0)