[PATCH, libiberty] Fix PR63758 by using the _NSGetEnviron() API on Darwin.

Ian Lance Taylor iant@google.com
Tue Sep 8 14:34:00 GMT 2015


On Tue, Sep 8, 2015 at 7:20 AM, Iain Sandoe <iain@codesourcery.com> wrote:
>
>> This seems likely to break cross-compilers to Darwin that do not have
>> the system libraries available.  I guess I don't care about that if
>> you don't.
>
> I do care about it, but I'm not visualising the case...
>
> AFAICS, when built as a host component for a cross to Darwin from non-Darwin, environ would be declared as **environ as usual.
>
> If an implementation includes a compiler targetting Darwin that defines __APPLE__ but doesn't provide _NSGetEnviron in its libc, then isn't it broken anyway?

I'm talking about the case of building a cross-compiler where the
system libraries are not available.  This is sometimes done as a first
step toward building a full cross-compiler.

Ian



More information about the Gcc-patches mailing list