[Bug bootstrap/64349] [5 Regression] Bootstrapping Ada fails on darwin(9|10).
iains at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Dec 18 11:28:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64349
--- Comment #2 from Iain Sandoe <iains at gcc dot gnu.org> ---
Created attachment 34299
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34299&action=edit
proper fix.
So, the rules on Darwin say that it's OK to access _environ directly from the
main executable, but it is NOT OK to access it from a shared libaray. Instead,
one should use the _NSGetEnviron() API).
===
My initial patch works because it allows the symbol to be satisfied at load
time by dynamic lookup (it will be found from the exe, I assume).
===
The patch attached above uses the correct API - and works AFAICT on
powerpc-darwin9 and x86_64-darwin12.
More information about the Gcc-bugs
mailing list