]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix MinGW build with GCC 14 and later
authorEli Zaretskii <eliz@gnu.org>
Sun, 19 May 2024 07:58:52 +0000 (10:58 +0300)
committerEshel Yaron <me@eshelyaron.com>
Thu, 23 May 2024 07:42:05 +0000 (09:42 +0200)
* configure.ac [mingw]: Add -Wno-error=implicit-function-declaration
to GCC_TEST_OPTIONS.  (Bug#70889)

(cherry picked from commit 5216903ae6c3f91ebefb1152af40753f723cbc39)

configure.ac

index 47a657a6d2048cd292cb03f29e631f64188e51c3..9d91e8731b5ce1733ef812776c8e2beb3e391047 100644 (file)
@@ -1493,7 +1493,11 @@ case "${canonical}" in
       *-mingw* )
                opsys=mingw32
                # MinGW overrides and adds some system headers in nt/inc.
-               GCC_TEST_OPTIONS="-I $srcdir/nt/inc"
+               # Also, GCC 14 turns on implicit-function-declaration
+               # error by default, which fails configure tests where our
+               # emulation of Posix headers defines only the minimal
+               # stuff we actually need.
+               GCC_TEST_OPTIONS="-I $srcdir/nt/inc -Wno-error=implicit-function-declaration"
                ;;
       *-sysv4.2uw* )           opsys=unixware ;;
       *-sysv5uw* )             opsys=unixware ;;
@@ -1508,7 +1512,7 @@ case "${canonical}" in
       *-mingw* )
                opsys=mingw32
                # MinGW overrides and adds some system headers in nt/inc.
-               GCC_TEST_OPTIONS="-I $srcdir/nt/inc"
+               GCC_TEST_OPTIONS="-I $srcdir/nt/inc -Wno-error=implicit-function-declaration"
                ;;
       ## Otherwise, we'll fall through to the generic opsys code at the bottom.
     esac