From a5d3f6cc70bcef8970f920674a9dd1eb57de64de Mon Sep 17 00:00:00 2001 From: "ramiro%fateware.com" Date: Fri, 22 Oct 1999 07:11:43 +0000 Subject: [PATCH] Removing the badly rotten MOZ_STRIP_NOT_EXPORTED hack. We now have a better way to accomplish the same thing using linker version scripts. r=cls@seawood.org git-svn-id: svn://10.0.0.236/trunk@51521 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/config/autoconf.mk.in | 2 -- mozilla/config/rules.mk | 11 ----------- mozilla/configure.in | 18 ------------------ mozilla/expat/xmlparse/Makefile.in | 5 ----- mozilla/expat/xmltok/Makefile.in | 5 ----- mozilla/include/libi18n.h | 3 --- mozilla/include/resdef.h | 2 -- mozilla/include/xp_core.h | 7 ------- mozilla/js/src/jstypes.h | 7 ------- mozilla/modules/libimg/png/pngconf.h | 4 ---- mozilla/modules/libreg/include/NSReg.h | 2 -- mozilla/modules/libutil/src/Makefile.in | 2 -- mozilla/modules/security/freenav/Makefile.in | 2 -- mozilla/parser/expat/lib/Makefile.in | 5 ----- mozilla/rdf/base/public/rdf.h | 4 ---- mozilla/xpcom/base/nsCom.h | 7 ------- mozilla/xpcom/base/nscore.h | 8 -------- 17 files changed, 94 deletions(-) diff --git a/mozilla/config/autoconf.mk.in b/mozilla/config/autoconf.mk.in index c13bf9fa35c..04c3bde1355 100644 --- a/mozilla/config/autoconf.mk.in +++ b/mozilla/config/autoconf.mk.in @@ -65,8 +65,6 @@ NO_UNIX_LDAP = @NO_UNIX_LDAP@ BUILD_IDLC = @BUILD_IDLC@ USE_IMPLICIT_ARCHIVE = @USE_IMPLICIT_ARCHIVE@ -MOZ_STRIP_NOT_EXPORTED = @MOZ_STRIP_NOT_EXPORTED@ - MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS = @MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS@ ClientWallet=@ClientWallet@ diff --git a/mozilla/config/rules.mk b/mozilla/config/rules.mk index 5ddd00b3c7b..2b919da8182 100644 --- a/mozilla/config/rules.mk +++ b/mozilla/config/rules.mk @@ -302,12 +302,6 @@ EXTRA_DSO_LDOPTS += -L$(DIST)/bin $(BEOS_LINK_LIBS) $(NSPR_LIBS) endif endif -ifdef MOZ_STRIP_NOT_EXPORTED -ifndef INHIBIT_STRIP_NOT_EXPORTED -EXTRA_DSO_LDOPTS += -Wl,--version-exports-section -Wl,Mozilla -endif -endif - ################################################################################ all:: export libs install @@ -645,11 +639,6 @@ else $(MKSHLIB) -o $@ $(OBJS) $(LOBJS) $(EXTRA_DSO_LDOPTS) endif @rm -f foodummyfilefoo $(SUB_LOBJS) -ifdef MOZ_STRIP_NOT_EXPORTED -ifdef INHIBIT_STRIP_NOT_EXPORTED - objcopy -R ".exports" $@ -endif -endif else @touch no-such-file.vms; rm -f no-such-file.vms $(SUB_LOBJS) ifndef IS_COMPONENT diff --git a/mozilla/configure.in b/mozilla/configure.in index 60f6f244779..6a407638514 100644 --- a/mozilla/configure.in +++ b/mozilla/configure.in @@ -2437,23 +2437,6 @@ MOZ_ARG_ENABLE_BOOL(strip-libs, [ MOZ_POST_DSO_LIB_COMMAND=strip MOZ_POST_PROGRAM_COMMAND=strip ]) -dnl ======================================================== -dnl = -dnl = --enable-strip-not-exported -dnl = -dnl = Enable stripping of not exported symbols in .so files -dnl = -dnl ======================================================== -MOZ_STRIP_NOT_EXPORTED= - -MOZ_ARG_ENABLE_BOOL(strip-not-exported, -[ --enable-strip-not-exported - Enable stripping of not exported symbols in .so files ], - [MOZ_STRIP_NOT_EXPORTED=1 - AC_DEFINE(MOZ_STRIP_NOT_EXPORTED) ]) - -dnl ======================================================== - dnl ======================================================== dnl = dnl = MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS @@ -2868,7 +2851,6 @@ AC_SUBST(MOZ_ENABLE_GTK_MOZILLA) AC_SUBST(USE_IMPLICIT_ARCHIVE) AC_SUBST(MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS) -AC_SUBST(MOZ_STRIP_NOT_EXPORTED) AC_SUBST(MOZ_GLE) diff --git a/mozilla/expat/xmlparse/Makefile.in b/mozilla/expat/xmlparse/Makefile.in index e9f98d83641..9149d3833c8 100644 --- a/mozilla/expat/xmlparse/Makefile.in +++ b/mozilla/expat/xmlparse/Makefile.in @@ -41,8 +41,3 @@ override NO_SHARED_LIB=1 override NO_STATIC_LIB= include $(topsrcdir)/config/rules.mk - -ifdef MOZ_STRIP_NOT_EXPORTED -DEFINES += -DXMLPARSEAPI="__attribute__ ((dllexport))" -endif - diff --git a/mozilla/expat/xmltok/Makefile.in b/mozilla/expat/xmltok/Makefile.in index 56f3a7e0e33..7c68495e295 100644 --- a/mozilla/expat/xmltok/Makefile.in +++ b/mozilla/expat/xmltok/Makefile.in @@ -35,8 +35,3 @@ override NO_SHARED_LIB=1 override NO_STATIC_LIB= include $(topsrcdir)/config/rules.mk - -ifdef MOZ_STRIP_NOT_EXPORTED -DEFINES += -DXMLTOKAPI="__attribute__ ((dllexport))" -endif - diff --git a/mozilla/include/libi18n.h b/mozilla/include/libi18n.h index b5df9d05ab6..47d901a4c1e 100644 --- a/mozilla/include/libi18n.h +++ b/mozilla/include/libi18n.h @@ -36,9 +36,6 @@ #ifdef XP_WIN32 #define UNICVTAPI __declspec(dllexport) -#elif defined(MOZ_STRIP_NOT_EXPORTED) -#define UNICVTAPI __attribute__ ((dllexport)) - #else #define UNICVTAPI #endif diff --git a/mozilla/include/resdef.h b/mozilla/include/resdef.h index c617483e43b..e7283ed4791 100644 --- a/mozilla/include/resdef.h +++ b/mozilla/include/resdef.h @@ -64,8 +64,6 @@ * so we can increase the stack size */ #define ResDef(name,id,msg) int __far name = (id); -#elif defined(MOZ_STRIP_NOT_EXPORTED) -#define ResDef(name,id,msg) __attribute__ ((dllexport)) int name = (id); #else #define ResDef(name,id,msg) int name = (id); #endif diff --git a/mozilla/include/xp_core.h b/mozilla/include/xp_core.h index d208518433f..c9fdb0d9d7d 100644 --- a/mozilla/include/xp_core.h +++ b/mozilla/include/xp_core.h @@ -248,13 +248,6 @@ typedef int (*FARPROC)(); #define PUBLIC #define MODULE_PRIVATE -#if defined(XP_UNIX) && defined(MOZ_STRIP_NOT_EXPORTED) -#undef PUBLIC -#define PUBLIC __attribute__ ((dllexport)) -#undef MODULE_PRIVATE -#define MODULE_PRIVATE __attribute__ ((dllexport)) -#endif - #if defined(XP_UNIX) && defined(PRIVATE) #undef PRIVATE #endif diff --git a/mozilla/js/src/jstypes.h b/mozilla/js/src/jstypes.h index 81624ceeace..c247a634e3a 100644 --- a/mozilla/js/src/jstypes.h +++ b/mozilla/js/src/jstypes.h @@ -120,17 +120,10 @@ #else /* Unix */ -#ifdef MOZ_STRIP_NOT_EXPORTED -#define JS_EXTERN_API(__type) extern __attribute__ ((dllexport)) __type -#define JS_EXPORT_API(__type) __attribute__ ((dllexport))__type -#define JS_EXTERN_DATA(__type) extern __attribute__ ((dllexport)) __type -#define JS_EXPORT_DATA(__type) __attribute__ ((dllexport)) __type -#else #define JS_EXTERN_API(__type) extern __type #define JS_EXPORT_API(__type) __type #define JS_EXTERN_DATA(__type) extern __type #define JS_EXPORT_DATA(__type) __type -#endif #define JS_DLL_CALLBACK #define JS_STATIC_DLL_CALLBACK(__x) static __x diff --git a/mozilla/modules/libimg/png/pngconf.h b/mozilla/modules/libimg/png/pngconf.h index 85e74f8712b..e18ba191164 100644 --- a/mozilla/modules/libimg/png/pngconf.h +++ b/mozilla/modules/libimg/png/pngconf.h @@ -643,10 +643,6 @@ typedef z_stream FAR * png_zstreamp; # define PNG_EXPORT(type,symbol) type _export symbol #endif -#if defined(MOZ_STRIP_NOT_EXPORTED) -# define PNG_EXPORT(type,symbol) type __attribute__ ((dllexport)) symbol -#endif - /* allow for compilation as shared lib under BeOS */ #ifdef __BEOSDLL__ #define PNG_EXPORT(type,symbol) __declspec(export) type symbol diff --git a/mozilla/modules/libreg/include/NSReg.h b/mozilla/modules/libreg/include/NSReg.h index 881f1f2a5a7..33074588b4a 100644 --- a/mozilla/modules/libreg/include/NSReg.h +++ b/mozilla/modules/libreg/include/NSReg.h @@ -114,8 +114,6 @@ typedef struct _reginfo #endif #elif defined XP_MAC #define VR_INTERFACE(__x) __declspec(export) __x -#elif defined(MOZ_STRIP_NOT_EXPORTED) - #define VR_INTERFACE(type) __attribute__ ((dllexport)) type #else #define VR_INTERFACE(type) type #endif diff --git a/mozilla/modules/libutil/src/Makefile.in b/mozilla/modules/libutil/src/Makefile.in index 46c6dec63ff..32965fd200c 100644 --- a/mozilla/modules/libutil/src/Makefile.in +++ b/mozilla/modules/libutil/src/Makefile.in @@ -30,8 +30,6 @@ REQUIRES = util CSRCS = obs.c CPPSRCS = stopwatch.cpp -INHIBIT_STRIP_NOT_EXPORTED = 1 - override NO_SHARED_LIB=1 override NO_STATIC_LIB= diff --git a/mozilla/modules/security/freenav/Makefile.in b/mozilla/modules/security/freenav/Makefile.in index 52e77014b60..68890a79bb1 100644 --- a/mozilla/modules/security/freenav/Makefile.in +++ b/mozilla/modules/security/freenav/Makefile.in @@ -52,7 +52,5 @@ EXPORTS = \ EXPORTS := $(addprefix $(srcdir)/, $(EXPORTS)) -INHIBIT_STRIP_NOT_EXPORTED = 1 - include $(topsrcdir)/config/rules.mk diff --git a/mozilla/parser/expat/lib/Makefile.in b/mozilla/parser/expat/lib/Makefile.in index e9f98d83641..9149d3833c8 100644 --- a/mozilla/parser/expat/lib/Makefile.in +++ b/mozilla/parser/expat/lib/Makefile.in @@ -41,8 +41,3 @@ override NO_SHARED_LIB=1 override NO_STATIC_LIB= include $(topsrcdir)/config/rules.mk - -ifdef MOZ_STRIP_NOT_EXPORTED -DEFINES += -DXMLPARSEAPI="__attribute__ ((dllexport))" -endif - diff --git a/mozilla/rdf/base/public/rdf.h b/mozilla/rdf/base/public/rdf.h index 702bbab1ba4..5a3846e5818 100644 --- a/mozilla/rdf/base/public/rdf.h +++ b/mozilla/rdf/base/public/rdf.h @@ -92,11 +92,7 @@ static const char* kURI##prefix##_##name = ns #name #ifdef XP_PC #define NS_RDF _declspec(dllexport) #else /* !XP_PC */ -#ifdef MOZ_STRIP_NOT_EXPORTED -#define NS_RDF __attribute__ ((dllexport)) -#else #define NS_RDF -#endif /* !MOZ_STRIP_NOT_EXPORTED */ #endif /* !XP_PC */ #else /* !_IMPL_NS_RDF */ #ifdef XP_PC diff --git a/mozilla/xpcom/base/nsCom.h b/mozilla/xpcom/base/nsCom.h index 40e521f8267..6583be87552 100644 --- a/mozilla/xpcom/base/nsCom.h +++ b/mozilla/xpcom/base/nsCom.h @@ -28,8 +28,6 @@ #define NS_COM _declspec(dllexport) #elif defined(XP_MAC) #define NS_COM __declspec(export) -#elif defined(MOZ_STRIP_NOT_EXPORTED) -#define NS_COM __attribute__ ((dllexport)) #else /* !XP_PC */ #define NS_COM #endif /* !XP_PC */ @@ -79,13 +77,8 @@ #else /* !XP_PC && !XP_MAC */ -#if defined(MOZ_STRIP_NOT_EXPORTED) -#define NS_EXPORT __attribute__ ((dllexport)) -#define NS_EXPORT_(type) __attribute__ ((dllexport)) type -#else #define NS_EXPORT #define NS_EXPORT_(type) type -#endif #define NS_IMETHOD_(type) virtual type #define NS_IMETHOD virtual nsresult diff --git a/mozilla/xpcom/base/nscore.h b/mozilla/xpcom/base/nscore.h index 9e5927cc952..80cb205dc7a 100644 --- a/mozilla/xpcom/base/nscore.h +++ b/mozilla/xpcom/base/nscore.h @@ -72,14 +72,6 @@ typedef PRUint16 PRUnichar; #define NS_EXPORT __declspec(export) #define NS_EXPORT_(type) __declspec(export) type -#elif defined(MOZ_STRIP_NOT_EXPORTED) - -#define NS_IMPORT -#define NS_IMPORT_(type) type - -#define NS_EXPORT __attribute__ ((dllexport)) -#define NS_EXPORT_(type) __attribute__ ((dllexport)) type - #else /* XXX do something useful? */ #define NS_IMPORT