I want to cross-compile GCC. I am using MSYS2 as a shell, and mingw-w64 as the compiler.
I have downloaded binutils-2.25 and I configure with:
../binutils/./configure --target=sh3eb-elf --prefix=C:/tempinstall/ --disable-nls
I get an error when I try to build binutils
on libiberty/pex-unix
file:
In function 'pex_wait': error: 'F_GETFD' undeclared (first use in this function) error: 'FD_CLOEXEC' undeclared (first use in this function) error: 'F_SETFD' undeclared (first use in this function) error: 'F_DUPFD' undeclared (first use in this function)
In function 'restore_fd': error: 'FD_CLOEXEC' undeclared (first use in this function) error: 'F_SETFD' undeclared (first use in this function)
In function 'pex_unix_fdopenw': error: 'F_SETFD' undeclared (first use in this function) error: 'FD_CLOEXEC' undeclared (first use in this function)
I have built the same compiler few months ago without problems. But I have since changed OS(Windows 7 to W10) and compiler(MinGW-GCC 4.8 to Mingw64-GCC 4.9)
I followed this tutorial
I found the solution:
I use MSys2 with msys2_shell that defines --msys as host system.
But when I use mingw32_shell( that defines --mingw32 as host), GNU-Make compile pex-win32 and it's works fine
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With