[Patch, Ada, Darwin] Remove use of "flat_namespace" linker flag.

Iain Sandoe developer@sandoe-acoustics.co.uk
Wed Sep 7 08:13:00 GMT 2011

The "-flat_namespace" linker flag defeats one of Darwin's nicer  
features (two-level library namespaces).

AFAIU, it was habitually applied to unix projects in the early  
versions of darwin to cater for assumptions about library ordering  
made in such projects.

However, it is rarely needed these days (perhaps in the case of  
imported unix projects using plugins sometimes).

It also upsets our careful use of an extension library to provide  
current GCC facilities to Darwin 8...11 (which relies on the two-level  
namespace to use both the system and GCC versions of libgcc_s) ...  
and, in particular, this can cause subtle and difficult to diagnose  
differences of behavior between darwin 9 and later systems.


Perhaps I'm missing something (please enlighten me if so), but I can't  
presently see any reason why this needs to be applied to the Ada  
_build_ ...
... and IMHO it's likely to cause end user issues defaulting to it for  
shared library Ada make projects.
(better that the User should explicitly issue the flag where it is  

So is the following OK for trunk?
(no Ada regressions on *-darwin9, x86_64-darwin10).



	* gcc-interface/Makefile.in (darwin): Do not issue the
	'-flat_namespace'  linker flag during Ada build.
	 * mlib-tgt-specific-darwin.adb: Remove 'flat_namespace' flag from
	the default shared library options.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 178615-ada-flat-namespace-diff.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20110907/0e149e51/attachment.txt>
-------------- next part --------------

More information about the Gcc-patches mailing list