contrib: guix: Various improvements.
- Clearer and more accurate prose - Pin `guix pull' to commit rather than branch - Just use `use-module' instead of `define-module' - Use `bash-minimal' instead of `bash' - Remove unneeded `tcsh' from manifest - Explicitly use `python-3.7' - Add comments about how {native,cross}-toolchains are produced and why
This commit is contained in:
parent
8dff3e48a9
commit
cd3e947f50
3 changed files with 39 additions and 35 deletions
|
@ -15,7 +15,8 @@ Conservatively, a x86_64 machine with:
|
||||||
|
|
||||||
- 2 or more logical cores
|
- 2 or more logical cores
|
||||||
- 4GB of free disk space on the partition that /gnu/store will reside in
|
- 4GB of free disk space on the partition that /gnu/store will reside in
|
||||||
- 24GB of free disk space on the partition that the bitcoin repository resides in
|
- 24GB of free disk space on the partition that the Bitcoin Core git repository
|
||||||
|
resides in
|
||||||
|
|
||||||
> Note: these requirements are slightly less onerous than those of Gitian builds
|
> Note: these requirements are slightly less onerous than those of Gitian builds
|
||||||
|
|
||||||
|
@ -43,7 +44,7 @@ profile. The changes there are slowly being upstreamed.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
guix pull --url=https://github.com/dongcarl/guix.git \
|
guix pull --url=https://github.com/dongcarl/guix.git \
|
||||||
--branch=2019-05-bitcoin-staging \
|
--commit=82c77e52b8b46e0a3aad2cb12307c2e30547deec \
|
||||||
--max-jobs=4 # change accordingly
|
--max-jobs=4 # change accordingly
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -19,8 +19,8 @@ for host in ${HOSTS=i686-linux-gnu x86_64-linux-gnu arm-linux-gnueabihf aarch64-
|
||||||
# Display proper warning when the user interrupts the build
|
# Display proper warning when the user interrupts the build
|
||||||
trap 'echo "** INT received while building ${host}, you may want to clean up the relevant output and distsrc-* directories before rebuilding"' INT
|
trap 'echo "** INT received while building ${host}, you may want to clean up the relevant output and distsrc-* directories before rebuilding"' INT
|
||||||
|
|
||||||
# Run the build script 'contrib/guix/build.sh' in the build container
|
# Run the build script 'contrib/guix/libexec/build.sh' in the build
|
||||||
# specified by 'contrib/guix/manifest.scm'
|
# container specified by 'contrib/guix/manifest.scm'
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
guix environment --manifest="${PWD}/contrib/guix/manifest.scm" \
|
guix environment --manifest="${PWD}/contrib/guix/manifest.scm" \
|
||||||
--container \
|
--container \
|
||||||
|
|
|
@ -1,26 +1,25 @@
|
||||||
(define-module (bitcoin)
|
(use-modules (gnu)
|
||||||
#:use-module (gnu)
|
(gnu packages)
|
||||||
#:use-module (gnu packages)
|
(gnu packages autotools)
|
||||||
#:use-module (gnu packages autotools)
|
(gnu packages base)
|
||||||
#:use-module (gnu packages base)
|
(gnu packages bash)
|
||||||
#:use-module (gnu packages bash)
|
(gnu packages check)
|
||||||
#:use-module (gnu packages check)
|
(gnu packages commencement)
|
||||||
#:use-module (gnu packages commencement)
|
(gnu packages compression)
|
||||||
#:use-module (gnu packages compression)
|
(gnu packages cross-base)
|
||||||
#:use-module (gnu packages cross-base)
|
(gnu packages file)
|
||||||
#:use-module (gnu packages file)
|
(gnu packages gawk)
|
||||||
#:use-module (gnu packages gawk)
|
(gnu packages gcc)
|
||||||
#:use-module (gnu packages gcc)
|
(gnu packages linux)
|
||||||
#:use-module (gnu packages linux)
|
(gnu packages perl)
|
||||||
#:use-module (gnu packages perl)
|
(gnu packages pkg-config)
|
||||||
#:use-module (gnu packages pkg-config)
|
(gnu packages python)
|
||||||
#:use-module (gnu packages python)
|
(gnu packages shells)
|
||||||
#:use-module (gnu packages shells)
|
(guix build-system trivial)
|
||||||
#:use-module (guix build-system trivial)
|
(guix gexp)
|
||||||
#:use-module (guix gexp)
|
(guix packages)
|
||||||
#:use-module (guix packages)
|
(guix profiles)
|
||||||
#:use-module (guix profiles)
|
(guix utils))
|
||||||
#:use-module (guix utils))
|
|
||||||
|
|
||||||
(define (make-ssp-fixed-gcc xgcc)
|
(define (make-ssp-fixed-gcc xgcc)
|
||||||
"Given a XGCC package, return a modified package that uses the SSP function
|
"Given a XGCC package, return a modified package that uses the SSP function
|
||||||
|
@ -101,7 +100,7 @@ chain for " target " development."))
|
||||||
(license (package-license xgcc)))))
|
(license (package-license xgcc)))))
|
||||||
|
|
||||||
(define* (make-bitcoin-cross-toolchain target
|
(define* (make-bitcoin-cross-toolchain target
|
||||||
#:optional
|
#:key
|
||||||
(base-gcc-for-libc gcc-5)
|
(base-gcc-for-libc gcc-5)
|
||||||
(base-kernel-headers linux-libre-headers-4.19)
|
(base-kernel-headers linux-libre-headers-4.19)
|
||||||
(base-libc glibc-2.27)
|
(base-libc glibc-2.27)
|
||||||
|
@ -117,8 +116,7 @@ desirable for building Bitcoin Core release binaries."
|
||||||
|
|
||||||
(packages->manifest
|
(packages->manifest
|
||||||
(list ;; The Basics
|
(list ;; The Basics
|
||||||
bash
|
bash-minimal
|
||||||
tcsh
|
|
||||||
which
|
which
|
||||||
coreutils
|
coreutils
|
||||||
util-linux
|
util-linux
|
||||||
|
@ -145,11 +143,16 @@ desirable for building Bitcoin Core release binaries."
|
||||||
pkg-config
|
pkg-config
|
||||||
;; Scripting
|
;; Scripting
|
||||||
perl
|
perl
|
||||||
python
|
python-3.7
|
||||||
;; Toolchains
|
;; Native gcc 9 toolchain targeting glibc 2.27
|
||||||
(make-gcc-toolchain gcc-9 glibc-2.27)
|
(make-gcc-toolchain gcc-9 glibc-2.27)
|
||||||
(make-bitcoin-cross-toolchain "riscv64-linux-gnu" gcc-8)
|
;; Cross gcc 9 toolchains targeting glibc 2.27
|
||||||
(make-bitcoin-cross-toolchain "x86_64-linux-gnu")
|
|
||||||
(make-bitcoin-cross-toolchain "i686-linux-gnu")
|
(make-bitcoin-cross-toolchain "i686-linux-gnu")
|
||||||
|
(make-bitcoin-cross-toolchain "x86_64-linux-gnu")
|
||||||
(make-bitcoin-cross-toolchain "aarch64-linux-gnu")
|
(make-bitcoin-cross-toolchain "aarch64-linux-gnu")
|
||||||
(make-bitcoin-cross-toolchain "arm-linux-gnueabihf" gcc-6)))
|
(make-bitcoin-cross-toolchain "arm-linux-gnueabihf")
|
||||||
|
;; The glibc 2.27 for riscv64 needs gcc 7 to successfully build (see:
|
||||||
|
;; https://www.gnu.org/software/gcc/gcc-7/changes.html#riscv). The final
|
||||||
|
;; toolchain is still a gcc 9 toolchain targeting glibc 2.27.
|
||||||
|
(make-bitcoin-cross-toolchain "riscv64-linux-gnu"
|
||||||
|
#:base-gcc-for-libc gcc-7)))
|
||||||
|
|
Loading…
Reference in a new issue