Skip to content

Commit 09af7b7

Browse files
committed
This reverts commit be97bfe, reversing changes made to f155ecf.
1 parent f2ba16f commit 09af7b7

File tree

7 files changed

+341
-78
lines changed

7 files changed

+341
-78
lines changed

contrib/guix/guix-build

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ mkdir -p "$VERSION_BASE"
7474
################
7575

7676
# Default to building for all supported HOSTs (overridable by environment)
77-
# powerpc64le-linux-gnu currently disabled due non-determinism issues across build arches.
78-
export HOSTS="${HOSTS:-x86_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu riscv64-linux-gnu powerpc64-linux-gnu
77+
export HOSTS="${HOSTS:-x86_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu riscv64-linux-gnu powerpc64-linux-gnu powerpc64le-linux-gnu
7978
x86_64-w64-mingw32
8079
x86_64-apple-darwin arm64-apple-darwin}"
8180

contrib/guix/libexec/build.sh

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ store_path() {
6363
# Set environment variables to point the NATIVE toolchain to the right
6464
# includes/libs
6565
NATIVE_GCC="$(store_path gcc-toolchain)"
66+
NATIVE_GCC_STATIC="$(store_path gcc-toolchain static)"
6667

6768
unset LIBRARY_PATH
6869
unset CPATH
@@ -71,20 +72,12 @@ unset CPLUS_INCLUDE_PATH
7172
unset OBJC_INCLUDE_PATH
7273
unset OBJCPLUS_INCLUDE_PATH
7374

75+
export LIBRARY_PATH="${NATIVE_GCC}/lib:${NATIVE_GCC_STATIC}/lib"
7476
export C_INCLUDE_PATH="${NATIVE_GCC}/include"
7577
export CPLUS_INCLUDE_PATH="${NATIVE_GCC}/include/c++:${NATIVE_GCC}/include"
7678
export OBJC_INCLUDE_PATH="${NATIVE_GCC}/include"
7779
export OBJCPLUS_INCLUDE_PATH="${NATIVE_GCC}/include/c++:${NATIVE_GCC}/include"
7880

79-
case "$HOST" in
80-
*darwin*) export LIBRARY_PATH="${NATIVE_GCC}/lib" ;;
81-
*mingw*) export LIBRARY_PATH="${NATIVE_GCC}/lib" ;;
82-
*)
83-
NATIVE_GCC_STATIC="$(store_path gcc-toolchain static)"
84-
export LIBRARY_PATH="${NATIVE_GCC}/lib:${NATIVE_GCC_STATIC}/lib"
85-
;;
86-
esac
87-
8881
# Set environment variables to point the CROSS toolchain to the right
8982
# includes/libs for $HOST
9083
case "$HOST" in

contrib/guix/libexec/prelude.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ fi
5151
time-machine() {
5252
# shellcheck disable=SC2086
5353
guix time-machine --url=https://git.savannah.gnu.org/git/guix.git \
54-
--commit=f0bb724211872cd6158fce6162e0b8c73efed126 \
54+
--commit=160f78a4d92205df986ed9efcce7d3aac188cb24 \
5555
--cores="$JOBS" \
5656
--keep-failed \
5757
--fallback \

contrib/guix/manifest.scm

Lines changed: 46 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,21 @@
1313
(gnu packages gawk)
1414
(gnu packages gcc)
1515
((gnu packages installers) #:select (nsis-x86_64))
16-
((gnu packages linux) #:select (linux-libre-headers-6.1 util-linux))
16+
((gnu packages linux) #:select (linux-libre-headers-5.15 util-linux))
1717
(gnu packages llvm)
1818
(gnu packages mingw)
1919
(gnu packages moreutils)
2020
(gnu packages pkg-config)
2121
((gnu packages python) #:select (python-minimal))
2222
((gnu packages python-build) #:select (python-tomli))
2323
((gnu packages python-crypto) #:select (python-asn1crypto))
24-
((gnu packages python-xyz) #:select (python-altgraph))
24+
((gnu packages python-web) #:select (python-requests))
2525
((gnu packages tls) #:select (openssl))
2626
((gnu packages version-control) #:select (git-minimal))
2727
(guix build-system cmake)
2828
(guix build-system gnu)
2929
(guix build-system python)
3030
(guix build-system trivial)
31-
(guix download)
3231
(guix gexp)
3332
(guix git-download)
3433
((guix licenses) #:prefix license:)
@@ -95,19 +94,8 @@ chain for " target " development."))
9594
(home-page (package-home-page xgcc))
9695
(license (package-license xgcc)))))
9796

98-
(define base-gcc
99-
(package
100-
(inherit gcc-12) ;; 12.3.0
101-
(version "12.4.0")
102-
(source (origin
103-
(method url-fetch)
104-
(uri (string-append "mirror://gnu/gcc/gcc-"
105-
version "/gcc-" version ".tar.xz"))
106-
(sha256
107-
(base32
108-
"0xcida8l2wykvvzvpcrcn649gj0ijn64gwxbplacpg6c0hk6akvh"))))))
109-
110-
(define base-linux-kernel-headers linux-libre-headers-6.1)
97+
(define base-gcc gcc-10)
98+
(define base-linux-kernel-headers linux-libre-headers-5.15)
11199

112100
(define* (make-bitcoin-cross-toolchain target
113101
#:key
@@ -125,19 +113,13 @@ desirable for building Dash Core release binaries."
125113

126114
(define (gcc-mingw-patches gcc)
127115
(package-with-extra-patches gcc
128-
(search-our-patches "gcc-remap-guix-store.patch")))
129-
130-
(define (binutils-mingw-patches binutils)
131-
(package-with-extra-patches binutils
132-
(search-our-patches "binutils-unaligned-default.patch")))
116+
(search-our-patches "gcc-remap-guix-store.patch"
117+
"vmov-alignment.patch")))
133118

134119
(define (make-mingw-pthreads-cross-toolchain target)
135120
"Create a cross-compilation toolchain package for TARGET"
136-
(let* ((xbinutils (binutils-mingw-patches (cross-binutils target)))
137-
(machine (substring target 0 (string-index target #\-)))
138-
(pthreads-xlibc (make-mingw-w64 machine
139-
#:xgcc (cross-gcc target #:xgcc (gcc-mingw-patches base-gcc))
140-
#:with-winpthreads? #t))
121+
(let* ((xbinutils (cross-binutils target))
122+
(pthreads-xlibc mingw-w64-x86_64-winpthreads)
141123
(pthreads-xgcc (cross-gcc target
142124
#:xgcc (gcc-mingw-patches mingw-w64-base-gcc)
143125
#:xbinutils xbinutils
@@ -161,6 +143,10 @@ chain for " target " development."))
161143
(home-page (package-home-page pthreads-xgcc))
162144
(license (package-license pthreads-xgcc)))))
163145

146+
(define (make-nsis-for-gcc-10 base-nsis)
147+
(package-with-extra-patches base-nsis
148+
(search-our-patches "nsis-gcc-10-memmove.patch")))
149+
164150
;; While LIEF is packaged in Guix, we maintain our own package,
165151
;; to simplify building, and more easily apply updates.
166152
;; Moreover, the Guix's package uses cmake, which caused build
@@ -396,6 +382,29 @@ certificates or paths. Supports various options, including: validation at a
396382
specific moment in time, whitelisting and revocation checks.")
397383
(license license:expat))))
398384

385+
(define-public python-altgraph
386+
(package
387+
(name "python-altgraph")
388+
(version "0.17")
389+
(source
390+
(origin
391+
(method git-fetch)
392+
(uri (git-reference
393+
(url "https://github.com/ronaldoussoren/altgraph")
394+
(commit (string-append "v" version))))
395+
(file-name (git-file-name name version))
396+
(sha256
397+
(base32
398+
"09sm4srvvkw458pn48ga9q7ykr4xlz7q8gh1h9w7nxpf001qgpwb"))))
399+
(build-system python-build-system)
400+
(home-page "https://github.com/ronaldoussoren/altgraph")
401+
(synopsis "Python graph (network) package")
402+
(description "altgraph is a fork of graphlib: a graph (network) package for
403+
constructing graphs, BFS and DFS traversals, topological sort, shortest paths,
404+
etc. with graphviz output.")
405+
(license license:expat)))
406+
407+
399408
(define-public python-macholib
400409
(package
401410
(name "python-macholib")
@@ -445,7 +454,7 @@ and endian independent.")
445454
(license license:expat)))
446455

447456
(define-public python-signapple
448-
(let ((commit "7a96b4171a360abf0f0f56e499f8f9ed2116280d"))
457+
(let ((commit "8a945a2e7583be2665cf3a6a89d665b70ecd1ab6"))
449458
(package
450459
(name "python-signapple")
451460
(version (git-version "0.1" "1" commit))
@@ -458,13 +467,14 @@ and endian independent.")
458467
(file-name (git-file-name name commit))
459468
(sha256
460469
(base32
461-
"0aa4k180jnpal15yhncnm3g3z9gzmi7qb25q5l0kaj444a1p2pm4"))))
470+
"0fr1hangvfyiwflca6jg5g8zvg3jc9qr7vd2c12ff89pznf38dlg"))))
462471
(build-system python-build-system)
463472
(propagated-inputs
464473
`(("python-asn1crypto" ,python-asn1crypto)
465474
("python-oscrypto" ,python-oscrypto)
466475
("python-certvalidator" ,python-certvalidator)
467476
("python-elfesteem" ,python-elfesteem)
477+
("python-requests" ,python-requests)
468478
("python-macholib" ,python-macholib)))
469479
;; There are no tests, but attempting to run python setup.py test leads to
470480
;; problems, just disable the test
@@ -502,8 +512,6 @@ inspecting signatures in Mach-O binaries.")
502512
(list "--enable-initfini-array=yes",
503513
"--enable-default-ssp=yes",
504514
"--enable-default-pie=yes",
505-
"--enable-standard-branch-protection=yes",
506-
"--enable-cet=yes",
507515
building-on)))
508516
((#:phases phases)
509517
`(modify-phases ,phases
@@ -585,6 +593,9 @@ inspecting signatures in Mach-O binaries.")
585593
automake
586594
pkg-config
587595
bison
596+
;; Native GCC 10 toolchain
597+
gcc-toolchain-10
598+
(list gcc-toolchain-10 "static")
588599
;; Scripting
589600
python-minimal ;; (3.10)
590601
;; Git
@@ -593,23 +604,14 @@ inspecting signatures in Mach-O binaries.")
593604
python-lief)
594605
(let ((target (getenv "HOST")))
595606
(cond ((string-suffix? "-mingw32" target)
596-
(list ;; Native GCC 12 toolchain
597-
gcc-toolchain-12
598-
zip
607+
;; Windows
608+
(list zip
599609
(make-mingw-pthreads-cross-toolchain "x86_64-w64-mingw32")
600-
nsis-x86_64
610+
(make-nsis-for-gcc-10 nsis-x86_64)
601611
nss-certs
602612
osslsigncode))
603613
((string-contains target "-linux-")
604-
(list ;; Native GCC 12 toolchain
605-
gcc-toolchain-12
606-
(list gcc-toolchain-12 "static")
607-
(make-bitcoin-cross-toolchain target)))
614+
(list (make-bitcoin-cross-toolchain target)))
608615
((string-contains target "darwin")
609-
(list ;; Native GCC 11 toolchain
610-
gcc-toolchain-11
611-
binutils
612-
clang-toolchain-10
613-
python-signapple
614-
xorriso))
616+
(list clang-toolchain-10 binutils xorriso python-signapple))
615617
(else '())))))

contrib/guix/patches/binutils-unaligned-default.patch

Lines changed: 0 additions & 22 deletions
This file was deleted.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
commit f6df41524e703dc471e283e566a48e05a735b7f2
2+
Author: Anders <[email protected]>
3+
Date: Sat Jun 27 23:18:45 2020 +0000
4+
5+
Don't let GCC 10 generate memmove calls (bug #1248)
6+
7+
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7189 212acab6-be3b-0410-9dea-997c60f758d6
8+
9+
diff --git a/SCons/Config/gnu b/SCons/Config/gnu
10+
index bfcb362d..21fa446b 100644
11+
--- a/SCons/Config/gnu
12+
+++ b/SCons/Config/gnu
13+
@@ -103,6 +103,10 @@ stub_env.Append(LINKFLAGS = ['$NODEFLIBS_FLAG']) # no standard libraries
14+
stub_env.Append(LINKFLAGS = ['$ALIGN_FLAG']) # 512 bytes align
15+
stub_env.Append(LINKFLAGS = ['$MAP_FLAG']) # generate map file
16+
17+
+conf = FlagsConfigure(stub_env)
18+
+conf.CheckCompileFlag('-fno-tree-loop-distribute-patterns') # GCC 10: Don't generate msvcrt!memmove calls (bug #1248)
19+
+conf.Finish()
20+
+
21+
stub_uenv = stub_env.Clone()
22+
stub_uenv.Append(CPPDEFINES = ['_UNICODE', 'UNICODE'])
23+

0 commit comments

Comments
 (0)