Skip to content

Commit

Permalink
Fix crossbuild quirks with mingw 64-bit.
Browse files Browse the repository at this point in the history
  • Loading branch information
rben-dev committed Jun 6, 2023
1 parent 12f11ec commit 03e5c66
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/crossbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,13 @@ check_triplet_wordsize(){
# NOTE: for 64 bit triplets, multiarch/crossbuild docker's gcc 4.9 has a bug handling loop unrolling in -O3 and
# is mistaken in detecting arrays overflows at compilation time
# See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64277
# Also, add the "-Wno-pedantic-ms-format" for specific quikrs of mingw with "%lld" (...)
if [ "$triplet" = "x86_64-w64-mingw32" ] || [ "$triplet" = "aarch64-linux-gnu" ]; then
extra_lib_cflags="-O2"
extra_bin_cflags=""
if [ "$triplet" = "x86_64-w64-mingw32" ] && [ "$wordsize" = "64" ]; then
extra_lib_cflags=$extra_lib_cflags" -Wno-pedantic-ms-format"
fi
# There is also a misbehavior for mingw improperly finding unintialized variables
# Also, add the "-Wno-pedantic-ms-format" for specific quikrs of mingw with "%lld" (...)
elif [ "$triplet" = "i686-w64-mingw32" ]; then
Expand Down

0 comments on commit 03e5c66

Please sign in to comment.