[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/03: WIP: bootstrap: Add support for riscv64-linux.
From: |
guix-commits |
Subject: |
03/03: WIP: bootstrap: Add support for riscv64-linux. |
Date: |
Sat, 12 Jun 2021 16:32:10 -0400 (EDT) |
efraim pushed a commit to branch wip-riscv
in repository guix.
commit 4c61a03183f3ff1febfad589bc1bd4596fd952fd
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Sat Jun 12 23:23:43 2021 +0300
WIP: bootstrap: Add support for riscv64-linux.
On <INSERT_THE_PREVIOUS_COMMIT>
gnu: bootstrap-tarballs: Use guile-3.0 bootstrap tarball.
Run
./pre-inst-env guix build --target=riscv64-linux-gnu bootstrap-tarballs
Producing
/gnu/store/ia1jajiaiwd9wbyfql2xv0vzkmkr2k12-bootstrap-tarballs-0
With guix hash -rx
0w8jrk6cvax6br6qdxm70ay6ylgv2f4cjjkjp2f1vr6xqw5g07mv
* gnu/packages/bootstrap.scm (%bootstrap-executables): Add entries for
riscv64-linux.
(%bootstrap-guile-hash, %bootstrap-coreutils&co, %bootstrap-binutils,
%bootstrap-glibc, %bootstrap-gcc): Add entry for riscv64-linux.
* guix/packages.scm (%supported-systems): Add riscv64-linux.
(%cuirass-supported-systems): Remove riscv64-linux.
* m4/guix.m4: Add riscv64-linux as a supported system.
---
gnu/packages/bootstrap.scm | 45 ++++++++++++++++++++++++++++++++++++++++-----
guix/packages.scm | 4 ++--
m4/guix.m4 | 4 ++--
3 files changed, 44 insertions(+), 9 deletions(-)
diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index c598ced..091ffb2 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -133,18 +133,29 @@
("tar"
,(base32 "150c8948cz8r208g6qgn2dn4f4zs5kpgbpbg6bwag6yw42rapw2l"))
("xz"
- ,(base32 "0v5738idy9pqzcbrjdpxi5c6qs5m78zrpsydmrpx5cfcfzbkxzjh")))))
+ ,(base32 "0v5738idy9pqzcbrjdpxi5c6qs5m78zrpsydmrpx5cfcfzbkxzjh")))
+ ("riscv64-linux"
+ ("bash"
+ ,(base32 "0almlf73k6hbm495kzf4bw1rzsg5qddn7z2rf5l3d1xcapac2hj3"))
+ ("mkdir"
+ ,(base32 "0rg1amdcqfkplcy1608jignl8jq0wqzfkp430mwik3f62959gya6"))
+ ("tar"
+ ,(base32 "17d3x27qhiwk7h6ns0xrvbrq0frxz89mjjh2cdwx2rraq5x6wffm"))
+ ("xz"
+ ,(base32 "0nxn75xf386vdq3igmgm8gnyk4h4x0cm8jv71vlb2jvwxh0cyw1q")))))
(define %bootstrap-executable-base-urls
;; This is where the bootstrap executables come from.
'("https://git.savannah.gnu.org/cgit/guix.git/plain/gnu/packages/bootstrap/"
"https://alpha.gnu.org/gnu/guix/bootstrap/"
+ "http://flashner.co.il/guix/bootstrap/"
"http://lilypond.org/janneke/guix/"))
(define (bootstrap-executable-file-name system program)
"Return the FILE-NAME part of url where PROGRAM can be found for SYSTEM."
(match system
("powerpc64le-linux" (string-append system "/20210106/" program))
+ ("riscv64-linux" (string-append system "/20210606/bin/" program))
("i586-gnu" (string-append system "/20200326/" program))
(_ (string-append system "/" program
"?id=44f07d1dc6806e97c4e9ee3e6be883cc59dc666e"))))
@@ -347,6 +358,8 @@ or false to signal an error."
"/20200326/guile-static-stripped-2.0.14-i586-pc-gnu.tar.xz")
("powerpc64le-linux"
"/20210106/guile-static-stripped-2.0.14-powerpc64le-linux-gnu.tar.xz")
+ ("riscv64-linux"
+ "/20210606/guile-3.0.2.tar.xz")
(_
"/20131110/guile-2.0.9.tar.xz"))))
@@ -363,6 +376,8 @@ or false to signal an error."
(base32 "1mi3brl7l58aww34rawhvja84xc7l1b4hmwdmc36fp9q9mfx0lg5"))
("powerpc64le-linux"
(base32 "1rnyfz5q38jyvxddj617443bnnzql4vw0mxzqpj8wz48wx4bhbq0"))
+ ("riscv64-linux"
+ (base32 "12pqmhsbbp7hh9r1bjdl14l3a4q06plpz6dcks9dysb4czay8p9f"))
("aarch64-linux"
(base32 "1giy2aprjmn5fp9c4s9r125fljw4wv6ixy5739i5bffw4jgr0f9r"))
("i586-gnu"
@@ -419,8 +434,8 @@ or false to signal an error."
(lambda (p)
(format p "\
#!~a
-export GUILE_SYSTEM_PATH=~a/share/guile/2.0
-export GUILE_SYSTEM_COMPILED_PATH=~a/lib/guile/2.0/ccache
+export GUILE_SYSTEM_PATH=~a/share/guile/3.0
+export GUILE_SYSTEM_COMPILED_PATH=~a/lib/guile/3.0/ccache
exec -a \"~a0\" ~a \"~a@\"\n"
bash out out dollar guile-real dollar)))
(chmod guile #o555)
@@ -435,8 +450,8 @@ cd $out
~a -dc < $GUILE_TARBALL | ~a xv
# Use the bootstrap guile to create its own wrapper to set the load path.
-GUILE_SYSTEM_PATH=$out/share/guile/2.0 \
-GUILE_SYSTEM_COMPILED_PATH=$out/lib/guile/2.0/ccache \
+GUILE_SYSTEM_PATH=$out/share/guile/3.0 \
+GUILE_SYSTEM_COMPILED_PATH=$out/lib/guile/3.0/ccache \
$out/bin/guile -c ~s $out ~a
# Sanity check.
@@ -498,6 +513,8 @@ $out/bin/guile --version~%"
"/20170217/static-binaries.tar.xz")
("powerpc64le-linux"
"/20210106/static-binaries-0-powerpc64le-linux-gnu.tar.xz")
+ ("riscv64-linux"
+
"/20210606/static-binaries.tar.xz")
("i586-gnu"
"/20200326/static-binaries-0-i586-pc-gnu.tar.xz")
(_
@@ -520,6 +537,9 @@ $out/bin/guile --version~%"
("powerpc64le-linux"
(base32
"0afs2j9z2d1hjq42myz4iwjh0aqgzf59inifw87x6b6p1z9wv92v"))
+ ("riscv64-linux"
+ (base32
+
"0x0xjlpmyh6rkr51p00gp6pscgl6zjida1rsg8vk3rinyi6rrbkg"))
("i586-gnu"
(base32
"17kllqnf3fg79gzy9ansgi801c46yh9c23h4d923plvb0nfm1cfn"))
@@ -573,6 +593,8 @@ $out/bin/guile --version~%"
"/20210106/binutils-static-stripped-2.34-powerpc64le-linux-gnu.tar.xz")
("i586-gnu"
"/20200326/binutils-static-stripped-2.34-i586-pc-gnu.tar.xz")
+ ("riscv64-linux"
+ "/20210606/binutils-2.34.tar.xz")
(_
"/20131110/binutils-2.23.2.tar.xz")))
%bootstrap-base-urls))
@@ -593,6 +615,9 @@ $out/bin/guile --version~%"
("powerpc64le-linux"
(base32
"1klxy945c61134mzhqzz2gbk8w0n8jq7arwkrvz78d22ff2q0cwz"))
+ ("riscv64-linux"
+ (base32
+
"0n9qf4vbilfmh1lknhw000waakj4q6s50pnjazr5137skm976z5m"))
("i586-gnu"
(base32
"11kykv1kmqc5wln57rs4klaqa13hm952smkc57qcsyss21kfjprs"))
@@ -653,6 +678,8 @@ $out/bin/guile --version~%"
"/20210106/glibc-stripped-2.31-powerpc64le-linux-gnu.tar.xz")
("i586-gnu"
"/20200326/glibc-stripped-2.31-i586-pc-gnu.tar.xz")
+ ("riscv64-linux"
+ "/20210606/glibc-2.31.tar.xz")
(_
"/20131110/glibc-2.18.tar.xz")))
%bootstrap-base-urls))
@@ -673,6 +700,9 @@ $out/bin/guile --version~%"
("powerpc64le-linux"
(base32
"1a1df6z8gkaq09md3jy94lixnh20599p58p0s856p10xwjaqr1iz"))
+ ("riscv64-linux"
+ (base32
+
"0162c4yfnz4272c9z03l28dzn5km05r7h06m3s730yiv2disldla"))
("i586-gnu"
(base32
"14ddm10lpbas8bankmn5bcrlqvz1v5dnn1qjzxb19r57vd2w5952"))
@@ -749,6 +779,8 @@ exec ~a/bin/.gcc-wrapped -B~a/lib \
"/20210106/gcc-stripped-5.5.0-powerpc64le-linux-gnu.tar.xz")
("i586-gnu"
"/20200326/gcc-stripped-5.5.0-i586-pc-gnu.tar.xz")
+ ("riscv64-linux"
+ "/20210606/gcc-7.5.0.tar.xz")
(_
"/20131110/gcc-4.8.2.tar.xz")))
%bootstrap-base-urls))
@@ -769,6 +801,9 @@ exec ~a/bin/.gcc-wrapped -B~a/lib \
("powerpc64le-linux"
(base32
"151kjsai25vz2s667bgzpisx8f281fpl3n9pxz2yrp9jlnadz3m1"))
+ ("riscv64-linux"
+ (base32
+
"0w1gm1pz3nsfxi5s14sd4nlwcbwq7709lma6csgm8gm6l6x5m7pn"))
("i586-gnu"
(base32
"1j2zc58wzil71a34h7c70sd68dmqvcscrw3rmn2whq79vd70zvv5"))
diff --git a/guix/packages.scm b/guix/packages.scm
index c825f42..4ef81e8 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -347,7 +347,7 @@ name of its URI."
;; This is the list of system types that are supported. By default, we
;; expect all packages to build successfully here.
'("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux" "mips64el-linux"
"i586-gnu"
- "powerpc64le-linux"))
+ "powerpc64le-linux" "riscv64-linux"))
(define %hurd-systems
;; The GNU/Hurd systems for which support is being developed.
@@ -358,7 +358,7 @@ name of its URI."
;;
;; XXX: MIPS is unavailable in CI:
;; <https://lists.gnu.org/archive/html/guix-devel/2017-03/msg00790.html>.
- (fold delete %supported-systems '("mips64el-linux")))
+ (fold delete %supported-systems '("mips64el-linux" "riscv64-linux")))
;; A package.
diff --git a/m4/guix.m4 b/m4/guix.m4
index 05d409a..ad7eeb5 100644
--- a/m4/guix.m4
+++ b/m4/guix.m4
@@ -1,7 +1,7 @@
dnl GNU Guix --- Functional package management for GNU
dnl Copyright © 2012, 2013, 2014, 2015, 2016, 2018, 2019, 2020, 2021 Ludovic
Courtès <ludo@gnu.org>
dnl Copyright © 2014 Mark H Weaver <mhw@netris.org>
-dnl Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
+dnl Copyright © 2017, 2021 Efraim Flashner <efraim@flashner.co.il>
dnl Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
dnl
dnl This file is part of GNU Guix.
@@ -89,7 +89,7 @@ courageous and port the GNU System distribution to it (see
# Currently only Linux-based systems are supported, and only on some
# platforms.
case "$guix_system" in
- x86_64-linux|i686-linux|armhf-linux|aarch64-linux|powerpc64le-linux)
+
x86_64-linux|i686-linux|armhf-linux|aarch64-linux|powerpc64le-linux|riscv64-linux)
;;
*)
if test "x$guix_courageous" = "xyes"; then