aboutsummaryrefslogtreecommitdiff
path: root/contrib/autotools-patches/apply-all.sh
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/autotools-patches/apply-all.sh')
-rwxr-xr-xcontrib/autotools-patches/apply-all.sh33
1 files changed, 33 insertions, 0 deletions
diff --git a/contrib/autotools-patches/apply-all.sh b/contrib/autotools-patches/apply-all.sh
new file mode 100755
index 00000000..0febcd2d
--- /dev/null
+++ b/contrib/autotools-patches/apply-all.sh
@@ -0,0 +1,33 @@
1#!/bin/bash
2
3#
4# This file applies optional libtool patches mainly for better MSys2 compatibility,
5# especially for MSys2/Clang{64,32} toolchains.
6# It's a pity that these patches haven't been sent upstream.
7#
8# Based on Debian SID baseline files as of December 2021.
9#
10
11patchesdir="$(pwd)"
12
13patches=(
14 0003-Pass-various-flags-to-GCC.patch
15 0006-Fix-strict-ansi-vs-posix-mod.patch
16 0009-libtool-2.4.2.418-msysize-mod.patch
17 0010-libtool-2.4.2-include-process-h-mod.patch
18 0011-Pick-up-clang_rt-static-archives-compiler-internal-l.patch
19 0012-Prefer-response-files-over-linker-scripts-for-mingw-mod.patch
20 0013-Allow-statically-linking-compiler-support-libraries-mod.patch
21 0014-Support-llvm-objdump-f-output-mod.patch
22)
23
24failed=( )
25
26cd ../.. || exit 1
27
28for patch in ${patches[@]}; do
29 patch -N -p1 --no-backup-if-mismatch -r - -i "${patchesdir}/${patch}" || failed+=("$patch")
30done
31
32[[ -n "${failed[@]}" ]] && printf 'Failed patch: %s\n' "${failed[@]}" >&2
33