[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#52283] [PATCH v2 02/12] gnu: gcc: Add 'compiler-cpu-architectures'
From: |
Ludovic Courtès |
Subject: |
[bug#52283] [PATCH v2 02/12] gnu: gcc: Add 'compiler-cpu-architectures' property. |
Date: |
Thu, 16 Dec 2021 18:58:17 +0100 |
* gnu/packages/gcc.scm (%gcc-7.5-x86_64-micro-architectures)
(%gcc-10-x86_64-micro-architectures): New variables.
(gcc-7, gcc-10): Add 'properties' field.
* gnu/packages/commencement.scm (make-gcc-toolchain): Likewise.
---
gnu/packages/commencement.scm | 1 +
gnu/packages/gcc.scm | 31 +++++++++++++++++++++++++++++--
2 files changed, 30 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index e570a95b04..8c81098bc0 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -3768,6 +3768,7 @@ (define* (make-gcc-toolchain gcc
(append (package-search-paths gcc)
(package-search-paths libc)))
+ (properties (package-properties gcc)) ;for 'compiler-cpu-architectures'
(license (package-license gcc))
(synopsis "Complete GCC tool chain for C/C++ development")
(description
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index f526680f56..efa0baeaa1 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -525,6 +525,27 @@ (define-public gcc-6
,@(package-inputs gcc-4.7)))))
+(define %gcc-7.5-x86_64-micro-architectures
+ ;; Suitable '-march' values for GCC 7.5 (info "(gcc) x86 Options").
+ '("core2" "nehalem" "westmere" "sandybridge" "ivybridge"
+ "haswell" "broadwell" "skylake" "bonnell" "silvermont"
+ "knl" "skylake-avx512"
+
+ "k8" "k8-sse3" "barcelona"
+ "bdver1" "bdver2" "bdver3" "bdver4"
+ "znver1"
+ "btver1" "btver2" "geode"))
+
+(define %gcc-10-x86_64-micro-architectures
+ ;; Suitable '-march' values for GCC 10.
+ (append %gcc-7.5-x86_64-micro-architectures
+ '("goldmont" "goldmont-plus" "tremont"
+ "knm" "cannonlake" "icelake-client" "icelake-server"
+ "cascadelake" "cooperlake" "tigerlake"
+
+ "znver2" "znver3")))
+
+
(define-public gcc-7
(package
(inherit gcc-6)
@@ -542,7 +563,10 @@ (define-public gcc-7
(description
"GCC is the GNU Compiler Collection. It provides compiler front-ends
for several languages, including C, C++, Objective-C, Fortran, Ada, and Go.
-It also includes runtime support libraries for these languages.")))
+It also includes runtime support libraries for these languages.")
+ (properties
+ `((compiler-cpu-architectures
+ ("x86_64" ,@%gcc-7.5-x86_64-micro-architectures))))))
(define-public gcc-8
(package
@@ -592,7 +616,10 @@ (define-public gcc-10
(patches (search-patches "gcc-9-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
+ ("x86_64" ,@%gcc-10-x86_64-micro-architectures))))))
(define-public gcc-11
(package
--
2.33.0
[bug#52283] [PATCH 00/10] Tuning packages for CPU micro-architectures, Ludovic Courtès, 2021/12/04
[bug#52283] [PATCH 00/10] Tuning packages for CPU micro-architectures, Ludovic Courtès, 2021/12/07
- [bug#52283] [PATCH v2 00/12] Tuning packages for CPU micro-architectures, Ludovic Courtès, 2021/12/16
- [bug#52283] [PATCH v2 02/12] gnu: gcc: Add 'compiler-cpu-architectures' property.,
Ludovic Courtès <=
- [bug#52283] [PATCH v2 04/12] transformations: Add '--tune'., Ludovic Courtès, 2021/12/16
- [bug#52283] [PATCH v2 01/12] Add (guix cpu)., Ludovic Courtès, 2021/12/16
- [bug#52283] [PATCH v2 03/12] gnu: clang: Add 'compiler-cpu-architectures' property., Ludovic Courtès, 2021/12/16
- [bug#52283] [PATCH v2 05/12] ci: Add extra jobs for tunable packages., Ludovic Courtès, 2021/12/16
- [bug#52283] [PATCH v2 06/12] gnu: Add eigen-benchmarks., Ludovic Courtès, 2021/12/16
- [bug#52283] [PATCH v2 09/12] gnu: ceres-solver: Mark as tunable., Ludovic Courtès, 2021/12/16
- [bug#52283] [PATCH v2 07/12] gnu: Add xsimd-benchmark., Ludovic Courtès, 2021/12/16
- [bug#52283] [PATCH v2 08/12] gnu: Add xtensor-benchmark., Ludovic Courtès, 2021/12/16
- [bug#52283] [PATCH v2 11/12] gnu: libfive: Mark as tunable., Ludovic Courtès, 2021/12/16
- [bug#52283] [PATCH v2 12/12] gnu: prusa-slicer: Mark as tunable., Ludovic Courtès, 2021/12/16