summary refs log tree commit diff
path: root/gnu/packages/gcc.scm
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2023-05-09 09:40:58 +0300
committerEfraim Flashner <efraim@flashner.co.il>2023-05-09 09:52:24 +0300
commit1bb29cd49c759a9af62b3d5c51ebd212bd3596c7 (patch)
tree71c6a62a49c5100cc14443a318835482b2f929c5 /gnu/packages/gcc.scm
parent23d4ebdaac631842cd0101fd5d3ae0c08e2fcd99 (diff)
downloadguix-1bb29cd49c759a9af62b3d5c51ebd212bd3596c7.tar.gz
gnu: gcc: Update cpu tuning architectures.
* gnu/packages/gcc.scm (%gcc-7.5-armhf-micro-architectures): Add missing
micro-architecture.
(%gcc-10-armhf-micro-architectures): Adjust accordingly.
(%gcc-11-aarch64-micro-architectures): Add missing micro-architecture.
(%gcc-12-aarch64-micro-architectures, %gcc-12-armhf-micro-architectures,
%gcc-12-x86_64-micro-architectures, %gcc-13-aarch64-micro-architectures,
%gcc-13-armhf-micro-architectures, %gcc-13-x86_64-micro-architectures):
New variables.
(gcc-12)[properties]: Use new compiler-cpu-architectures.
* guix/cpu.scm (cpu->gcc-architecture): Update entries for Intel, AMD,
x86_64 fallback and aarch64.
Diffstat (limited to 'gnu/packages/gcc.scm')
-rw-r--r--gnu/packages/gcc.scm45
1 files changed, 38 insertions, 7 deletions
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index 4984e188ea..47fb443155 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -556,17 +556,17 @@ Go.  It also includes runtime support libraries for these languages.")
        ,@(package-inputs gcc-4.7)))))
 
 (define %gcc-7.5-aarch64-micro-architectures
-  ;; Suitable '-march' values for GCC 7.5.
+  ;; Suitable '-march' values for GCC 7.5 (info "(gcc) AArch64 Options").
   ;; TODO: Allow dynamically adding feature flags.
   '("armv8-a" "armv8.1-a" "armv8.2-a" "armv8.3-a"))
 
 (define %gcc-7.5-armhf-micro-architectures
-  ;; Suitable '-march' values for GCC 7.5.
+  ;; Suitable '-march' values for GCC 7.5 (info "(gcc) ARM Options").
   ;; TODO: Allow dynamically adding feature flags.
   '("armv7" "armv7-a" "armv7-m" "armv7-r" "armv7e-m" "armv7ve"
     "armv8-a" "armv8-a+crc" "armv8.1-a" "armv8.1-a+crc"
     "armv8-m.base" "armv8-m.main" "armv8-m.main+dsp"
-    "iwmmxt" "iwmmxt2"))
+    "iwmmxt" "iwmmxt2" "armv8.2-a"))
 
 (define %gcc-7.5-x86_64-micro-architectures
   ;; Suitable '-march' values for GCC 7.5 (info "(gcc) x86 Options").
@@ -589,7 +589,7 @@ Go.  It also includes runtime support libraries for these languages.")
   ;; Suitable '-march' values for GCC 10.
   ;; TODO: Allow dynamically adding feature flags.
   (append %gcc-7.5-armhf-micro-architectures
-          '("armv8.2-a" "armv8.3-a" "armv8.4-a" "armv8.5-a" "armv8.6-a"
+          '("armv8.3-a" "armv8.4-a" "armv8.5-a" "armv8.6-a"
             "armv8-r" "armv8.1-m.main")))
 
 (define %gcc-10-x86_64-micro-architectures
@@ -603,7 +603,8 @@ Go.  It also includes runtime support libraries for these languages.")
 
 (define %gcc-11-aarch64-micro-architectures
   ;; Suitable '-march' values for GCC 11.
-  %gcc-10-aarch64-micro-architectures)            ;unchanged
+  (append %gcc-10-aarch64-micro-architectures
+          '("armv8-r")))
 
 (define %gcc-11-armhf-micro-architectures
   %gcc-10-armhf-micro-architectures)
@@ -615,6 +616,31 @@ Go.  It also includes runtime support libraries for these languages.")
 
             "btver1" "btver2")))                  ;AMD
 
+;; Suitable '-march' values for GCC 12.
+(define %gcc-12-aarch64-micro-architectures
+  (append %gcc-11-aarch64-micro-architectures
+          '("armv8.7-a" "armv8.8-a" "armv9-a")))
+
+(define %gcc-12-armhf-micro-architectures
+  (append %gcc-11-armhf-micro-architectures
+          '("armv9-a")))
+
+(define %gcc-12-x86_64-micro-architectures
+  (append %gcc-11-x86_64-micro-architectures
+          '("znver4")))                           ;AMD
+
+;; Suitable '-march' values for GCC 13.
+(define %gcc-13-aarch64-micro-architectures
+  (append %gcc-12-aarch64-micro-architectures
+          '("armv9.1-a" "armv9.2-a" "armv9.3-a")))
+
+(define %gcc-13-armhf-micro-architectures
+  %gcc-12-armhf-micro-architectures)
+
+(define %gcc-13-x86_64-micro-architectures
+  (append %gcc-12-x86_64-micro-architectures
+          '("graniterapids")))                    ;Intel
+
 (define-public gcc-7
   (package
     (inherit gcc-6)
@@ -735,7 +761,6 @@ It also includes runtime support libraries for these languages.")
 (define-public gcc-12
   (package
     (inherit gcc-11)
-    ;; Note: 'compiler-cpu-architectures' is unchanged compared to GCC 11.
     (version "12.3.0")
     (source (origin
               (method url-fetch)
@@ -747,7 +772,13 @@ It also includes runtime support libraries for these languages.")
               (patches (search-patches "gcc-12-strmov-store-file-names.patch"
                                        "gcc-5.0-libvtv-runpath.patch"))
               (modules '((guix build utils)))
-              (snippet gcc-canadian-cross-objdump-snippet)))))
+              (snippet gcc-canadian-cross-objdump-snippet)))
+   (properties
+    `((compiler-cpu-architectures
+       ("aarch64" ,@%gcc-12-aarch64-micro-architectures)
+       ("armhf" ,@%gcc-12-armhf-micro-architectures)
+       ("x86_64" ,@%gcc-12-x86_64-micro-architectures))
+      ,@(package-properties gcc-11)))))
 
 
 ;; Note: When changing the default gcc version, update