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]

pexecute.c on cygwin for cross compile


We've been using 3.0.3 for a while and are now building 3.2
host i686-cygwin 
target mips-wrs-vxworks

trouble is the cross compiler is using fork() rather than spawn*()
and I am running into problems getting
fork: Permission denied (which did not happen in 3.0.3 -> same setup cygwin
1.3.14-1 on Win2K SP3)


anyway it seems the cross compiler should be using spawn()

looking at pexecute.c and the defines required it seems 
it needs to be built with _WIN32 and __CYGWIN__ defined

__CYGWIN__ is defined but _WIN32 is not since it seems to only get
turned on by the -mwin32 flag which is only turned on if the target is
cygwin as well.

I made the following changes to get the cross compiler to use spawn()
not sure if this is the best place or there is some config file to
change....


254c254
< #if (defined (_WIN32) || defined(__CYGWIN__)) && ! defined (_UWIN)
---
> #if defined (_WIN32) && ! defined (_UWIN)
665c665
<     && ! ((defined (_WIN32) || defined(__CYGWIN__)) && ! defined (_UWIN))
---
>     && ! (defined (_WIN32) && ! defined (_UWIN))


ken faiczak
kfaiczak@sandvine.com


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