[cs] pipe infrastructure support

Ian Lance Taylor ian@wasabisystems.com
Wed Sep 24 23:28:00 GMT 2003


"Zack Weinberg" <zack@codesourcery.com> writes:

> Ian Lance Taylor <ian@wasabisystems.com> writes:
> 
> > If your concern is exclusively a cross-compiler configuration, then
> > another approach is to get the GNU linker to do everything which
> > collect2 does.
> 
> Again, I sympathize with this desire, but it doesn't solve my problem
> right now.
> 
> My understanding is that collect2's only function, for systems with a
> modern GNU linker, is handling -frepo mode template instantiation.
> Mike had a patch to avoid the use of collect2 entirely when it wasn't
> going to do anything - whatever happened to that?
> 
> However, even if such a patch is applied, it won't solve my problem;
> my clients want to be able to use -frepo with this cross compiler.

Hmmm, I see.

Zack, it seems to me that your original patch in January tries to
overload the pexecute function to do, effectively, popen.  To me,
without having looked at the problem in detail, that seems like the
wrong approach.

Since collect just needs popen, why not write a portable popen
function and put that in libiberty, instead of trying to reuse
pexecute which is really intended for different purposes?  Then use
the new popen function for collect_execute.  Naturally popen and
pexecute would share some common subroutines.

It should be possible to write popen for any target, by simply
redirecting the output to a file if necessary.

Or maybe I'm missing something.

Ian



More information about the Gcc-patches mailing list