Skip to content

Commit ed3b8ea

Browse files
committed
Merge #17595: guix: Enable building for x86_64-w64-mingw32 target
a35e323 guix: Appease travis. (Carl Dong) 0b66d22 guix: Use gcc-9 for mingw-w64 instead of 8 (Carl Dong) ba0b99b guix: Don't set MINGW_HAS_SECURE_API CFLAG in depends (Carl Dong) 93439a7 guix: Bump to upstream commit with mingw-w64 changes (Carl Dong) 35a9679 guix: Check mingw symbols, improve SSP fix docs (Carl Dong) 449d8fe guix: Expand on INT trap message (Carl Dong) 3f1f03c guix: Spelling fixes (Carl Dong) ff821dd guix: Reinstate make-ssp-fixed-gcc (Carl Dong) 360a9e0 guix: Bump time-machine for mingw-w64 patches (Carl Dong) 93e41b7 guix: Use gcc-8 for mingw-w64 instead of 7 (Carl Dong) ef4f7e4 guix: Set the well-known timezone env var (Carl Dong) acf4b3b guix: Make x86_64-w64-mingw32 builds reproducible (Carl Dong) c4cce00 guix: Remove dead links from README. (Carl Dong) df953a4 guix: Appease shellcheck. (Carl Dong) 91897c9 guix: Improve guix-build.sh documentation (Carl Dong) 570d769 guix: Build support for Windows (Carl Dong) Pull request description: ~~Based on: bitcoin/bitcoin#16519 Based on: #17933 (Time Machines are... shall we say... superior 😁) This PR allows us to perform Guix builds for the `x86_64-w64-mingw32` target. We do this _without_ splitting up the build script like we do in Gitian by using this newfangled alien technology called `case` statements. (This is WIP and might be changed to `if` statements soon) ACKs for top commit: fanquake: ACK a35e323 2/3 Tree-SHA512: c471951c23eb2cda919a71285d8b8f2580cb20f09d5db17b53e13dbd8813e01b3e7a83ea848e4913fd0f2bc12c6c133c5f76b54e65c0d89fed4dfd2e0be19875
2 parents a5623ba + a35e323 commit ed3b8ea

File tree

5 files changed

+338
-109
lines changed

5 files changed

+338
-109
lines changed

contrib/guix/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,6 @@ repository and will likely put one up soon.
220220
[guix/env-setup]: https://www.gnu.org/software/guix/manual/en/html_node/Build-Environment-Setup.html
221221
[guix/substitutes]: https://www.gnu.org/software/guix/manual/en/html_node/Substitutes.html
222222
[guix/substitute-server-auth]: https://www.gnu.org/software/guix/manual/en/html_node/Substitute-Server-Authorization.html
223-
[guix/inferiors]: https://www.gnu.org/software/guix/manual/en/html_node/Inferiors.html
224-
[guix/channels]: https://www.gnu.org/software/guix/manual/en/html_node/Channels.html
225223
[guix/time-machine]: https://guix.gnu.org/manual/en/html_node/Invoking-guix-time_002dmachine.html
226224

227225
[debian/guix-package]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=850644

contrib/guix/guix-build.sh

Lines changed: 94 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,33 +13,106 @@ make -C "${PWD}/depends" -j"$MAX_JOBS" download ${V:+V=1} ${SOURCES_PATH:+SOURCE
1313
# Determine the reference time used for determinism (overridable by environment)
1414
SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-$(git log --format=%at -1)}"
1515

16+
# Execute "$@" in a pinned, possibly older version of Guix, for reproducibility
17+
# across time.
1618
time-machine() {
1719
guix time-machine --url=https://github.com/dongcarl/guix.git \
18-
--commit=b3a7c72c8b2425f8ddb0fc6e3b1caeed40f86dee \
20+
--commit=b066c25026f21fb57677aa34692a5034338e7ee3 \
1921
-- "$@"
2022
}
2123

22-
# Deterministically build Bitcoin Core for HOSTs (overriable by environment)
23-
for host in ${HOSTS=x86_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu riscv64-linux-gnu}; do
24+
# Function to be called when building for host ${1} and the user interrupts the
25+
# build
26+
int_trap() {
27+
cat << EOF
28+
** INT received while building ${1}, you may want to clean up the relevant
29+
output, deploy, and distsrc-* directories before rebuilding
30+
31+
Hint: To blow everything away, you may want to use:
32+
33+
$ git clean -xdff --exclude='/depends/SDKs/*'
34+
35+
Specifically, this will remove all files without an entry in the index,
36+
excluding the SDK directory. Practically speaking, this means that all ignored
37+
and untracked files and directories will be wiped, allowing you to start anew.
38+
EOF
39+
}
40+
41+
# Deterministically build Bitcoin Core for HOSTs (overridable by environment)
42+
# shellcheck disable=SC2153
43+
for host in ${HOSTS=x86_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu riscv64-linux-gnu x86_64-w64-mingw32}; do
2444

2545
# Display proper warning when the user interrupts the build
26-
trap 'echo "** INT received while building ${host}, you may want to clean up the relevant output and distsrc-* directories before rebuilding"' INT
27-
28-
# Run the build script 'contrib/guix/libexec/build.sh' in the build
29-
# container specified by 'contrib/guix/manifest.scm'
30-
# shellcheck disable=SC2086
31-
time-machine environment --manifest="${PWD}/contrib/guix/manifest.scm" \
32-
--container \
33-
--pure \
34-
--no-cwd \
35-
--share="$PWD"=/bitcoin \
36-
${SOURCES_PATH:+--share="$SOURCES_PATH"} \
37-
${ADDITIONAL_GUIX_ENVIRONMENT_FLAGS} \
38-
-- env HOST="$host" \
39-
MAX_JOBS="$MAX_JOBS" \
40-
SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:?unable to determine value}" \
41-
${V:+V=1} \
42-
${SOURCES_PATH:+SOURCES_PATH="$SOURCES_PATH"} \
43-
bash -c "cd /bitcoin && bash contrib/guix/libexec/build.sh"
46+
trap 'int_trap ${host}' INT
47+
48+
(
49+
# Required for 'contrib/guix/manifest.scm' to output the right manifest
50+
# for the particular $HOST we're building for
51+
export HOST="$host"
52+
53+
# Run the build script 'contrib/guix/libexec/build.sh' in the build
54+
# container specified by 'contrib/guix/manifest.scm'.
55+
#
56+
# Explanation of `guix environment` flags:
57+
#
58+
# --container run command within an isolated container
59+
#
60+
# Running in an isolated container minimizes build-time differences
61+
# between machines and improves reproducibility
62+
#
63+
# --pure unset existing environment variables
64+
#
65+
# Same rationale as --container
66+
#
67+
# --no-cwd do not share current working directory with an
68+
# isolated container
69+
#
70+
# When --container is specified, the default behavior is to share
71+
# the current working directory with the isolated container at the
72+
# same exact path (e.g. mapping '/home/satoshi/bitcoin/' to
73+
# '/home/satoshi/bitcoin/'). This means that the $PWD inside the
74+
# container becomes a source of irreproducibility. --no-cwd disables
75+
# this behaviour.
76+
#
77+
# --share=SPEC for containers, share writable host file system
78+
# according to SPEC
79+
#
80+
# --share="$PWD"=/bitcoin
81+
#
82+
# maps our current working directory to /bitcoin
83+
# inside the isolated container, which we later cd
84+
# into.
85+
#
86+
# While we don't want to map our current working directory to the
87+
# same exact path (as this introduces irreproducibility), we do want
88+
# it to be at a _fixed_ path _somewhere_ inside the isolated
89+
# container so that we have something to build. '/bitcoin' was
90+
# chosen arbitrarily.
91+
#
92+
# ${SOURCES_PATH:+--share="$SOURCES_PATH"}
93+
#
94+
# make the downloaded depends sources path available
95+
# inside the isolated container
96+
#
97+
# The isolated container has no network access as it's in a
98+
# different network namespace from the main machine, so we have to
99+
# make the downloaded depends sources available to it. The sources
100+
# should have been downloaded prior to this invocation.
101+
#
102+
# shellcheck disable=SC2086
103+
time-machine environment --manifest="${PWD}/contrib/guix/manifest.scm" \
104+
--container \
105+
--pure \
106+
--no-cwd \
107+
--share="$PWD"=/bitcoin \
108+
${SOURCES_PATH:+--share="$SOURCES_PATH"} \
109+
${ADDITIONAL_GUIX_ENVIRONMENT_FLAGS} \
110+
-- env HOST="$host" \
111+
MAX_JOBS="$MAX_JOBS" \
112+
SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:?unable to determine value}" \
113+
${V:+V=1} \
114+
${SOURCES_PATH:+SOURCES_PATH="$SOURCES_PATH"} \
115+
bash -c "cd /bitcoin && bash contrib/guix/libexec/build.sh"
116+
)
44117

45118
done

contrib/guix/libexec/build.sh

Lines changed: 149 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env bash
22
export LC_ALL=C
33
set -e -o pipefail
4+
export TZ=UTC
45

56
# Check that environment variables assumed to be set by the environment are set
67
echo "Building for platform triple ${HOST:?not set} with reference timestamp ${SOURCE_DATE_EPOCH:?not set}..."
@@ -36,23 +37,41 @@ store_path() {
3637
--expression='s|"[[:space:]]*$||'
3738
}
3839

39-
# Determine output paths to use in CROSS_* environment variables
40-
CROSS_GLIBC="$(store_path glibc-cross-${HOST})"
41-
CROSS_GLIBC_STATIC="$(store_path glibc-cross-${HOST} static)"
42-
CROSS_KERNEL="$(store_path linux-libre-headers-cross-${HOST})"
43-
CROSS_GCC="$(store_path gcc-cross-${HOST})"
44-
CROSS_GCC_LIBS=( "${CROSS_GCC}/lib/gcc/${HOST}"/* ) # This expands to an array of directories...
45-
CROSS_GCC_LIB="${CROSS_GCC_LIBS[0]}" # ...we just want the first one (there should only be one)
46-
4740
# Set environment variables to point Guix's cross-toolchain to the right
4841
# includes/libs for $HOST
49-
#
50-
# NOTE: CROSS_C_INCLUDE_PATH is missing ${CROSS_GCC_LIB}/include-fixed, because
51-
# the limits.h in it is missing a '#include_next <limits.h>'
52-
#
53-
export CROSS_C_INCLUDE_PATH="${CROSS_GCC_LIB}/include:${CROSS_GLIBC}/include:${CROSS_KERNEL}/include"
54-
export CROSS_CPLUS_INCLUDE_PATH="${CROSS_GCC}/include/c++:${CROSS_GCC}/include/c++/${HOST}:${CROSS_GCC}/include/c++/backward:${CROSS_C_INCLUDE_PATH}"
55-
export CROSS_LIBRARY_PATH="${CROSS_GCC}/lib:${CROSS_GCC}/${HOST}/lib:${CROSS_GCC_LIB}:${CROSS_GLIBC}/lib:${CROSS_GLIBC_STATIC}/lib"
42+
case "$HOST" in
43+
*mingw*)
44+
# Determine output paths to use in CROSS_* environment variables
45+
CROSS_GLIBC="$(store_path "mingw-w64-x86_64-winpthreads")"
46+
CROSS_GCC="$(store_path "gcc-cross-${HOST}")"
47+
CROSS_GCC_LIBS=( "${CROSS_GCC}/lib/gcc/${HOST}"/* ) # This expands to an array of directories...
48+
CROSS_GCC_LIB="${CROSS_GCC_LIBS[0]}" # ...we just want the first one (there should only be one)
49+
50+
NATIVE_GCC="$(store_path gcc-glibc-2.27-toolchain)"
51+
export LIBRARY_PATH="${NATIVE_GCC}/lib:${NATIVE_GCC}/lib64"
52+
export CPATH="${NATIVE_GCC}/include"
53+
54+
export CROSS_C_INCLUDE_PATH="${CROSS_GCC_LIB}/include:${CROSS_GCC_LIB}/include-fixed:${CROSS_GLIBC}/include"
55+
export CROSS_CPLUS_INCLUDE_PATH="${CROSS_GCC}/include/c++:${CROSS_GCC}/include/c++/${HOST}:${CROSS_GCC}/include/c++/backward:${CROSS_C_INCLUDE_PATH}"
56+
export CROSS_LIBRARY_PATH="${CROSS_GCC}/lib:${CROSS_GCC}/${HOST}/lib:${CROSS_GCC_LIB}:${CROSS_GLIBC}/lib"
57+
;;
58+
*linux*)
59+
CROSS_GLIBC="$(store_path "glibc-cross-${HOST}")"
60+
CROSS_GLIBC_STATIC="$(store_path "glibc-cross-${HOST}" static)"
61+
CROSS_KERNEL="$(store_path "linux-libre-headers-cross-${HOST}")"
62+
CROSS_GCC="$(store_path "gcc-cross-${HOST}")"
63+
CROSS_GCC_LIBS=( "${CROSS_GCC}/lib/gcc/${HOST}"/* ) # This expands to an array of directories...
64+
CROSS_GCC_LIB="${CROSS_GCC_LIBS[0]}" # ...we just want the first one (there should only be one)
65+
66+
# NOTE: CROSS_C_INCLUDE_PATH is missing ${CROSS_GCC_LIB}/include-fixed, because
67+
# the limits.h in it is missing a '#include_next <limits.h>'
68+
export CROSS_C_INCLUDE_PATH="${CROSS_GCC_LIB}/include:${CROSS_GLIBC}/include:${CROSS_KERNEL}/include"
69+
export CROSS_CPLUS_INCLUDE_PATH="${CROSS_GCC}/include/c++:${CROSS_GCC}/include/c++/${HOST}:${CROSS_GCC}/include/c++/backward:${CROSS_C_INCLUDE_PATH}"
70+
export CROSS_LIBRARY_PATH="${CROSS_GCC}/lib:${CROSS_GCC}/${HOST}/lib:${CROSS_GCC_LIB}:${CROSS_GLIBC}/lib:${CROSS_GLIBC_STATIC}/lib"
71+
;;
72+
*)
73+
exit 1 ;;
74+
esac
5675

5776
# Sanity check CROSS_*_PATH directories
5877
IFS=':' read -ra PATHS <<< "${CROSS_C_INCLUDE_PATH}:${CROSS_CPLUS_INCLUDE_PATH}:${CROSS_LIBRARY_PATH}"
@@ -74,16 +93,20 @@ export GUIX_LD_WRAPPER_DISABLE_RPATH=yes
7493
[ -e /usr/bin/env ] || ln -s --no-dereference "$(command -v env)" /usr/bin/env
7594

7695
# Determine the correct value for -Wl,--dynamic-linker for the current $HOST
77-
glibc_dynamic_linker=$(
78-
case "$HOST" in
79-
i686-linux-gnu) echo /lib/ld-linux.so.2 ;;
80-
x86_64-linux-gnu) echo /lib64/ld-linux-x86-64.so.2 ;;
81-
arm-linux-gnueabihf) echo /lib/ld-linux-armhf.so.3 ;;
82-
aarch64-linux-gnu) echo /lib/ld-linux-aarch64.so.1 ;;
83-
riscv64-linux-gnu) echo /lib/ld-linux-riscv64-lp64d.so.1 ;;
84-
*) exit 1 ;;
85-
esac
86-
)
96+
case "$HOST" in
97+
*linux*)
98+
glibc_dynamic_linker=$(
99+
case "$HOST" in
100+
i686-linux-gnu) echo /lib/ld-linux.so.2 ;;
101+
x86_64-linux-gnu) echo /lib64/ld-linux-x86-64.so.2 ;;
102+
arm-linux-gnueabihf) echo /lib/ld-linux-armhf.so.3 ;;
103+
aarch64-linux-gnu) echo /lib/ld-linux-aarch64.so.1 ;;
104+
riscv64-linux-gnu) echo /lib/ld-linux-riscv64-lp64d.so.1 ;;
105+
*) exit 1 ;;
106+
esac
107+
)
108+
;;
109+
esac
87110

88111
# Environment variables for determinism
89112
export QT_RCC_TEST=1
@@ -136,11 +159,27 @@ DISTNAME="$(basename "$SOURCEDIST" '.tar.gz')"
136159
# Binary Tarball Building #
137160
###########################
138161

139-
# Similar flags to Gitian
140-
CONFIGFLAGS="--enable-glibc-back-compat --enable-reduce-exports --disable-bench --disable-gui-tests"
141-
HOST_CFLAGS="-O2 -g -ffile-prefix-map=${PWD}=."
142-
HOST_CXXFLAGS="-O2 -g -ffile-prefix-map=${PWD}=."
143-
HOST_LDFLAGS="-Wl,--as-needed -Wl,--dynamic-linker=$glibc_dynamic_linker -static-libstdc++"
162+
# CONFIGFLAGS
163+
CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-gui-tests"
164+
case "$HOST" in
165+
*linux*) CONFIGFLAGS+=" --enable-glibc-back-compat" ;;
166+
esac
167+
168+
# CFLAGS
169+
HOST_CFLAGS="-O2 -g"
170+
case "$HOST" in
171+
*linux*) HOST_CFLAGS+=" -ffile-prefix-map=${PWD}=." ;;
172+
*mingw*) HOST_CFLAGS+=" -fno-ident" ;;
173+
esac
174+
175+
# CXXFLAGS
176+
HOST_CXXFLAGS="$HOST_CFLAGS"
177+
178+
# LDFLAGS
179+
case "$HOST" in
180+
*linux*) HOST_LDFLAGS="-Wl,--as-needed -Wl,--dynamic-linker=$glibc_dynamic_linker -static-libstdc++" ;;
181+
*mingw*) HOST_LDFLAGS="-Wl,--no-insert-timestamp" ;;
182+
esac
144183

145184
# Make $HOST-specific native binaries from depends available in $PATH
146185
export PATH="${BASEPREFIX}/${HOST}/native/bin:${PATH}"
@@ -160,7 +199,7 @@ export PATH="${BASEPREFIX}/${HOST}/native/bin:${PATH}"
160199
${CONFIGFLAGS} \
161200
CFLAGS="${HOST_CFLAGS}" \
162201
CXXFLAGS="${HOST_CXXFLAGS}" \
163-
LDFLAGS="${HOST_LDFLAGS}"
202+
${HOST_LDFLAGS:+LDFLAGS="${HOST_LDFLAGS}"}
164203

165204
sed -i.old 's/-lstdc++ //g' config.status libtool src/univalue/config.status src/univalue/libtool
166205

@@ -169,9 +208,21 @@ export PATH="${BASEPREFIX}/${HOST}/native/bin:${PATH}"
169208

170209
# Perform basic ELF security checks on a series of executables.
171210
make -C src --jobs=1 check-security ${V:+V=1}
172-
# Check that executables only contain allowed gcc, glibc and libstdc++
173-
# version symbols for Linux distro back-compatibility.
174-
make -C src --jobs=1 check-symbols ${V:+V=1}
211+
212+
case "$HOST" in
213+
*linux*|*mingw*)
214+
# Check that executables only contain allowed gcc, glibc and libstdc++
215+
# version symbols for Linux distro back-compatibility.
216+
make -C src --jobs=1 check-symbols ${V:+V=1}
217+
;;
218+
esac
219+
220+
# Make the os-specific installers
221+
case "$HOST" in
222+
*mingw*)
223+
make deploy ${V:+V=1}
224+
;;
225+
esac
175226

176227
# Setup the directory where our Bitcoin Core build for HOST will be
177228
# installed. This directory will also later serve as the input for our
@@ -180,9 +231,21 @@ export PATH="${BASEPREFIX}/${HOST}/native/bin:${PATH}"
180231
mkdir -p "${INSTALLPATH}"
181232
# Install built Bitcoin Core to $INSTALLPATH
182233
make install DESTDIR="${INSTALLPATH}" ${V:+V=1}
234+
235+
case "$HOST" in
236+
*mingw*)
237+
cp -f --target-directory="$OUTDIR" ./*-setup-unsigned.exe
238+
;;
239+
esac
183240
(
184241
cd installed
185242

243+
case "$HOST" in
244+
*mingw*)
245+
mv --target-directory="$DISTNAME"/lib/ "$DISTNAME"/bin/*.dll
246+
;;
247+
esac
248+
186249
# Prune libtool and object archives
187250
find . -name "lib*.la" -delete
188251
find . -name "lib*.a" -delete
@@ -196,19 +259,60 @@ export PATH="${BASEPREFIX}/${HOST}/native/bin:${PATH}"
196259
find "${DISTNAME}/lib" -type f -print0
197260
} | xargs -0 -n1 -P"$MAX_JOBS" -I{} "${DISTSRC}/contrib/devtools/split-debug.sh" {} {} {}.dbg
198261

199-
cp "${DISTSRC}/doc/README.md" "${DISTNAME}/"
262+
case "$HOST" in
263+
*mingw*)
264+
cp "${DISTSRC}/doc/README_windows.txt" "${DISTNAME}/readme.txt"
265+
;;
266+
*linux*)
267+
cp "${DISTSRC}/doc/README.md" "${DISTNAME}/"
268+
;;
269+
esac
200270

201271
# Finally, deterministically produce {non-,}debug binary tarballs ready
202272
# for release
203-
find "${DISTNAME}" -not -name "*.dbg" -print0 \
204-
| sort --zero-terminated \
205-
| tar --create --no-recursion --mode='u+rw,go+r-w,a+X' --null --files-from=- \
206-
| gzip -9n > "${OUTDIR}/${DISTNAME}-${HOST}.tar.gz" \
207-
|| ( rm -f "${OUTDIR}/${DISTNAME}-${HOST}.tar.gz" && exit 1 )
208-
find "${DISTNAME}" -name "*.dbg" -print0 \
209-
| sort --zero-terminated \
210-
| tar --create --no-recursion --mode='u+rw,go+r-w,a+X' --null --files-from=- \
211-
| gzip -9n > "${OUTDIR}/${DISTNAME}-${HOST}-debug.tar.gz" \
212-
|| ( rm -f "${OUTDIR}/${DISTNAME}-${HOST}-debug.tar.gz" && exit 1 )
273+
case "$HOST" in
274+
*mingw*)
275+
find "${DISTNAME}" -not -name "*.dbg" -print0 \
276+
| xargs -0r touch --no-dereference --date="@${SOURCE_DATE_EPOCH}"
277+
find "${DISTNAME}" -not -name "*.dbg" \
278+
| sort \
279+
| zip -X@ "${OUTDIR}/${DISTNAME}-${HOST//x86_64-w64-mingw32/win64}.zip" \
280+
|| ( rm -f "${OUTDIR}/${DISTNAME}-${HOST//x86_64-w64-mingw32/win64}.zip" && exit 1 )
281+
find "${DISTNAME}" -name "*.dbg" -print0 \
282+
| xargs -0r touch --no-dereference --date="@${SOURCE_DATE_EPOCH}"
283+
find "${DISTNAME}" -name "*.dbg" \
284+
| sort \
285+
| zip -X@ "${OUTDIR}/${DISTNAME}-${HOST//x86_64-w64-mingw32/win64}-debug.zip" \
286+
|| ( rm -f "${OUTDIR}/${DISTNAME}-${HOST//x86_64-w64-mingw32/win64}-debug.zip" && exit 1 )
287+
;;
288+
*linux*)
289+
find "${DISTNAME}" -not -name "*.dbg" -print0 \
290+
| sort --zero-terminated \
291+
| tar --create --no-recursion --mode='u+rw,go+r-w,a+X' --null --files-from=- \
292+
| gzip -9n > "${OUTDIR}/${DISTNAME}-${HOST}.tar.gz" \
293+
|| ( rm -f "${OUTDIR}/${DISTNAME}-${HOST}.tar.gz" && exit 1 )
294+
find "${DISTNAME}" -name "*.dbg" -print0 \
295+
| sort --zero-terminated \
296+
| tar --create --no-recursion --mode='u+rw,go+r-w,a+X' --null --files-from=- \
297+
| gzip -9n > "${OUTDIR}/${DISTNAME}-${HOST}-debug.tar.gz" \
298+
|| ( rm -f "${OUTDIR}/${DISTNAME}-${HOST}-debug.tar.gz" && exit 1 )
299+
;;
300+
esac
213301
)
214302
)
303+
304+
case "$HOST" in
305+
*mingw*)
306+
cp -rf --target-directory=. contrib/windeploy
307+
(
308+
cd ./windeploy
309+
mkdir unsigned
310+
cp --target-directory=unsigned/ "$OUTDIR"/bitcoin-*-setup-unsigned.exe
311+
find . -print0 \
312+
| sort --zero-terminated \
313+
| tar --create --no-recursion --mode='u+rw,go+r-w,a+X' --null --files-from=- \
314+
| gzip -9n > "${OUTDIR}/${DISTNAME}-win-unsigned.tar.gz" \
315+
|| ( rm -f "${OUTDIR}/${DISTNAME}-win-unsigned.tar.gz" && exit 1 )
316+
)
317+
;;
318+
esac

0 commit comments

Comments
 (0)