Created attachment 13960 [details] [review] Fix GNU ld assumption since dbus 1.0 some LDFLAGS have changed in dbus, and as such, ./configure no longer passes on Mac OS X. This patch wraps the -z option in a check for with_gnu_ld.
Created attachment 13992 [details] [review] various Mac OS X build fixes fix the GNU ld issue from the previous patch, also include the _NSGetEnviron fix for using *environ which had accidentally snuck into my launchd patches for bug #14259 instead.
First part of the patch looks fine. As for the second part - is it really that gross? =) Do you have any references offhand for other projects which have a similar configure.in construct?
Yes, it really is. :P _environ as a symbol only exists at runtime (it's part of the crt0.o that's linked into executables) so unless you want to link without resolving all symbols (which is discouraged on OSX) it's the easiest way to add emulation for the way the rest of the world uses *environ. If you google around for _NSGetEnviron you get a lot of hits for this same bit of code, it's pretty much the standard way folks do this on OSX now. http://www.open-mpi.org/community/lists/devel/2007/05/1593.php http://www.mail-archive.com/fink-commits@lists.sourceforge.net/msg54196.html http://www.cocoabuilder.com/archive/message/xcode/2006/5/2/6095 ...and so on.
looks good for inclusion in the next point release.
*** Bug 14625 has been marked as a duplicate of this bug. ***
something is wrong with the with_gnu_ld check on my version of autoconf. It only evaluates to 'yes' if I pass --with-gnu-ld to configure. The strange thing is it sets with_gnu_ld=$lt_cv_prog_gnu_ld in configure (I verified both are set with an echo) but if I echo $with_gnu_ld at the spot you make the check $lt_cv_prog_gnu_ld=yes but $with_gnu_ld evaluates to an empty string. Doing more checking
Figured it out. AM_PROG_LIBTOOL moved to the top. And I made the test more robust to actually check if the flag works not if we are using the GNU linker. Please check latest git on OS X and close this bug if fixed.
Yeah, the new tests work great, and make finished: checking whether /usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld supports "-z,relro"... no Thanks!
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.