Skip to content

Commit 5471c58

Browse files
committed
merge bitcoin#28092: document that -Wreturn-type has been fixed upstream (mingw-w64)
1 parent 9098c9c commit 5471c58

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

ci/test/00_setup_env_win64.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,8 @@ export PACKAGES="python3 nsis g++-mingw-w64-x86-64-posix wine-binfmt wine64 wine
1313
export RUN_FUNCTIONAL_TESTS=false
1414
export RUN_SECURITY_TESTS="false"
1515
export GOAL="deploy"
16-
export BITCOIN_CONFIG="--enable-gui --enable-reduce-exports --disable-miner --without-boost-process"
16+
# Prior to 11.0.0, the mingw-w64 headers were missing noreturn attributes, causing warnings when
17+
# cross-compiling for Windows. https://sourceforge.net/p/mingw-w64/bugs/306/
18+
# https://github.com/mingw-w64/mingw-w64/commit/1690994f515910a31b9fb7c7bd3a52d4ba987abe
19+
export BITCOIN_CONFIG="--enable-gui --enable-reduce-exports --disable-miner --without-boost-process CXXFLAGS=-Wno-return-type"
1720
export DIRECT_WINE_EXEC_TESTS=true

configure.ac

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -452,12 +452,6 @@ if test "$enable_werror" = "yes"; then
452452
fi
453453
ERROR_CXXFLAGS=$CXXFLAG_WERROR
454454

455-
dnl -Wreturn-type is broken in GCC for MinGW-w64.
456-
dnl https://sourceforge.net/p/mingw-w64/bugs/306/
457-
AX_CHECK_COMPILE_FLAG([-Werror=return-type], [], [ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Wno-error=return-type"], [$CXXFLAG_WERROR],
458-
[AC_LANG_SOURCE([[#include <cassert>
459-
int f(){ assert(false); }]])])
460-
461455
dnl -Wstringop-overread and -Wstringop-overflow are broken in gcc
462456
AX_CHECK_COMPILE_FLAG([-Wstringop-overread], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wno-stringop-overread"], [], [$CXXFLAG_WERROR])
463457
AX_CHECK_COMPILE_FLAG([-Wstringop-overflow], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wno-stringop-overflow"], [], [$CXXFLAG_WERROR])

0 commit comments

Comments
 (0)