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.
This commit is contained in:
fanquake
2023-06-14 16:58:44 +01:00
parent ce54330cf6
commit 001412a4d2
2 changed files with 46 additions and 17 deletions

View File

@ -91,7 +91,7 @@ chain for " target " development."))
(home-page (package-home-page xgcc)) (home-page (package-home-page xgcc))
(license (package-license xgcc))))) (license (package-license xgcc)))))
(define base-gcc gcc-10) (define base-gcc gcc-12)
(define base-linux-kernel-headers linux-libre-headers-6.1) (define base-linux-kernel-headers linux-libre-headers-6.1)
(define* (make-bitcoin-cross-toolchain target (define* (make-bitcoin-cross-toolchain target
@ -505,9 +505,6 @@ inspecting signatures in Mach-O binaries.")
automake automake
pkg-config pkg-config
bison bison
;; Native GCC 10 toolchain
gcc-toolchain-10
(list gcc-toolchain-10 "static")
;; Scripting ;; Scripting
python-minimal ;; (3.10) python-minimal ;; (3.10)
;; Git ;; Git
@ -516,14 +513,26 @@ inspecting signatures in Mach-O binaries.")
python-lief) python-lief)
(let ((target (getenv "HOST"))) (let ((target (getenv "HOST")))
(cond ((string-suffix? "-mingw32" target) (cond ((string-suffix? "-mingw32" target)
;; Windows (list ;; Native GCC 12 toolchain
(list zip gcc-toolchain-12
(list gcc-toolchain-12 "static")
zip
(make-mingw-pthreads-cross-toolchain "x86_64-w64-mingw32") (make-mingw-pthreads-cross-toolchain "x86_64-w64-mingw32")
nsis-x86_64 nsis-x86_64
nss-certs nss-certs
osslsigncode)) osslsigncode))
((string-contains target "-linux-") ((string-contains target "-linux-")
(list (make-bitcoin-cross-toolchain target))) (list ;; Native GCC 12 toolchain
gcc-toolchain-12
(list gcc-toolchain-12 "static")
(make-bitcoin-cross-toolchain target)))
((string-contains target "darwin") ((string-contains target "darwin")
(list clang-toolchain-17 binutils cmake-minimal python-signapple zip)) (list ;; Native GCC 10 toolchain
gcc-toolchain-10
(list gcc-toolchain-10 "static")
binutils
clang-toolchain-17
cmake-minimal
python-signapple
zip))
(else '()))))) (else '())))))

View File

@ -168,12 +168,17 @@ Based on a patch originally by Claude Heiland-Allen <claude@mathr.co.uk>
default: default:
gcc_unreachable (); gcc_unreachable ();
} }
--- a/gcc/config/i386/i386.c --- a/gcc/config/i386/i386.cc
+++ b/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.cc
@@ -4981,13 +4981,13 @@ @@ -5418,17 +5418,15 @@ ix86_get_ssemov (rtx *operands, unsigned size,
switch (type)
{ {
case opcode_int: case opcode_int:
if (scalar_mode == E_HFmode)
- opcode = (misaligned_p
- ? (TARGET_AVX512BW ? "vmovdqu16" : "vmovdqu64")
- : "vmovdqa64");
+ opcode = TARGET_AVX512BW ? "vmovdqu16" : "vmovdqu64";
else
- opcode = misaligned_p ? "vmovdqu32" : "vmovdqa32"; - opcode = misaligned_p ? "vmovdqu32" : "vmovdqa32";
+ opcode = "vmovdqu32"; + opcode = "vmovdqu32";
break; break;
@ -187,9 +192,24 @@ Based on a patch originally by Claude Heiland-Allen <claude@mathr.co.uk>
break; break;
} }
} }
@@ -4996,16 +4996,16 @@ @@ -5438,29 +5436,21 @@ ix86_get_ssemov (rtx *operands, unsigned size,
switch (scalar_mode)
{ {
case E_HFmode:
if (evex_reg_p)
- opcode = (misaligned_p
- ? (TARGET_AVX512BW
- ? "vmovdqu16"
- : "vmovdqu64")
- : "vmovdqa64");
+ opcode = TARGET_AVX512BW ? "vmovdqu16" : "vmovdqu64";
else
- opcode = (misaligned_p
- ? (TARGET_AVX512BW
- ? "vmovdqu16"
- : "%vmovdqu")
- : "%vmovdqa");
+ opcode = TARGET_AVX512BW ? "vmovdqu16" : "%vmovdqu";
break;
case E_SFmode: case E_SFmode:
- opcode = misaligned_p ? "%vmovups" : "%vmovaps"; - opcode = misaligned_p ? "%vmovups" : "%vmovaps";
+ opcode = "%vmovups"; + opcode = "%vmovups";
@ -208,7 +228,7 @@ Based on a patch originally by Claude Heiland-Allen <claude@mathr.co.uk>
break; break;
default: default:
gcc_unreachable (); gcc_unreachable ();
@@ -5017,48 +5017,32 @@ @@ -5472,48 +5462,32 @@ ix86_get_ssemov (rtx *operands, unsigned size,
{ {
case E_QImode: case E_QImode:
if (evex_reg_p) if (evex_reg_p)