This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

Re: -fvisibility-inlines-hidden for x86-darwin builds


On Oct 24, 2006, at 6:04 AM, Benjamin Kosnik wrote:


I assume this means Apple is using the visibility support in 4.2+? If so, any feedback on the implementation would be useful for the rest of us.

2006-10-23 Howard Hinnant <hhinnant@apple.com>

	* libstdc++-v3/configure, libstdc++-v3/acinclude.m4
	  Allow OPTIMIZE_CXXFLAGS to be set by configure.host.
	* libstdc++-v3/configure.host
	  Set OPTIMIZE_CXXFLAGS to -fvisibility-inlines-hidden
	  for x86/darwin

This is fine. Usually you don't include auto-generated files in the patch.


So, you'd have:

 	* libstdc++-v3/acinclude.m4:
 	  Allow OPTIMIZE_CXXFLAGS to be set by configure.host
	* libstdc++-v3/configure: Regenerated.

Please add a comment in acinclude.m4 about setting OPTIMIZE_CXXFLAGS in
configure.host.

Ok, thanks Benjamin. Know that I'm stumbling around in the dark with respect to configure, autoconfigure, automake and even make. I've just received today the book "GNU Autoconf, Automate, and Libtool" on the good advice of Eric Christopher, am reading it, but haven't had time to read much of it yet.


So who/how does configure get regenerated? Autoconf is my best guess but I'm not clear if that requires something to be checked in (I don't see configure.in). I'm also not clear if this body prefers that I check in these changes myself (once approved) or if someone such as yourself or Paolo would prefer to check in this patch.

Here is what I currently have based on your good advice (and thanks).

-Howard

Index: libstdc++-v3/ChangeLog
===================================================================
--- libstdc++-v3/ChangeLog (revision 118007)
+++ libstdc++-v3/ChangeLog (working copy)
@@ -1,3 +1,12 @@
+2006-10-24 Howard Hinnant <hhinnant@apple.com>
+
+ * libstdc++-v3/acinclude.m4:
+ Allow OPTIMIZE_CXXFLAGS to be set by configure.host.
+ * libstdc++-v3/configure: Regenerated.
+ * libstdc++-v3/configure.host:
+ Set OPTIMIZE_CXXFLAGS to -fvisibility-inlines-hidden
+ for x86/darwin
+
2006-10-17 Paolo Carlini <pcarlini@suse.de>
* include/bits/locale_facets.tcc (money_get<>::__do_get (iter_type,
Index: libstdc++-v3/configure.host
===================================================================
--- libstdc++-v3/configure.host (revision 118007)
+++ libstdc++-v3/configure.host (working copy)
@@ -202,6 +202,11 @@
# 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"
+ case "${host_cpu}" in
+ i[34567]86 | x86_64)
+ OPTIMIZE_CXXFLAGS="${OPTIMIZE_CXXFLAGS} -fvisibility-inlines- hidden"
+ ;;
+ esac
os_include_dir="os/bsd/darwin"
;;
*djgpp*) # leading * picks up "msdosdjgpp"
Index: libstdc++-v3/acinclude.m4
===================================================================
--- libstdc++-v3/acinclude.m4 (revision 118007)
+++ libstdc++-v3/acinclude.m4 (working copy)
@@ -653,8 +653,8 @@
AC_DEFUN([GLIBCXX_EXPORT_FLAGS], [
# Optimization flags that are probably a good idea for thrill- seekers. Just
# uncomment the lines below and make, everything else is ready to go...
+ # Alternatively OPTIMIZE_CXXFLAGS can be set in configure.host.
# OPTIMIZE_CXXFLAGS = -O3 -fstrict-aliasing -fvtable-gc
- OPTIMIZE_CXXFLAGS=
AC_SUBST(OPTIMIZE_CXXFLAGS)
WARN_FLAGS='-Wall -Wextra -Wwrite-strings -Wcast-qual'



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