This is the mail archive of the 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

"Zack Weinberg" <> writes:

> 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.

Well, you can try sending a kernel patch to Hyperion, but I don't
think it will get in 4.0...  AmigaOS commandlines are strings, not
vectors.   It has always been that way, and it will probably stay that
way from some time yet.

>    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.

And I assume you also know that there is a pexecute implementation for
MSDOS which does the same thing?  If all systems are required to
function like UNIX, then what's the point of pexecute?

> 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.

The OS does have pipes.  So it possible to have -pipe, once support
for it is added to pexecute.  But that can come later.  No need to
make the patch even bigger than it already is.

> 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.

Ok, sounds reasonable.

>    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.
>    []

Hah, some of that commentary suggests that popen() should be used.  :)

Well, with your patch my job would certainly be a bit easier.  Was
there any consensus on exactly why it was bad?

Maybe adding some more #ifdefs to collect2.c will help your
argumentation that the cleanup is needed?  ;-)

  // Marcus

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