diff options
author | Ludovic Courtès <ludo@gnu.org> | 2021-12-16 16:49:34 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2022-01-01 15:23:24 +0100 |
commit | 2576e2019d2f5049ad3dc51404c7e991af45d1d6 (patch) | |
tree | 52c46df1ec2d1938dc423e4655899778c794172a /gnu/packages/gcc.scm | |
parent | a644f88d28ff9914cd3147ea085804f230acf499 (diff) | |
download | guix-2576e2019d2f5049ad3dc51404c7e991af45d1d6.tar.gz guix-2576e2019d2f5049ad3dc51404c7e991af45d1d6.zip |
gnu: gcc: Add 'compiler-cpu-architectures' property.
* 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.
Diffstat (limited to 'gnu/packages/gcc.scm')
-rw-r--r-- | gnu/packages/gcc.scm | 31 |
1 files changed, 29 insertions, 2 deletions
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 @@ Go. It also includes runtime support libraries for these languages.") ,@(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 @@ Go. It also includes runtime support libraries for these languages.") (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 @@ It also includes runtime support libraries for these languages."))) (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 |