fanquake
88fd3f81ec
guix: use -fcommon when building glibc 2.24
...
GCC 10 started using -fno-common by default, which causes issues with
the powerpc builds using gibc 2.24. A patch was commited to glibc to fix
the issue, 18363b4f010da9ba459b13310b113ac0647c2fcc but is non-trvial
to backport, and was broken in at least one way, see the followup in
commit 7650321ce037302bfc2f026aa19e0213b8d02fe6.
For now, retain the legacy GCC behaviour by passing -fcommon when
building glibc 2.24.
https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html .
https://sourceware.org/git/?p=glibc.git;a=commit;h=18363b4f010da9ba459b13310b113ac0647c2fcc
https://sourceware.org/git/?p=glibc.git;a=commit;h=7650321ce037302bfc2f026aa19e0213b8d02fe6
2022-05-12 08:21:16 +01:00
fanquake
0e51913595
guix: fix glibc 2.27 multiple definition warnings with GCC 10
2022-05-12 08:21:16 +01:00
fanquake
508bd4d357
guix: adjust RISC-V __has_include() patch to work with GCC 10
...
The actual macro is __has_include(), not __has_include__(), using the
later would result in build failures when using GCC 10. i.e:
```bash
../sysdeps/unix/sysv/linux/riscv/flush-icache.c:24:5: warning: "__has_include__" is not defined, evaluates to 0 [-Wundef]
24 | #if __has_include__ (<asm/syscalls.h>)
```
Looks like at least someone else has run into the same thing, see:
http://lists.busybox.net/pipermail/buildroot/2020-July/590376.html .
See also:
https://gcc.gnu.org/onlinedocs/cpp/_005f_005fhas_005finclude.html
https://clang.llvm.org/docs/LanguageExtensions.html#has-include
2022-05-12 08:21:15 +01:00
fanquake
457148a803
guix: fix GCC 10.3.0 + mingw-w64 setjmp/longjmp issues
...
This commit backports a patch to the GCC 10.3.0 we build for Windows
cross-compilation in Guix. The commit has been backported to the GCC
releases/gcc-10 branch, but hasn't yet made it into a release.
The patch corrects a regression from an earlier GCC commit, see:
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=357c4350680bf29f0c7a115424e3da11c53b5582
and
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=074226d5aa86cd3de517014acfe34c7f69a2ccc7 ,
related to the way newer versions of mingw-w64 implement setjmp/longjmp.
Ultimately this was causing a crash for us when Windows users were
viewing the network traffic tab inside the GUI. After some period, long
enough that a buffer would need reallocating, a call into FreeTypes
gray_record_cell() would result in a call to ft_longjmp (longjmp), which
would then trigger a crash.
Fixes: https://github.com/bitcoin-core/gui/issues/582 .
See also:
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=e8d1ca7d2c344a411779892616c423e157f4aea8 .
https://bugreports.qt.io/browse/QTBUG-93476 .
2022-04-13 13:10:03 +01:00
fanquake
d6fae988ef
guix: fix vmov alignment issues with gcc 10.3.0 & mingw-w64
...
This introduces a patch to our GCC (10.3.0) mingw-w64 compiler, in Guix, to make
it avoid using aligned vmov instructions. This works around a longstanding issue
in GCC, https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54412 , which was recently
discovered to be causing issues, see #24726 .
Note that distros like Debian are also patching around this issue, and that is
where this patch comes from. This would also explain why we haven't run into this
problem earlier, in development builds. See:
https://salsa.debian.org/mingw-w64-team/gcc-mingw-w64/-/blob/master/debian/patches/vmov-alignment.patch .
Fixes #24726 .
Alternative to #24727 .
See also:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=939559
2022-04-01 13:24:22 +01:00
fanquake
b1e8f0b96e
guix: use uptream nsis-x86_64
...
Our patch is now used upstream.
2022-01-05 10:32:24 +08:00
fanquake
3ccfba1c7f
guix: use GCC 10 (over GCC 8) to build releases
...
This currently points to the version-1.4.0 branch.
2022-01-05 10:32:19 +08:00
Carl Dong
678348db51
guix: Patch binutils to add security-related disable flags
...
We use these flags in our test-security-check make target, but they are
only available because debian patches them in.
We can patch them in for our Guix builds so that we can check the sanity
of our security/symbol checking suite before running them.
2021-07-07 19:31:37 +08:00
fanquake
15fc9a0299
guix: add additional documentation to patches
2021-07-06 20:50:47 +08:00
Carl Dong
16b0a936e1
guix: Rebase toolchain on glibc 2.24 (2.27 for riscv64)
...
Support for riscv64 in glibc landed in 2.27 so it's unavoidable that we
use 2.27.
Running a Bitcoin build with toolchains based on 2.24 for platforms
other than riscv64 seem to produce binaries which do not have 2.17
symbols. So use 2.24 since it's more recent and maintained by Debian
Stretch.
2021-07-01 16:17:03 -04:00
Carl Dong
ee883201cf
guix: repro: Sort find output in libtool for gcc-8
...
Otherwise the resulting .a static libraries (e.g. libstdc++.a) will not
be reproducible and end up making the Bitcoin binaries non-reproducible
as well.
See: https://reproducible-builds.org/docs/archives/#gnu-libtool
2021-05-19 15:29:10 -04:00
Carl Dong
bac2690e6f
guix: Package codesigning tools
2021-05-13 15:41:56 -04:00
Carl Dong
a91c46c57d
guix: Make nsis reproducible by respecting SOURCE-DATE-EPOCH
...
When building nsis, if VERSION is not specified, it defaults to
cvs_version which is non-deterministic as it includes the current date.
This patches nsis to default to SOURCE_DATE_EPOCH if it exists so that
nsis is reproducible.
Upstream change: https://github.com/kichik/nsis/pull/13
2021-01-17 18:43:58 -05:00