[SCM] LibreOffice packaging repository branch, master, updated. cd114c82c3e7e4ea19a383ce8e8ecf31e6abbaa0
The following commit has been merged in the master branch:
commit bb5c1182218d2dbb8d3e7a70b285f4e4942adbf0
Author: Rene Engelhard <rene@debian.org>
Date: Sat Feb 19 17:51:08 2011 +0100
backport explicit armv7 optimization support; --with-arm-target=7 for armhf
diff --git a/changelog b/changelog
index 6cb49e7..e85054d 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,13 @@
+libreoffice (1:3.3.1~rc2-2) UNRELEASED; urgency=low
+
+ * debian/patches/arm-optimization: add explicit support for
+ optimization for armv4t/6/7, based on i117017
+
+ * debian/rules:
+ - --with-arm-target=7 on armhf
+
+ -- Rene Engelhard <rene@debian.org> Sat, 19 Feb 2011 17:48:57 +0100
+
libreoffice (1:3.3.1~rc2-1) unstable; urgency=low
* new upstream release candidate
diff --git a/patches/arm-optimization.diff b/patches/arm-optimization.diff
new file mode 100644
index 0000000..64f7c96
--- /dev/null
+++ b/patches/arm-optimization.diff
@@ -0,0 +1,159 @@
+--- /dev/null 2011-02-09 23:43:13.080975836 +0100
++++ libreoffice-3.3.1/libreoffice-build/patches/dev300/arm-optimization.diff 2011-02-19 17:42:32.000000000 +0100
+@@ -0,0 +1,137 @@
++diff -r 67e476e04669 configure.in
++--- configure.in Fri Nov 12 20:02:04 2010 +0100
+++++ configure.in Fri Feb 18 21:47:58 2011 +0100
++@@ -828,6 +828,16 @@
++ AC_ARG_ENABLE(dependency-tracking,
++ [ --disable-dependency-tracking Disables generation of dependency information.
++ ],,)
+++AC_ARG_WITH(arm-target,
+++[ --arm-target The minimal targeted arm processor
+++ used for the build environment.
+++ Cases :
+++ arm-target < 6 : armv4t compatibility
+++ arm-target = 6 : exact armv6 compatibility
+++ arm-target > 6 : armv7-a compatibility
+++
+++ Usage: --with-arm-target=7
+++],with_arm_target=$withval,with_arm_target=4)
++
++ BUILD_TYPE="OOo"
++
++@@ -5803,6 +5813,24 @@
++ AC_SUBST(GSTREAMER_CFLAGS)
++ AC_SUBST(GSTREAMER_LIBS)
++
+++dnl ===================================================================
+++dnl Check the ARM target
+++dnl ===================================================================
+++
+++if test "$_os" = "Linux" && echo "$build_cpu" | $GREP -q arm; then
+++ # default value
+++ ARM_TARGET=ARMV4T
+++ AC_MSG_CHECKING([which ARM processor optimization to use])
+++ if test "$with_arm_target" -lt "6"; then
+++ ARM_TARGET=ARMV4T
+++ elif test "$with_arm_target" = "6"; then
+++ ARM_TARGET=ARMV6
+++ elif test "$with_arm_target" -gt "6"; then
+++ ARM_TARGET=ARMV7
+++ fi
+++ AC_MSG_RESULT([$ARM_TARGET])
+++ AC_SUBST(ARM_TARGET)
+++fi
++
++ dnl ===================================================================
++ dnl Check whether the Cairo libraries are available.
++diff -r 67e476e04669 sal/osl/unx/interlck.c
++--- sal/osl/unx/interlck.c Fri Nov 12 20:02:04 2010 +0100
+++++ sal/osl/unx/interlck.c Fri Feb 18 21:47:58 2011 +0100
++@@ -134,6 +134,54 @@
++ return nCount;
++ }
++
+++#elif defined ( GCC ) && defined ( ARM )
+++
+++/*****************************************************************************/
+++/* osl_incrementInterlockedCount */
+++/*****************************************************************************/
+++oslInterlockedCount SAL_CALL osl_incrementInterlockedCount(oslInterlockedCount* pCount)
+++{
+++#if defined( ARMV7 ) || defined( ARMV6 )
+++ register oslInterlockedCount nCount __asm__ ("r1");
+++ int nResult;
+++
+++ __asm__ __volatile__ (
+++"1: ldrex %0, [%3]\n"
+++" add %0, %0, #1\n"
+++" strex %1, %0, [%3]\n"
+++" teq %1, #0\n"
+++" bne 1b"
+++ : "=&r" (nCount), "=&r" (nResult), "=m" (*pCount)
+++ : "r" (pCount)
+++ : "memory");
+++
+++ return nCount;
+++#else
+++ return __sync_add_and_fetch( pCount, 1 );
+++#endif
+++}
+++
+++oslInterlockedCount SAL_CALL osl_decrementInterlockedCount(oslInterlockedCount* pCount)
+++{
+++#if defined( ARMV7 ) || defined( ARMV6 )
+++ register oslInterlockedCount nCount __asm__ ("r1");
+++ int nResult;
+++
+++ __asm__ __volatile__ (
+++"0: ldrex %0, [%3]\n"
+++" sub %0, %0, #1\n"
+++" strex %1, %0, [%3]\n"
+++" teq %1, #0\n"
+++" bne 0b"
+++ : "=&r" (nCount), "=&r" (nResult), "=m" (*pCount)
+++ : "r" (pCount)
+++ : "memory");
+++ return nCount;
+++#else
+++ return __sync_sub_and_fetch( pCount, 1 );
+++#endif
+++}
+++
++ #else
++ /* use only if nothing else works, expensive due to single mutex for all reference counts */
++
++diff -r 67e476e04669 set_soenv.in
++--- set_soenv.in Fri Nov 12 20:02:04 2010 +0100
+++++ set_soenv.in Fri Feb 18 21:47:58 2011 +0100
++@@ -1694,6 +1694,7 @@
++ ToFile( "SET_EXCEPTIONS", $SET_EXCEPTIONS, "e" );
++ ToFile( "use_shl_versions", $use_shl_versions, "e" );
++ ToFile( "FLIPCMD", $FLIPCMD, "e" );
+++ToFile( "ARM_TARGET", "@ARM_TARGET@", "e" );
++ #
++ # Writing the variables to file.
++ # (c = comment, e = environment variable, a = alias, n = newline )
++diff -r 67e476e04669 solenv/inc/unxlngr.mk
++--- solenv/inc/unxlngr.mk Fri Nov 12 20:02:04 2010 +0100
+++++ solenv/inc/unxlngr.mk Fri Feb 18 21:47:58 2011 +0100
++@@ -32,3 +32,19 @@
++ CDEFS+=-DARM32
++ CFLAGS+=-fno-omit-frame-pointer
++ DLLPOSTFIX=lr
+++
+++.IF "$(ARM_TARGET)" == "ARMV4T"
+++ARCH_FLAGS+=-march=armv4t
+++CDEFS+=-DARMV4T
+++.ENDIF
+++
+++.IF "$(ARM_TARGET)" == "ARMV6"
+++ARCH_FLAGS+=-march=armv6
+++CDEFS+=-DARMV6
+++.ENDIF
+++
+++.IF "$(ARM_TARGET)" == "ARMV7"
+++ARCH_FLAGS+=-march=armv7-a -mtune=cortex-a8 -mfpu=neon
+++CDEFS+=-DARMV7
+++.ENDIF
+++
+--- libreoffice-3.3.1/libreoffice-build/patches/dev300/apply-old 2011-02-19 17:44:18.000000000 +0100
++++ libreoffice-3.3.1/libreoffice-build/patches/dev300/apply 2011-02-19 17:45:10.000000000 +0100
+@@ -34,7 +34,7 @@
+ KDE4Experimental, MinGW, CalcExperimental, \
+ OOXMLExportExperimental, CrossWin32Patches, AutoLayout, \
+ WriterNavigation \
+- HPPA, AXP, ARM, Speed, GSoC2010, Toolbars
++ HPPA, AXP, Speed, GSoC2010, Toolbars
+ DebianLooseSections: DebianBaseNoHelpContent
+ # Optional sections
+ Optional : LiberationFontsOnWindows, NovellOnlyExtensionFixes
+@@ -2386,3 +2386,7 @@
+
+ [ TemporaryHacks ]
+ hack-no-rm-fr-of-smoketest-userconfig.diff
++
++[ ARM ]
++arm-optimization.diff
++
diff --git a/patches/series b/patches/series
index b8d1e31..e179057 100644
--- a/patches/series
+++ b/patches/series
@@ -5,3 +5,4 @@ hack-no-rm-fr-of-smoketest-userconfig.diff
do-not-switch-workspaces-of-wm.diff
bridges-mkstemp-error-better-message.diff
pyuno-demo-fix-PYTHONPATH.diff
+arm-optimization.diff
diff --git a/rules b/rules
index e227af8..548c648 100755
--- a/rules
+++ b/rules
@@ -352,6 +352,11 @@ ifeq "$(ARCH)" "i386"
USE_STLPORT=y
endif
+# ARM target
+ifeq "$(ARCH)" "armhf"
+ CONFIGURE_FLAGS += --with-arm-target=7
+endif
+
ifeq "$(ENABLE_OPENGL)" "y"
# doesn't make that much sense on armel and mips(el), does it? :)
OOO_OGLTRANS_ARCHS = $(filter-out arm armel mips%, $(OOO_ARCHS))
--
LibreOffice packaging repository
Reply to: