Skip to content

Commit 3ccfba1

Browse files
committed
guix: use GCC 10 (over GCC 8) to build releases
This currently points to the version-1.4.0 branch.
1 parent 3e5dd94 commit 3ccfba1

File tree

7 files changed

+43
-594
lines changed

7 files changed

+43
-594
lines changed

contrib/devtools/test-security-check.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,15 @@ def test_PE(self):
6969
cc = determine_wellknown_cmd('CC', 'x86_64-w64-mingw32-gcc')
7070
write_testcode(source)
7171

72-
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--no-nxcompat','-Wl,--disable-reloc-section','-Wl,--no-dynamicbase','-Wl,--no-high-entropy-va','-no-pie','-fno-PIE']),
72+
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--disable-nxcompat','-Wl,--disable-reloc-section','-Wl,--disable-dynamicbase','-Wl,--disable-high-entropy-va','-no-pie','-fno-PIE']),
7373
(1, executable+': failed PIE DYNAMIC_BASE HIGH_ENTROPY_VA NX RELOC_SECTION CONTROL_FLOW'))
74-
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--disable-reloc-section','-Wl,--no-dynamicbase','-Wl,--no-high-entropy-va','-no-pie','-fno-PIE']),
74+
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--disable-reloc-section','-Wl,--disable-dynamicbase','-Wl,--disable-high-entropy-va','-no-pie','-fno-PIE']),
7575
(1, executable+': failed PIE DYNAMIC_BASE HIGH_ENTROPY_VA RELOC_SECTION CONTROL_FLOW'))
76-
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--enable-reloc-section','-Wl,--no-dynamicbase','-Wl,--no-high-entropy-va','-no-pie','-fno-PIE']),
76+
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--enable-reloc-section','-Wl,--disable-dynamicbase','-Wl,--disable-high-entropy-va','-no-pie','-fno-PIE']),
7777
(1, executable+': failed PIE DYNAMIC_BASE HIGH_ENTROPY_VA CONTROL_FLOW'))
78-
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--enable-reloc-section','-Wl,--no-dynamicbase','-Wl,--no-high-entropy-va','-pie','-fPIE']),
78+
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--enable-reloc-section','-Wl,--disable-dynamicbase','-Wl,--disable-high-entropy-va','-pie','-fPIE']),
7979
(1, executable+': failed PIE DYNAMIC_BASE HIGH_ENTROPY_VA CONTROL_FLOW')) # -pie -fPIE does nothing unless --dynamicbase is also supplied
80-
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--enable-reloc-section','-Wl,--dynamicbase','-Wl,--no-high-entropy-va','-pie','-fPIE']),
80+
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--enable-reloc-section','-Wl,--dynamicbase','-Wl,--disable-high-entropy-va','-pie','-fPIE']),
8181
(1, executable+': failed HIGH_ENTROPY_VA CONTROL_FLOW'))
8282
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--enable-reloc-section','-Wl,--dynamicbase','-Wl,--high-entropy-va','-pie','-fPIE']),
8383
(1, executable+': failed CONTROL_FLOW'))

contrib/guix/guix-build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-$(git -c log.showSignature=false log --f
239239
time-machine() {
240240
# shellcheck disable=SC2086
241241
guix time-machine --url=https://git.savannah.gnu.org/git/guix.git \
242-
--commit=aa34d4d28dfe25ba47d5800d05000fb7221788c0 \
242+
--commit=fa17abf1af09570708daa28dd40ffbc932ebe25c \
243243
--cores="$JOBS" \
244244
--keep-failed \
245245
--fallback \

contrib/guix/libexec/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ case "$HOST" in
109109
# 2. kernel-header-related search paths (not applicable to mingw-w64 hosts)
110110
export CROSS_C_INCLUDE_PATH="${CROSS_GCC_LIB}/include:${CROSS_GCC_LIB}/include-fixed:${CROSS_GLIBC}/include"
111111
export CROSS_CPLUS_INCLUDE_PATH="${CROSS_GCC}/include/c++:${CROSS_GCC}/include/c++/${HOST}:${CROSS_GCC}/include/c++/backward:${CROSS_C_INCLUDE_PATH}"
112-
export CROSS_LIBRARY_PATH="${CROSS_GCC_LIB_STORE}/lib:${CROSS_GCC}/${HOST}/lib:${CROSS_GCC_LIB}:${CROSS_GLIBC}/lib"
112+
export CROSS_LIBRARY_PATH="${CROSS_GCC_LIB_STORE}/lib:${CROSS_GCC_LIB}:${CROSS_GLIBC}/lib"
113113
;;
114114
*darwin*)
115115
# The CROSS toolchain for darwin uses the SDK and ignores environment variables.
@@ -126,7 +126,7 @@ case "$HOST" in
126126

127127
export CROSS_C_INCLUDE_PATH="${CROSS_GCC_LIB}/include:${CROSS_GCC_LIB}/include-fixed:${CROSS_GLIBC}/include:${CROSS_KERNEL}/include"
128128
export CROSS_CPLUS_INCLUDE_PATH="${CROSS_GCC}/include/c++:${CROSS_GCC}/include/c++/${HOST}:${CROSS_GCC}/include/c++/backward:${CROSS_C_INCLUDE_PATH}"
129-
export CROSS_LIBRARY_PATH="${CROSS_GCC_LIB_STORE}/lib:${CROSS_GCC}/${HOST}/lib:${CROSS_GCC_LIB}:${CROSS_GLIBC}/lib:${CROSS_GLIBC_STATIC}/lib"
129+
export CROSS_LIBRARY_PATH="${CROSS_GCC_LIB_STORE}/lib:${CROSS_GCC_LIB}:${CROSS_GLIBC}/lib:${CROSS_GLIBC_STATIC}/lib"
130130
;;
131131
*)
132132
exit 1 ;;

contrib/guix/manifest.scm

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
(gnu packages gawk)
1717
(gnu packages gcc)
1818
(gnu packages gnome)
19-
(gnu packages image)
2019
(gnu packages installers)
2120
(gnu packages linux)
2221
(gnu packages llvm)
@@ -29,7 +28,6 @@
2928
(gnu packages shells)
3029
(gnu packages tls)
3130
(gnu packages version-control)
32-
(guix build-system font)
3331
(guix build-system gnu)
3432
(guix build-system python)
3533
(guix build-system trivial)
@@ -79,10 +77,6 @@ http://www.linuxfromscratch.org/hlfs/view/development/chapter05/gcc-pass1.html"
7977
(("-rpath=") "-rpath-link="))
8078
#t))))))))
8179

82-
(define (make-binutils-with-mingw-w64-disable-flags xbinutils)
83-
(package-with-extra-patches xbinutils
84-
(search-our-patches "binutils-mingw-w64-disable-flags.patch")))
85-
8680
(define (make-cross-toolchain target
8781
base-gcc-for-libc
8882
base-kernel-headers
@@ -134,9 +128,7 @@ chain for " target " development."))
134128
(home-page (package-home-page xgcc))
135129
(license (package-license xgcc)))))
136130

137-
(define base-gcc
138-
(package-with-extra-patches gcc-8
139-
(search-our-patches "gcc-8-sort-libtool-find-output.patch")))
131+
(define base-gcc gcc-10)
140132

141133
;; Building glibc with stack smashing protector first landed in glibc 2.25, use
142134
;; this function to disable for older glibcs
@@ -171,7 +163,7 @@ desirable for building Bitcoin Core release binaries."
171163

172164
(define (make-mingw-pthreads-cross-toolchain target)
173165
"Create a cross-compilation toolchain package for TARGET"
174-
(let* ((xbinutils (make-binutils-with-mingw-w64-disable-flags (cross-binutils target)))
166+
(let* ((xbinutils (cross-binutils target))
175167
(pthreads-xlibc mingw-w64-x86_64-winpthreads)
176168
(pthreads-xgcc (make-gcc-with-pthreads
177169
(cross-gcc target
@@ -298,7 +290,8 @@ PKCS#8, PKCS#12, PKCS#5, X.509 and TSP.")
298290
(file-name (git-file-name name commit))
299291
(sha256
300292
(base32
301-
"1nyvjisvyxyxnd0023xjf5846xd03lwawp5pfzr8vrky7wwm5maz"))))
293+
"1nyvjisvyxyxnd0023xjf5846xd03lwawp5pfzr8vrky7wwm5maz"))
294+
(patches (search-our-patches "elfsteem-value-error-python-39.patch"))))
302295
(build-system python-build-system)
303296
;; There are no tests, but attempting to run python setup.py test leads to
304297
;; PYTHONPATH problems, just disable the test
@@ -370,6 +363,8 @@ PKCS#8, PKCS#12, PKCS#5, X.509 and TSP.")
370363
(define-public python-oscryptotests
371364
(package (inherit python-oscrypto)
372365
(name "python-oscryptotests")
366+
(propagated-inputs
367+
`(("python-oscrypto" ,python-oscrypto)))
373368
(arguments
374369
`(#:tests? #f
375370
#:phases
@@ -557,7 +552,7 @@ inspecting signatures in Mach-O binaries.")
557552

558553
(define-public glibc-2.24
559554
(package
560-
(inherit glibc)
555+
(inherit glibc-2.31)
561556
(version "2.24")
562557
(source (origin
563558
(method git-fetch)
@@ -573,9 +568,21 @@ inspecting signatures in Mach-O binaries.")
573568
"glibc-2.24-elfm-loadaddr-dynamic-rewrite.patch"
574569
"glibc-2.24-no-build-time-cxx-header-run.patch"))))))
575570

576-
(define glibc-2.27/bitcoin-patched
577-
(package-with-extra-patches glibc-2.27
578-
(search-our-patches "glibc-2.27-riscv64-Use-__has_include__-to-include-asm-syscalls.h.patch")))
571+
(define-public glibc-2.27/bitcoin-patched
572+
(package
573+
(inherit glibc-2.31)
574+
(version "2.27")
575+
(source (origin
576+
(method git-fetch)
577+
(uri (git-reference
578+
(url "https://sourceware.org/git/glibc.git")
579+
(commit "23158b08a0908f381459f273a984c6fd328363cb")))
580+
(file-name (git-file-name "glibc" "23158b08a0908f381459f273a984c6fd328363cb"))
581+
(sha256
582+
(base32
583+
"1b2n1gxv9f4fd5yy68qjbnarhf8mf4vmlxk10i3328c1w5pmp0ca"))
584+
(patches (search-our-patches "glibc-ldd-x86_64.patch"
585+
"glibc-2.27-riscv64-Use-__has_include__-to-include-asm-syscalls.h.patch"))))))
579586

580587
(packages->manifest
581588
(append

contrib/guix/patches/binutils-mingw-w64-disable-flags.patch

Lines changed: 0 additions & 171 deletions
This file was deleted.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/examples/otool.py b/examples/otool.py
2+
index 2b8efc0..d797b2e 100755
3+
--- a/examples/otool.py
4+
+++ b/examples/otool.py
5+
@@ -342,7 +342,7 @@ if __name__ == '__main__':
6+
try:
7+
e = macho_init.MACHO(raw,
8+
parseSymbols = False)
9+
- except ValueError, err:
10+
+ except ValueError as err:
11+
print("%s:" %file)
12+
print(" %s" % err)
13+
continue

0 commit comments

Comments
 (0)