This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

On darwin8, no need to use flat namespace for libstdc++

As of Tiger8A347, the dynamic linker is finally fixed so that new and
delete can be overridden without needing to build both libstdc++ and
your executable with -flat_namespace.  Yay!  We can now remove that
workaround.  I've assumed that plain "darwin" means "not sure, please
try to make it work in all circumstances".

Bootstrapped & tested on powerpc-darwin8, verified that it does not
change the testsuite results.  Also verified that the tests in the C++
testsuite that override new & delete still pass and do not
use -flat_namespace.

- Geoffrey Keating <>

===File ~/patches/gcc-3168188.patch=========================
2005-01-13  Geoffrey Keating  <>

	* (darwin): On darwin8 or later, no need to build
	libstdc++ with -flat_namespace.

RCS file: /cvs/gcc/gcc/libstdc++-v3/,v
retrieving revision 1.33
diff -u -p -u -p -r1.33
---	28 Dec 2004 16:34:15 -0000	1.33
+++	13 Jan 2005 22:24:43 -0000
@@ -174,13 +174,19 @@ case "${host_os}" in
-  darwin*)
+  darwin | darwin[1-7] | darwin[1-7].*)
     # On Darwin, performance is improved if libstdc++ is single-module.
-    # Up to at least 10.3.5, -flat_namespace is required for proper
+    # Up to at least 10.3.7, -flat_namespace is required for proper
     # treatment of coalesced symbols.
     OPT_LDFLAGS="${OPT_LDFLAGS} -Wl,-single_module -Wl,-flat_namespace"
+  darwin[89] | darwin[89].* | darwin[1-9][0-9]* )
+    # On Darwin, performance is improved if libstdc++ is single-module,
+    # and on 8+ compatibility is better if not -flat_namespace.
+    OPT_LDFLAGS="${OPT_LDFLAGS} -Wl,-single_module"
+    os_include_dir="os/bsd/darwin"
+    ;;
   *djgpp*)      # leading * picks up "msdosdjgpp"

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]