Skip to content

Commit e76624e

Browse files
committed
Higher zip compression, disable default advzip
As of GDB 13.1, gdb.exe contains data triggering a bug in x64 Explorer zip integration at last as far back as Windows 7. After recompressing with advzip, gdb.exe extraction fails with 0x80004005 "Unspecified error". This happens with both 32-bit and 64-bit gdb.exe regardless of compiler flags. No other zip program has trouble with this file. Until this is resolved, give up on advzip and tell zip to use -9. Also renamed the build script option from -q (quick) to -O (optimize) and disable its use by default.
1 parent 0423b55 commit e76624e

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,4 +496,4 @@ RUN printf "id ICON \"$PREFIX/src/w64devkit.ico\"" >w64devkit.rc \
496496
>>$PREFIX/COPYING.MinGW-w64-runtime.txt \
497497
&& echo $VERSION >$PREFIX/VERSION.txt
498498
ENV PREFIX=${PREFIX}
499-
CMD zip -qXr - $PREFIX
499+
CMD zip -q9Xr - $PREFIX

multibuild.sh

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
set -e
1111
arch=""
12-
compact=auto
12+
compact=no
1313
dryrun=
1414
flavors=""
1515
suffix="$(git describe --exact-match 2>/dev/null | tr v - || true)"
@@ -25,8 +25,8 @@ usage: multibuild.sh [-48abfhmnq] [-s SUFFIX]
2525
-h Print this help message
2626
-m Enable mini build (default: no)
2727
-n Dry run, print commands but do nothing
28+
-O Compact with advzip (default: no, less compatible)
2829
-s SUFFIX Append a version suffix (e.g. "-s -1.2.3", default:auto)
29-
-q Quick: do no compact with advzip (default: auto)
3030
EOF
3131
}
3232

@@ -40,8 +40,8 @@ while getopts 48abfhmnqs: opt; do
4040
h) usage; exit 0;;
4141
m) flavors="$flavors -mini";;
4242
n) dryrun=echo;;
43+
O) compact=yes;;
4344
s) suffix="$OPTARG";;
44-
q) compact=no;;
4545
?) usage >&2; exit 1;;
4646
esac
4747
done
@@ -53,12 +53,6 @@ if [ $# -gt 0 ]; then
5353
exit 1
5454
fi
5555

56-
if [ $compact = auto ] && command -v advzip >/dev/null 2>&1; then
57-
compact=yes
58-
else
59-
compact=no
60-
fi
61-
6256
if [ -z "$arch" ]; then
6357
arch="w64devkit"
6458
fi

0 commit comments

Comments
 (0)