Re: aarch64-w64-mingw32 hosts: fatal error: sys/wait.h: No such file or directory

coshvji cujmlqef via Gcc-help <[email protected]> Tue, 17 Mar 2026 14:44:25 +0000
Newsgroups gmane.comp.gcc.help
Message-ID <LV2P220MB0847FC339A24BCFDB8654E0CFB41A@LV2P220MB0847.NAMP220.PROD.OUTLOOK.COM>
Here is my patch


diff --git a/fixincludes/configure b/fixincludes/configure
index 662c94dc112..fd765c2ba91 100755
--- a/fixincludes/configure
+++ b/fixincludes/configure
@@ -4818,8 +4818,7 @@ fi
 else
   case $host in
    i?86-*-msdosdjgpp* | \
-   i?86-*-mingw32* | \
-   x86_64-*-mingw32* | \
+   *-*-mingw32* | \
    *-*-beos* | \
         *-*-*vms*)
        TARGET=twoprocess
diff --git a/fixincludes/configure.ac b/fixincludes/configure.ac
index 4e78511d20f..4aad757e3e8 100644
--- a/fixincludes/configure.ac
+++ b/fixincludes/configure.ac
@@ -50,8 +50,7 @@ else
 fi],
 [case $host in
    i?86-*-msdosdjgpp* | \
-   i?86-*-mingw32* | \
-   x86_64-*-mingw32* | \
+   *-*-mingw32* | \
    *-*-beos* | \
         *-*-*vms*)
        TARGET=twoprocess
diff --git a/gcc/config.host b/gcc/config.host
index 8b809a8d5dd..f4456aa8939 100644
--- a/gcc/config.host
+++ b/gcc/config.host
@@ -100,7 +100,7 @@ esac

 case ${host} in
   aarch64*-*-freebsd* | aarch64*-*-linux* | aarch64*-*-fuchsia* |\
-  aarch64*-*-darwin*)
+  aarch64*-*-darwin* | aarch64*-*-mingw* | aarch64*-*-cygwin* )
     case ${target} in
       aarch64*-*-*)
    host_extra_gcc_objs="driver-aarch64.o"
@@ -223,14 +223,14 @@ case ${host} in
         ;;
     esac
     ;;
-  i[34567]86-*-cygwin* | x86_64-*-cygwin*)
+  *-*-cygwin*)
     host_xm_file=i386/xm-cygwin.h
     out_host_hook_obj=host-cygwin.o
     host_xmake_file="${host_xmake_file} i386/x-cygwin"
     host_exeext=.exe
     host_lto_plugin_soname=cyglto_plugin.dll
     ;;
-  i[34567]86-*-mingw32* | x86_64-*-mingw*)
+  *-*-mingw*)
     host_xm_file=i386/xm-mingw32.h
     host_xmake_file="${host_xmake_file} ${host_xmake_mingw} i386/x-mingw32"
     host_extra_gcc_objs="${host_extra_gcc_objs} ${host_extra_gcc_objs_mingw} driver-mingw32.o"

________________________________
From: coshvji cujmlqef <[email protected]>
Sent: Tuesday, March 17, 2026 9:30 PM
To: [email protected] <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: aarch64-w64-mingw32 hosts: fatal error: sys/wait.h: No such file or directory

2025-11-17 Evgeny Karpov <[email protected]> PR diagnostics/122666 * config/i386/x-mingw32 (LIBS): Add -lws2_32 * diagnostics/sarif-sink.cc: Move sockets includes to before config.h and support __MINGW32__.

Hi Evgeny Karpov, I think it did not put the support for woa

________________________________
From: coshvji cujmlqef <[email protected]>
Sent: Tuesday, March 17, 2026 20:35
To: [email protected] <[email protected]>
Subject: aarch64-w64-mingw32 hosts: fatal error: sys/wait.h: No such file or directory

make[1]: Entering directory '/home/sehihd/toolchains_build/toolchainbuildscripts/gcc/.artifacts/gcc/aarch64-w64-mingw32/aarch64-w64-mingw32/gcc/fixincludes'
aarch64-w64-mingw32-gcc -c -g -O2    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -Wno-overlength-strings -pedantic -Wno-long-long   -DHAVE_CONFIG_H -I. -I/home/sehihd/toolchains_build/gcc/fixincludes -I../include -I/home/sehihd/toolchains_build/gcc/fixincludes/../include /home/sehihd/toolchains_build/gcc/fixincludes/fixincl.c
/home/sehihd/toolchains_build/gcc/fixincludes/fixincl.c:29:10: fatal error: sys/wait.h: No such file or directory
   29 | #include <sys/wait.h>
      |          ^~~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:76: fixincl.o] Error 1
make[1]: Leaving directory '/home/sehihd/toolchains_build/toolchainbuildscripts/gcc/.artifacts/gcc/aarch64-w64-mingw32/aarch64-w64-mingw32/gcc/fixincludes'
make: *** [Makefile:4107: all-fixincludes] Error 2
gcc: make all-gcc failed {build:x86_64-linux-gnu, host:aarch64-w64-mingw32, target:aarch64-w64-mingw32}