From c0a37d52d803f3de34db47f3d4057da686446c21 Mon Sep 17 00:00:00 2001 From: "benjamin@smedbergs.us" Date: Wed, 11 Jul 2007 10:26:11 -0700 Subject: [PATCH] Bug 386445 - mac build stops with "multiple definitions of symbol nsINIParser::GetSrings", also changes to building mac dylibs with -single_module, r=luser,jag --- config/rules.mk | 8 +++++++- gfx/src/thebes/Makefile.in | 1 + layout/build/Makefile.in | 1 + xpcom/glue/Makefile.in | 1 + xpcom/glue/nsINIParser.h | 4 ++++ xpcom/glue/nsStringAPI.cpp | 13 +------------ xpcom/glue/objs.mk | 1 - xpcom/glue/standalone/Makefile.in | 3 ++- 8 files changed, 17 insertions(+), 15 deletions(-) diff --git a/config/rules.mk b/config/rules.mk index fca8b792c3f..10cf3d981b3 100644 --- a/config/rules.mk +++ b/config/rules.mk @@ -429,7 +429,7 @@ ifdef SHARED_LIBRARY ifdef IS_COMPONENT EXTRA_DSO_LDOPTS += -bundle else -EXTRA_DSO_LDOPTS += -dynamiclib -install_name @executable_path/$(SHARED_LIBRARY) -compatibility_version 1 -current_version 1 +EXTRA_DSO_LDOPTS += -dynamiclib -install_name @executable_path/$(SHARED_LIBRARY) -compatibility_version 1 -current_version 1 -single_module endif endif endif @@ -1288,12 +1288,18 @@ $(OBJ_PREFIX)%.$(OBJ_SUFFIX): %.m Makefile Makefile.in %.s: %.cpp $(CCC) -S $(COMPILE_CXXFLAGS) $(_VPATH_SRCS) +%.s: %.cc + $(CCC) -S $(COMPILE_CXXFLAGS) $(_VPATH_SRCS) + %.s: %.c $(CC) -S $(COMPILE_CFLAGS) $(_VPATH_SRCS) %.i: %.cpp $(CCC) -C -E $(COMPILE_CXXFLAGS) $(_VPATH_SRCS) > $*.i +%.i: %.cc + $(CCC) -C -E $(COMPILE_CXXFLAGS) $(_VPATH_SRCS) > $*.i + %.i: %.c $(CC) -C -E $(COMPILE_CFLAGS) $(_VPATH_SRCS) > $*.i diff --git a/gfx/src/thebes/Makefile.in b/gfx/src/thebes/Makefile.in index 584a6da4891..1af0298fb1a 100644 --- a/gfx/src/thebes/Makefile.in +++ b/gfx/src/thebes/Makefile.in @@ -139,6 +139,7 @@ LOCAL_INCLUDES = \ $(NULL) EXTRA_DSO_LDOPTS += \ + $(MOZ_FIX_LINK_PATHS) \ ../shared/$(LIB_PREFIX)gfxshared_s.$(LIB_SUFFIX) \ $(LIBS_DIR) \ $(EXTRA_DSO_LIBS) \ diff --git a/layout/build/Makefile.in b/layout/build/Makefile.in index 77cb5b614f1..f6c770982f5 100644 --- a/layout/build/Makefile.in +++ b/layout/build/Makefile.in @@ -209,6 +209,7 @@ DEFINES += -DENABLE_EDITOR_API_LOG endif EXTRA_DSO_LDOPTS = \ + $(MOZ_FIX_LINK_PATHS) \ $(LIBS_DIR) \ $(EXTRA_DSO_LIBS) \ $(MOZ_UNICHARUTIL_LIBS) \ diff --git a/xpcom/glue/Makefile.in b/xpcom/glue/Makefile.in index 67b2c8c9ea7..5f760eadf36 100644 --- a/xpcom/glue/Makefile.in +++ b/xpcom/glue/Makefile.in @@ -66,6 +66,7 @@ CSRCS = \ CPPSRCS = \ $(XPCOM_GLUE_SRC_LCPPSRCS) \ $(XPCOM_GLUENS_SRC_LCPPSRCS) \ + nsStringAPI.cpp \ $(NULL) SDK_HEADERS = \ diff --git a/xpcom/glue/nsINIParser.h b/xpcom/glue/nsINIParser.h index 345d6d88b05..029b1cac68d 100644 --- a/xpcom/glue/nsINIParser.h +++ b/xpcom/glue/nsINIParser.h @@ -43,6 +43,10 @@ #ifndef nsINIParser_h__ #define nsINIParser_h__ +#ifdef MOZILLA_INTERNAL_API +#define nsINIParser nsINIParser_internal +#endif + #include "nscore.h" #include "nsClassHashtable.h" #include "nsAutoPtr.h" diff --git a/xpcom/glue/nsStringAPI.cpp b/xpcom/glue/nsStringAPI.cpp index 192f26ca6a3..54581f16c42 100644 --- a/xpcom/glue/nsStringAPI.cpp +++ b/xpcom/glue/nsStringAPI.cpp @@ -40,21 +40,10 @@ #include "nscore.h" #include "nsCRTGlue.h" #include "prprf.h" - -#ifdef MOZILLA_INTERNAL_API -#undef nsAString -#undef nsACString -#endif - +#include "nsStringAPI.h" #include "nsXPCOMStrings.h" #include "nsDebug.h" -#ifdef MOZILLA_INTERNAL_API -#undef MOZILLA_INTERNAL_API -#endif - -#include "nsStringAPI.h" - #include #ifdef XP_WIN diff --git a/xpcom/glue/objs.mk b/xpcom/glue/objs.mk index 72dd772031a..362eaa20abf 100644 --- a/xpcom/glue/objs.mk +++ b/xpcom/glue/objs.mk @@ -57,7 +57,6 @@ XPCOM_GLUE_SRC_LCPPSRCS = \ nsWeakReference.cpp \ nsGREGlue.cpp \ nsVersionComparator.cpp \ - nsStringAPI.cpp \ nsTHashtable.cpp \ nsQuickSort.cpp \ nsVoidArray.cpp \ diff --git a/xpcom/glue/standalone/Makefile.in b/xpcom/glue/standalone/Makefile.in index d9f90d16dc3..0e10aed62e9 100644 --- a/xpcom/glue/standalone/Makefile.in +++ b/xpcom/glue/standalone/Makefile.in @@ -83,6 +83,7 @@ CSRCS = \ CPPSRCS = \ $(XPCOM_GLUE_SRC_LCPPSRCS) \ + nsStringAPI.cpp \ nsXPCOMGlue.cpp \ $(LINKSRC) \ $(NULL) @@ -119,7 +120,7 @@ OS_COMPILE_CFLAGS += -Zl DEFINES += -D_USE_ANSI_CPP endif -export:: $(XPCOM_GLUE_SRC_CSRCS) $(XPCOM_GLUE_SRC_CPPSRCS) +export:: $(XPCOM_GLUE_SRC_CSRCS) $(XPCOM_GLUE_SRC_CPPSRCS) $(topsrcdir)/xpcom/glue/nsStringAPI.cpp $(INSTALL) $^ . DEFINES += -DXPCOM_GLUE