Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

binutils build fails because of pex-unix file

Tags:

msys2

binutils

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

like image 450
Intelligide Avatar asked Aug 26 '15 17:08

Intelligide


1 Answers

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

like image 51
Intelligide Avatar answered Oct 30 '22 16:10

Intelligide