This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch lto-plugin]: Don't use sys/wait.h for mingw targets


2010/12/2 alsp <alansparkstar@gmail.com>:
>
>>>>> Tested for x86_64-w64-mingw32, i686-pc-mingw32, and i686-pc-cygwin. Ok
>>>>> for apply?
>
> Hi,
>
> I've been trying to compile GCC on MinGW for the past few days and was stuck
> on the wait.h problem until I luckily came across this post. It has resolved
> that particular issue but now I'm getting a different error:
>
> /bin/sh ./libtool --tag=CC ? --mode=compile mingw32-gcc -DHAVE_CONFIG_H -I.
> -I..
> /../src/lto-plugin ?-I../../src/lto-plugin/../include -DHAVE_CONFIG_H ?-Wall
> -We
> rror -g -O2 -D__USE_MINGW_ACCESS -c -o lto-plugin.lo
> ../../src/lto-plugin/lto-pl
> ugin.c
> libtool: compile: ?mingw32-gcc -DHAVE_CONFIG_H -I. -I../../src/lto-plugin
> -I../.
> ./src/lto-plugin/../include -DHAVE_CONFIG_H -Wall -Werror -g -O2
> -D__USE_MINGW_A
> CCESS -c ../../src/lto-plugin/lto-plugin.c -o lto-plugin.o
> cc1.exe: warnings being treated as errors
> ../../src/lto-plugin/lto-plugin.c: In function 'exec_lto_wrapper':
> ../../src/lto-plugin/lto-plugin.c:556:3: error: implicit declaration of
> function
> ?'WIFEXITED'
> ../../src/lto-plugin/lto-plugin.c:556:3: error: implicit declaration of
> function
> ?'WEXITSTATUS'
> make[2]: *** [lto-plugin.lo] Error 1
>
> I've installed MSYS, MinGW, Binutils, Flex, Bison, GMP, MPFR, MPC and am
> running Windows 7 32-bit.
>
> Not sure what other details may be useful - let me know if there are any
> other details that I can provide.
>
> Thanks,
> Alan

Alan,

sorry for that. I have the following defines in my local headers
(which aren't standard) and I will prepare a patch for lto-plugin.c
for this.
If you define '#define WEXITSTATUS(w)    (((w) >> 8) & 0xff)' and
'#define WIFEXITED(w)      (((w) & 0xff) == 0)', the build will be
then successful.

For win32 the result of status can be SIGABRT in the lower 8-bits (if
child got a signal), or in the upper 8 bit the exit-code.

Regards,
Kai


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]