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] AmigaOS 4 port contribution


Marcus Comstedt <marcus@mc.pp.se> writes:

>   2) Add an AmigaOS implementation of pexecute to libiberty.
>
>   3) Disable -pipe for AmigaOS in gcc.c.
>
>   4) Provide alternate implementations for program spawning, using
>      popen in collect2.c and pexecute in gcc.c.

These changes are problematic on several grounds.

1) Most critically important, you may not use popen.  You must use
   lower-level APIs that take argument *vectors* and do not invoke
   an intermediary shell.  If AmigaOS provides no way to do this,
   then AmigaOS's kernel API is *broken* and must be fixed.

   I am not ragging on the lack of true support for pipes, nor am I
   objecting to the lack of fork and exec primitives.  I think both
   of these are deficiencies, but not catastrophic bugs.  Lack of a
   process invocation API that takes an argument vector, however,
   *does* constitute a catastrophic bug.  Yes, I am aware that
   several OSs in widespread use have exactly this bug.

2) You should not need to disable -pipe just because the OS doesn't
   have pipes.  Look at the way this is handled under DJGPP.

3) We don't want more #ifdefs in gcc.c and collect2.c.  You should try
   to push all this down into libiberty, by broadening the pexecute
   API.  For the gcc.c use, a PEXECUTE_REPLACE flag should do: this
   uses exec() if available and exits the caller afterward if not.

   For collect2, see the API revision I tried to institute way back in
   January and the commentary it drew.  I do not have time to make this
   patch acceptable myself, but I would be happy to work with you to
   get it there.
   [http://gcc.gnu.org/ml/gcc-patches/2003-01/msg02331.html]

zw


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