[Libreoffice-commits] .: patches/dev300
Michael Meeks
michael at kemper.freedesktop.org
Thu Jan 27 03:08:33 PST 2011
patches/dev300/apply | 9
patches/dev300/speed-local-link-except-offuh.diff | 21 -
patches/dev300/speed-local-link-except.diff | 245 ----------------------
patches/dev300/speed-local-link.diff | 182 ----------------
4 files changed, 457 deletions(-)
New commits:
commit f0ab684a218c05d1527906f97f8b0b65f529519b
Author: Michael Meeks <michael.meeks at novell.com>
Date: Thu Jan 27 11:08:29 2011 +0000
remove obsolete (but elite) linking speedup of mine
diff --git a/patches/dev300/apply b/patches/dev300/apply
index 3e41159..b5b95bb 100755
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -425,15 +425,6 @@ calc-string-number.diff, kohei
# calc-formula-asian-phonetic.diff, i#80764, i#80765, i#80766, kohei
[ LinuxOnly ]
-# accelerate linking, by extreme cunning i#63927
-# this is an increasingly marginal win ...
-speed-local-link-except.diff, i#63927, michael
-
-# the file this one patches ends with CR chars... :-(
-speed-local-link-except-offuh.diff
-
-speed-local-link.diff, i#63927, michael
-
# make some symbols from svtools visible for the kde fpicker when compiling with gcc4
# fix: this breaks win32
fpicker-kde-gcc4-visibility.diff, pmladek
diff --git a/patches/dev300/speed-local-link-except-offuh.diff b/patches/dev300/speed-local-link-except-offuh.diff
deleted file mode 100644
index 9ed5181..0000000
--- a/patches/dev300/speed-local-link-except-offuh.diff
+++ /dev/null
@@ -1,21 +0,0 @@
----
- offuh/prj/d.lst | 3 +++
- 1 files changed, 3 insertions(+), 0 deletions(-)
-
-diff --git offuh/prj/d.lst offuh/prj/d.lst
-index ba73430..acb5869 100644
---- offuh/prj/d.lst
-+++ offuh/prj/d.lst
-@@ -353,6 +353,9 @@ mkdir: %_DEST%\inc%_EXT%\offuh\com\sun\star\rdf
-
- ..\%__SRC%\inc\offuh\com\sun\star\script\browse\*.hpp %_DEST%\inc%_EXT%\offuh\com\sun\star\script\browse\*.hpp
- ..\%__SRC%\inc\offuh\com\sun\star\script\browse\*.hdl %_DEST%\inc%_EXT%\offuh\com\sun\star\script\browse\*.hdl
-+
-+..\%__SRC%\inc\offuh\linking_catch.hxx %_DEST%\inc%_EXT%\offuh\linking_catch.hxx
-+
- ..\%__SRC%\inc\offuh\com\sun\star\script\provider\*.hpp %_DEST%\inc%_EXT%\offuh\com\sun\star\script\provider\*.hpp
- ..\%__SRC%\inc\offuh\com\sun\star\script\provider\*.hdl %_DEST%\inc%_EXT%\offuh\com\sun\star\script\provider\*.hdl
-
---
-1.7.0.1
-
diff --git a/patches/dev300/speed-local-link-except.diff b/patches/dev300/speed-local-link-except.diff
deleted file mode 100644
index 74beb76..0000000
--- a/patches/dev300/speed-local-link-except.diff
+++ /dev/null
@@ -1,245 +0,0 @@
----
- codemaker/source/cppumaker/cppumaker.cxx | 38 ++++++++++++++++++++++++++++
- codemaker/source/cppumaker/cppuoptions.cxx | 4 +++
- codemaker/source/cppumaker/cpputype.cxx | 9 ++++++
- codemaker/source/cppumaker/cpputype.hxx | 4 +++
- cppu/prj/build.lst | 1 +
- cppu/prj/d.lst | 1 +
- cppu/source/except/except.cxx | 14 ++++++++++
- cppu/source/except/makefile.mk | 20 ++++++++++++++
- offuh/source/makefile.mk | 2 +-
- scp2/source/ooo/file_library_ooo.scp | 9 ++++++
- 10 files changed, 101 insertions(+), 1 deletions(-)
- create mode 100644 cppu/source/except/except.cxx
- create mode 100644 cppu/source/except/makefile.mk
-
-diff --git codemaker/source/cppumaker/cppumaker.cxx codemaker/source/cppumaker/cppumaker.cxx
-index 0679cf0..b140591 100644
---- codemaker/source/cppumaker/cppumaker.cxx
-+++ codemaker/source/cppumaker/cppumaker.cxx
-@@ -34,6 +34,7 @@
-
- #include "codemaker/typemanager.hxx"
- #include "codemaker/generatedtypeset.hxx"
-+#include "codemaker/commoncpp.hxx"
-
- #include "cppuoptions.hxx"
- #include "cpputype.hxx"
-@@ -238,6 +239,43 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
- exit(99);
- }
-
-+ if (!aExceptionTypeNames.empty() && options.isValid("-E"))
-+ {
-+ OString outFile = options.getOption("-E");
-+ FILE *excepts = fopen (outFile, "w+");
-+ if (!excepts)
-+ {
-+ fprintf(stderr, "%s ERROR: cannot open '%s'\n",
-+ options.getProgramName().getStr(), outFile.getStr());
-+ exit(98);
-+ }
-+ fprintf (excepts, "// This file is autogenerated by cppumaker\n");
-+ fprintf (excepts, "// include exception headers\n");
-+
-+ ::std::list<rtl::OString>::const_iterator iter;
-+
-+ for (iter = aExceptionTypeNames.begin();
-+ iter != aExceptionTypeNames.end(); iter++)
-+ {
-+ rtl::OString aStr = *iter;
-+ fprintf (excepts, "#include <%s.hpp>\n", aStr.getStr());
-+ }
-+
-+ fprintf (excepts, "// dummy method\n");
-+ fprintf (excepts, "extern void force_emit ()\n");
-+ fprintf (excepts, "{\n");
-+ for (iter = aExceptionTypeNames.begin();
-+ iter != aExceptionTypeNames.end(); iter++) {
-+ fprintf (excepts, " try {\n");
-+ fprintf (excepts, " force_emit ();\n");
-+ fprintf (excepts, " }\n");
-+ OString aStr = codemaker::cpp::scopedCppName (*iter);
-+ fprintf (excepts, "catch (const %s &r) {} \n", aStr.getStr());
-+ }
-+ fprintf (excepts, "}\n\n");
-+ fclose (excepts);
-+ }
-+
- return 0;
- }
-
-diff --git codemaker/source/cppumaker/cppuoptions.cxx codemaker/source/cppumaker/cppuoptions.cxx
-index d3a960b..9297de6 100644
---- codemaker/source/cppumaker/cppuoptions.cxx
-+++ codemaker/source/cppumaker/cppuoptions.cxx
-@@ -67,6 +67,9 @@ sal_Bool CppuOptions::initOptions(int ac, char* av[], sal_Bool bCmdFile)
- {
- switch (av[i][1])
- {
-+ case 'E':
-+ m_options["-E"] = OString(av[i] + 2);
-+ break;
- case 'O':
- if (av[i][2] == '\0')
- {
-@@ -339,6 +342,7 @@ OString CppuOptions::prepareHelp()
- help += " -G = generate only target files which does not exists.\n";
- help += " -Gc = generate only target files which content will be changed.\n";
- help += " -X<file> = extra types which will not be taken into account for generation.\n";
-+ help += " -E<file> = generate exception type library for faster Linux linking.\n";
- help += prepareVersion();
-
- return help;
-diff --git codemaker/source/cppumaker/cpputype.cxx codemaker/source/cppumaker/cpputype.cxx
-index 75000e8..a6b685c 100644
---- codemaker/source/cppumaker/cpputype.cxx
-+++ codemaker/source/cppumaker/cpputype.cxx
-@@ -53,6 +53,8 @@
- using namespace rtl;
- using namespace codemaker::cpp;
-
-+::std::list<rtl::OString> aExceptionTypeNames;
-+
- namespace {
-
- rtl::OString translateSimpleUnoType(rtl::OString const & unoType, bool cppuUnoType=false) {
-@@ -3121,6 +3123,13 @@ sal_Bool ExceptionType::dumpHFile(
- return sal_True;
- }
-
-+bool
-+ExceptionType::dumpFiles(CppuOptions * options, rtl::OString const & outPath)
-+{
-+ aExceptionTypeNames.push_back(m_typeName);
-+ return CppuType::dumpFiles(options, outPath);
-+}
-+
- sal_Bool ExceptionType::dumpDeclaration(FileStream& o)
- throw( CannotDumpException )
- {
-diff --git codemaker/source/cppumaker/cpputype.hxx codemaker/source/cppumaker/cpputype.hxx
-index b534c7e..1f30146 100644
---- codemaker/source/cppumaker/cpputype.hxx
-+++ codemaker/source/cppumaker/cpputype.hxx
-@@ -53,6 +53,9 @@ enum CppuTypeDecl
- class CppuOptions;
- class FileStream;
-
-+#include <list>
-+extern ::std::list<rtl::OString> aExceptionTypeNames;
-+
- class CppuType
- {
- public:
-@@ -292,6 +295,7 @@ public:
-
- virtual ~ExceptionType();
-
-+ bool dumpFiles(CppuOptions * options, rtl::OString const & outPath);
- sal_Bool dumpDeclaration(FileStream& o) throw( CannotDumpException );
- sal_Bool dumpHFile(FileStream& o, codemaker::cppumaker::Includes & includes) throw( CannotDumpException );
- sal_Bool dumpHxxFile(FileStream& o, codemaker::cppumaker::Includes & includes) throw( CannotDumpException );
-diff --git cppu/prj/build.lst cppu/prj/build.lst
-index a22ca9e..9381435 100644
---- cppu/prj/build.lst
-+++ cppu/prj/build.lst
-@@ -10,3 +10,4 @@ cu cppu\source\UnsafeBridge nmake - all cu_UnsafeBridge cu_inc NULL
- cu cppu\source\AffineBridge nmake - all cu_AffineBridge cu_inc NULL
- cu cppu\source\LogBridge nmake - all cu_LogBridge cu_inc NULL
- cu cppu\util nmake - all cu_util cu_thpool cu_typelib cu_cppu cu_uno cu_helper_purpenv cu_UnsafeBridge cu_AffineBridge cu_LogBridge NULL
-+cu cppu\source\except nmake - all cu_except cu_util NULL
-diff --git cppu/prj/d.lst cppu/prj/d.lst
-index 411a51c..968dacf 100644
---- cppu/prj/d.lst
-+++ cppu/prj/d.lst
-@@ -56,6 +56,7 @@ mkdir: %_DEST%\inc%_EXT%\uno
- ..\%__SRC%\lib\icppu.lib %_DEST%\lib%_EXT%\icppu.lib
- ..\%__SRC%\bin\cppu* %_DEST%\bin%_EXT%\*
- ..\%__SRC%\lib\libuno_cppu.*.* %_DEST%\lib%_EXT%\*
-+..\%__SRC%\lib\libexlink* %_DEST%\lib%_EXT%\*
-
- ..\%__SRC%\lib\ipurpenvhelper* %_DEST%\lib%_EXT%\*
- ..\%__SRC%\bin\purpe*.dll %_DEST%\bin%_EXT%\*
-diff --git cppu/source/except/except.cxx cppu/source/except/except.cxx
-new file mode 100644
-index 0000000..40a0bc6
---- /dev/null
-+++ cppu/source/except/except.cxx
-@@ -0,0 +1,14 @@
-+#include <sal/config.h>
-+#include <cppu/macros.hxx>
-+#include <com/sun/star/uno/Any.hxx>
-+#include <com/sun/star/uno/Reference.hxx>
-+
-+// We don't want to hide all this shared goodness:
-+#undef CPPU_GCC_DLLPUBLIC_EXPORT
-+#define CPPU_GCC_DLLPUBLIC_EXPORT
-+#undef CPPU_GCC_DLLPRIVATE
-+#define CPPU_GCC_DLLPRIVATE
-+
-+#define CPPU_INTERNAL_IMPL 1
-+
-+#include <linking_catch.hxx>
-diff --git cppu/source/except/makefile.mk cppu/source/except/makefile.mk
-new file mode 100644
-index 0000000..6ae737b
---- /dev/null
-+++ cppu/source/except/makefile.mk
-@@ -0,0 +1,20 @@
-+# --- Settings -----------------------------------------------------
-+
-+PRJ=..$/..
-+
-+PRJNAME=cppu
-+TARGET=unotypes
-+ENABLE_EXCEPTIONS=TRUE
-+
-+.INCLUDE : settings.mk
-+
-+LIB1TARGET= $(SLB)$/$(TARGET).lib
-+LIB1OBJFILES= $(SLO)$/except.obj
-+
-+SHL1TARGET=exlink$(DLLPOSTFIX)
-+SHL1LIBS=$(LIB1TARGET)
-+SHL1STDLIBS= $(SALLIB) $(SALHELPERLIB) $(REGLIB) $(CPPULIB)
-+
-+# --- Targets -------------------------------------------------------
-+
-+.INCLUDE : target.mk
-diff --git offuh/source/makefile.mk offuh/source/makefile.mk
-index e773d7f..50f7f97 100644
---- offuh/source/makefile.mk
-+++ offuh/source/makefile.mk
-@@ -37,7 +37,7 @@ TARGET= offuh
-
- $(MISC)$/$(TARGET).don : $(UNOUCRRDB)
- @@-$(RM) $@
-- $(CPPUMAKER) -Gc $(CPPUMAKERFLAGS) -B$(UNOUCRBASE) -O$(UNOUCROUT) $(UNOUCRRDB) && echo > $@
-+ $(CPPUMAKER) -E$(UNOUCROUT)/linking_catch.hxx -Gc $(CPPUMAKERFLAGS) -B$(UNOUCRBASE) -O$(UNOUCROUT) $(UNOUCRRDB) && echo > $@
-
- # --- Targets ------------------------------------------------------
-
-diff --git scp2/source/ooo/file_library_ooo.scp scp2/source/ooo/file_library_ooo.scp
-index a2a91dd..4f1ef52 100644
---- scp2/source/ooo/file_library_ooo.scp
-+++ scp2/source/ooo/file_library_ooo.scp
-@@ -177,6 +177,15 @@ STD_UNO_LIB_FILE( gid_File_Lib_Ctl , ctl)
-
- STD_LIB_FILE( gid_File_Lib_Cui, cui)
-
-+#ifdef LINUX
-+File gid_File_Lib_ExLib
-+ TXT_FILE_BODY;
-+ Styles = (PACKED,PATCH);
-+ Dir = gid_Dir_Program;
-+ Name = LIBNAME(exlink);
-+End
-+#endif
-+
- #ifndef SYSTEM_CURL
-
- File gid_File_Lib_Curl
---
-1.7.0.1
-
diff --git a/patches/dev300/speed-local-link.diff b/patches/dev300/speed-local-link.diff
deleted file mode 100644
index a36fcc3..0000000
--- a/patches/dev300/speed-local-link.diff
+++ /dev/null
@@ -1,182 +0,0 @@
----
- cppuhelper/source/shlib.cxx | 149 ++++++++++++++++++++++++++++++++++++++++++-
- 1 files changed, 147 insertions(+), 2 deletions(-)
-
-diff --git cppuhelper/source/shlib.cxx cppuhelper/source/shlib.cxx
-index 01a5052..1c1110e 100644
---- cppuhelper/source/shlib.cxx
-+++ cppuhelper/source/shlib.cxx
-@@ -38,6 +38,8 @@
- #include "uno/mapping.hxx"
- #include "cppuhelper/factory.hxx"
- #include "cppuhelper/shlib.hxx"
-+#include "cppuhelper/bootstrap.hxx"
-+#include <com/sun/star/lang/IllegalArgumentException.hpp>
-
- #include "com/sun/star/beans/XPropertySet.hpp"
-
-@@ -272,6 +274,141 @@ static OUString makeComponentPath(
- return out;
- }
-
-+#ifdef LINUX
-+
-+// This is a temporary hack until we can add this per
-+// shlib annotation to services.rdb.
-+
-+static bool
-+lcl_isWellKnownInternal(const OString &rLibName)
-+{
-+ // These are loaded at startup ...
-+ static const char *pLookup[] = {
-+ "behelper.uno.so",
-+ "configmgr2.uno.so",
-+ "deploymentli.uno.so",
-+ "fsstorage.uno.so",
-+ "gconfbe1.uno.so",
-+ "i18npool.uno.so",
-+ "introspection.uno.so",
-+ "ldapbe2.uno.so",
-+ "libanimcore.so",
-+ "libevtatt.so",
-+ "libfileacc.so",
-+ "libfilterconfig1.so",
-+ "libgcc3_uno.so",
-+ "liblocaledata_en.so",
-+ "liblocaledata_es.so",
-+ "liblocaledata_euro.so",
-+ "liblocaledata_others.so",
-+ "libmcnttype.so",
-+ "libpackage2.so",
-+ "libsrtrs1.so",
-+ "libucb1.so",
-+ "libucpfile1.so",
-+ "libxstor.so",
-+ "localebe1.uno.so",
-+ "implreg.uno.so",
-+ "nestedreg.uno.so",
-+ "regtypeprov.uno.so",
-+ "security.uno.so",
-+ "servicemgr.uno.so",
-+ "shlibloader.uno.so",
-+ "simplereg.uno.so",
-+ "typemgr.uno.so",
-+ "reflection.uno.so",
-+ "sax.uno.so",
-+ "stocservices.uno.so",
-+ "streams.uno.so",
-+ "sysmgr1.uno.so",
-+ "typeconverter.uno.so",
-+ "ucpgvfs1.uno.so",
-+ "uriproc.uno.so",
-+ NULL
-+ };
-+
-+ // Perhaps do some cunning binary search ?
-+ for (int i = 0; pLookup[i] != NULL; i++) {
-+ bool match = rLibName.indexOf (pLookup[i]) > 0;
-+// fprintf (stderr, "Match '%s' vs. '%s' : %d\n",
-+// (const sal_Char *)rLibName, pLookup[i], match);
-+ if (match)
-+ return true;
-+ }
-+
-+ return false;
-+}
-+
-+// bootstrap.cxx
-+OUString const & get_this_libpath();
-+
-+// Amusing hack to get 40% win on linking / startup speedup:
-+// Rational: we load all of OO.o's exception symbols in a single, global
-+// shlib once first of all (RTLD_GLOBAL). This allows us to load all
-+// subsequent components RTLD_LOCAL, their vague linkage symbols will
-+// resolve in the global scope.
-+static bool
-+lcl_isInternalLibrary(OUString const & rLibName, OUString const & rPath)
-+{
-+ if (getenv ("OOO_DISABLE_INTERNAL"))
-+ return false;
-+
-+// fprintf (stderr, "Lib path '%s' ",
-+// (const sal_Char *)rtl::OUStringToOString(rPath, RTL_TEXTENCODING_ASCII_US));
-+// fprintf (stderr, "name '%s' - test:\n",
-+// (const sal_Char *)rtl::OUStringToOString(rLibName, RTL_TEXTENCODING_ASCII_US));
-+
-+ bool bIsInternal = false;
-+
-+ // Is this an internal library ?
-+ if (rPath.getLength() > 0 && rPath != get_this_libpath())
-+ {
-+// fprintf (stderr, "Lib path '%s' - not internal!\n",
-+// (const sal_Char *)rtl::OUStringToOString(rPath, RTL_TEXTENCODING_ASCII_US));
-+ return false;
-+ }
-+
-+ sal_Int32 nUpd = SUPD;
-+ OUString aIntSuffix = OUSTR("li.so");
-+ if (rLibName.indexOf (aIntSuffix) > 0)
-+ bIsInternal = true;
-+
-+ if (!bIsInternal)
-+ bIsInternal = lcl_isWellKnownInternal(
-+ OUStringToOString(rLibName, RTL_TEXTENCODING_UTF8));
-+
-+ // If internal - load the exception type library RTLD_GLOBAL first
-+ static bool bHaveLoadedExcepts = false;
-+ if (bIsInternal && !bHaveLoadedExcepts)
-+ {
-+ rtl::OUString aExceptTmpl = rtl::OUString::createFromAscii("vnd.sun.star.expand:$OOO_BASE_DIR/program/libexlink") + aIntSuffix;
-+ rtl::OUString aExceptName;
-+ try
-+ {
-+ aExceptName = cppu::bootstrap_expandUri( aExceptTmpl );
-+ }
-+ catch ( ::com::sun::star::lang::IllegalArgumentException & e ) {}
-+ oslModule nExceptLib = osl_loadModule(aExceptName.pData,
-+ SAL_LOADMODULE_LAZY | SAL_LOADMODULE_GLOBAL);
-+ if (nExceptLib != NULL) {
-+ bHaveLoadedExcepts = true;
-+// fprintf (stderr, "Loaded'%s'\n",
-+// (const sal_Char *)rtl::OUStringToOString(aExceptName, RTL_TEXTENCODING_ASCII_US));
-+ } else {
-+ bIsInternal = false;
-+// fprintf (stderr, "Failed to load'%s'\n",
-+// (const sal_Char *)rtl::OUStringToOString(aExceptName, RTL_TEXTENCODING_ASCII_US));
-+ }
-+ }
-+
-+// fprintf (stderr, "Lib name '%s' %d %d\n",
-+// (const sal_Char *)rtl::OUStringToOString(rLibName, RTL_TEXTENCODING_ASCII_US),
-+// bIsInternal, bHaveLoadedExcepts);
-+
-+ return bIsInternal;
-+}
-+#endif
-+
- //==============================================================================
- static OUString getLibEnv(OUString const & aModulePath,
- oslModule lib,
-@@ -362,9 +499,17 @@ Reference< XInterface > SAL_CALL loadSharedLibComponentFactory(
- aModulePath,
- Reference< XInterface >() );
- }
-+
-+ sal_Int32 nFlags = SAL_LOADMODULE_LAZY;
-+#ifdef LINUX
-+ if (!lcl_isInternalLibrary (rLibName, rPath))
-+ nFlags |= SAL_LOADMODULE_GLOBAL;
-+// else - faster local only binding
-+#else
-+ nFlags |= SAL_LOADMODULE_GLOBAL;
-+#endif
-
-- oslModule lib = osl_loadModule(
-- aModulePath.pData, SAL_LOADMODULE_LAZY | SAL_LOADMODULE_GLOBAL );
-+ oslModule lib = osl_loadModule(aModulePath.pData, nFlags);
- if (! lib)
- {
- throw loader::CannotActivateFactoryException(
---
-1.7.0.1
-
More information about the Libreoffice-commits
mailing list