Bug 384513 - make the visibility pragma checks aware of mach-o and not just ELF, and re-enable libxul by default, r=mento+shebs
authorbenjamin@smedbergs.us
Tue, 19 Jun 2007 07:53:05 -0700
changeset 2576 68569c03b8d2ee931cca275a99f12304a524ffb3
parent 2575 1c45b6ce001feefaa820742dda2a37c16f1a901f
child 2577 a8cbe8c71a96a2d0fb12f47d23e88bc331adb796
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmento
bugs384513
milestone1.9a6pre
Bug 384513 - make the visibility pragma checks aware of mach-o and not just ELF, and re-enable libxul by default, r=mento+shebs
browser/confvars.sh
configure.in
xpcom/glue/nsWeakReference.h
xpinstall/src/Makefile.in
--- a/browser/confvars.sh
+++ b/browser/confvars.sh
@@ -35,27 +35,17 @@
 # the terms of any one of the MPL, the GPL or the LGPL.
 #
 # ***** END LICENSE BLOCK *****
 
 MOZ_APP_NAME=firefox
 MOZ_UPDATER=1
 MOZ_PHOENIX=1
 
-case "$target_os" in
-darwin*)
-  # libxul is causing performance issues due to mach-o not hiding symbols
-  # Disable it temporarily
-  MOZ_ENABLE_LIBXUL=
-  ;;
-*)
-  MOZ_ENABLE_LIBXUL=1
-  ;;
-esac
-
+MOZ_ENABLE_LIBXUL=1
 MOZ_PLACES=1
 MOZ_PLACES_BOOKMARKS=1
 # always enabled for form history
 MOZ_MORKREADER=1
 MOZ_SAFE_BROWSING=1
 MOZ_APP_VERSION=$FIREFOX_VERSION
 MOZ_NO_XPCOM_OBSOLETE=1
 MOZ_EXTENSIONS_DEFAULT=" xml-rpc inspector gnomevfs reporter"
--- a/configure.in
+++ b/configure.in
@@ -2690,18 +2690,18 @@ EOF
                      [cat > conftest.c <<EOF
 #pragma GCC visibility push(hidden)
                       int foo_hidden = 1;
 #pragma GCC visibility push(default)
                       int foo_default = 1;
 EOF
                       ac_cv_visibility_pragma=no
                       if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
-                        if egrep '\.(hidden|extern_private).*foo_hidden' conftest.s >/dev/null; then
-                          if ! egrep '\.(hidden|extern_private).*foo_default' conftest.s > /dev/null; then
+                        if egrep '\.(hidden|private_extern).*foo_hidden' conftest.s >/dev/null; then
+                          if ! egrep '\.(hidden|private_extern).*foo_default' conftest.s > /dev/null; then
                             ac_cv_visibility_pragma=yes
                           fi
                         fi
                       fi
                       rm -f conftest.[cs]
                     ])
       if test "$ac_cv_visibility_pragma" = "yes"; then
         AC_CACHE_CHECK(For gcc visibility bug with class-level attributes (GCC bug 26905),
@@ -2714,17 +2714,17 @@ struct __attribute__ ((visibility ("defa
 __attribute__ ((visibility ("default"))) void TestFunc() {
   TestStruct::Init();
 }
 EOF
                        ac_cv_have_visibility_class_bug=no
                        if ! ${CXX-g++} ${CXXFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -S -o conftest.S conftest.c > /dev/null 2>&1 ; then
                          ac_cv_have_visibility_class_bug=yes
                        else
-                         if test `grep -c "@PLT" conftest.S` = 0; then
+                         if test `egrep -c '@PLT|\\$stub' conftest.S` = 0; then
                            ac_cv_have_visibility_class_bug=yes
                          fi
                        fi
                        rm -rf conftest.{c,S}
                        ])
 
         AC_CACHE_CHECK(For x86_64 gcc visibility bug with builtins (GCC bug 20297),
                        ac_cv_have_visibility_builtin_bug,
--- a/xpcom/glue/nsWeakReference.h
+++ b/xpcom/glue/nsWeakReference.h
@@ -45,17 +45,17 @@
 #include "nsIWeakReference.h"
 #include "nsIWeakReferenceUtils.h"
 
 class nsWeakReference;
 
 // Set IMETHOD_VISIBILITY to empty so that the class-level NS_COM declaration
 // controls member method visibility.
 #undef  IMETHOD_VISIBILITY
-#define IMETHOD_VISIBILITY
+#define IMETHOD_VISIBILITY NS_COM_GLUE
 
 class NS_COM_GLUE nsSupportsWeakReference : public nsISupportsWeakReference
   {
     public:
       nsSupportsWeakReference()
           : mProxy(0)
         {
           // nothing else to do here
--- a/xpinstall/src/Makefile.in
+++ b/xpinstall/src/Makefile.in
@@ -140,31 +140,32 @@ endif
 
 # Support AppleSingle decoding on Mac OS X
 ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
 REQUIRES	+= macmorefiles
 
 CPPSRCS		+= \
 		nsAppleSingleDecoder.cpp \
 		$(NULL)
-
-EXTRA_DSO_LDOPTS += $(DEPTH)/xpcom/MoreFiles/libmacmorefiles_s.a
 endif
 
 LOCAL_INCLUDES	= -I$(srcdir)/../public
 
 EXTRA_DSO_LDOPTS = \
 		$(DEPTH)/modules/libreg/src/$(LIB_PREFIX)mozreg_s.$(LIB_SUFFIX) \
 		$(MOZ_JS_LIBS) \
 		$(MOZ_UNICHARUTIL_LIBS) \
 		$(MOZ_COMPONENT_LIBS) \
 		$(ZLIB_LIBS) \
 		$(NULL)
 
 ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
-EXTRA_DSO_LDOPTS += $(TK_LIBS)
+EXTRA_DSO_LDOPTS += \
+	$(DEPTH)/xpcom/MoreFiles/libmacmorefiles_s.a \
+	$(TK_LIBS) \
+	$(NULL)
 endif
 
 include $(topsrcdir)/config/rules.mk
 
 ifeq ($(OS_ARCH)$(MOZ_ENABLE_LIBXUL),WINNT)
 DEFINES		+= -DZLIB_DLL
 endif