Skip to content

Commit

Permalink
Higher zip compression, disable default advzip
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
skeeto committed May 2, 2023
1 parent 0423b55 commit e76624e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -496,4 +496,4 @@ RUN printf "id ICON \"$PREFIX/src/w64devkit.ico\"" >w64devkit.rc \
>>$PREFIX/COPYING.MinGW-w64-runtime.txt \
&& echo $VERSION >$PREFIX/VERSION.txt
ENV PREFIX=${PREFIX}
CMD zip -qXr - $PREFIX
CMD zip -q9Xr - $PREFIX
12 changes: 3 additions & 9 deletions multibuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

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

Expand All @@ -40,8 +40,8 @@ while getopts 48abfhmnqs: opt; do
h) usage; exit 0;;
m) flavors="$flavors -mini";;
n) dryrun=echo;;
O) compact=yes;;
s) suffix="$OPTARG";;
q) compact=no;;
?) usage >&2; exit 1;;
esac
done
Expand All @@ -53,12 +53,6 @@ if [ $# -gt 0 ]; then
exit 1
fi

if [ $compact = auto ] && command -v advzip >/dev/null 2>&1; then
compact=yes
else
compact=no
fi

if [ -z "$arch" ]; then
arch="w64devkit"
fi
Expand Down

0 comments on commit e76624e

Please sign in to comment.