[Libreoffice-commits] core.git: 8 commits - configure.ac odk/examples sfx2/source solenv/gbuild
Tor Lillqvist
tml at collabora.com
Fri Oct 11 03:16:37 PDT 2013
configure.ac | 145 +++++++++++++---------
odk/examples/java/DocumentHandling/test/test1.odt |binary
sfx2/source/control/dispatch.cxx | 70 +++++-----
solenv/gbuild/platform/com_GCC_defs.mk | 6
4 files changed, 128 insertions(+), 93 deletions(-)
New commits:
commit 1a56bda2aa8d1aea587aec8021e4380abf0effb3
Author: Tor Lillqvist <tml at collabora.com>
Date: Fri Oct 11 13:11:50 2013 +0300
Small fix for cross-compilation
Change-Id: I5851af308193527a30eef1ded256f6b9ae69b260
diff --git a/configure.ac b/configure.ac
index f45152e..0ec35cf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4489,19 +4489,23 @@ if test "$cross_compiling" = "yes"; then
echo
rm -rf CONF-FOR-BUILD config_build.mk
mkdir CONF-FOR-BUILD
+ # Here must be listed all files needed when running the configure script. In particular, also
+ # those expanded by the AC_CONFIG_FILES() call near the end of this configure.ac. For clarity,
+ # keep them in the same order as there.
(cd $SRC_ROOT && tar cf - \
config.guess \
+ bin/get_config_variables \
+ solenv/bin/getcompver.awk \
+ solenv/inc/langlist.mk \
config_host.mk.in \
Makefile.in \
lo.xcent.in \
+ instsetoo_native/util/openoffice.lst.in \
config_host/*.in \
- bin/get_config_variables \
- solenv/bin/getcompver.awk \
- solenv/inc/langlist.mk \
- instsetoo_native/util/openoffice.lst.in) \
+ sysui/desktop/macosx/Info.plist.in) \
| (cd CONF-FOR-BUILD && tar xf -)
cp configure CONF-FOR-BUILD
- test -d config_build && cp -p config_build/*.h CONF-FOR-BUILD/config_host
+ test -d config_build && cp -p config_build/*.h CONF-FOR-BUILD/config_host 2>/dev/null
(
unset COM GUIBASE OS CPU CPUNAME
unset CC CXX SYSBASE CFLAGS
commit 7d879c775c3212193c4703ae57940630dad8800e
Author: Tor Lillqvist <tml at collabora.com>
Date: Fri Oct 11 11:59:05 2013 +0300
SCNR: #include cleanup
Obviously just a question of personal taste, and we have no consensus
here, and some say that <sal/config.h> should be included before any
other LO headers, for instance. Oh well, if this commit breaks on some
platform, please revert;)
Change-Id: Ie02ec4e68b19961165608220f07808641d2e4fda
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 27f6288..7ebb940 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -19,50 +19,50 @@
#include <config_features.h>
+#include <algorithm>
+#include <deque>
+#include <vector>
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/frame/XDispatchRecorderSupplier.hpp>
#include <com/sun/star/frame/XLayoutManager.hpp>
-#include <svl/itempool.hxx>
-#include <svl/itemiter.hxx>
-#include <svl/whiter.hxx>
-#include <svl/intitem.hxx>
-#include <svl/eitem.hxx>
-#include <svl/undo.hxx>
-#include <vcl/wrkwin.hxx>
-#include <stdio.h>
-#include <stdarg.h>
-#include <stdlib.h> // due to bsearch
-#include <algorithm>
-#include <svtools/helpopt.hxx>
-
-// due to nAutoPageID
-#include "appdata.hxx"
-#include "sfx2/sfxhelp.hxx"
+#include <rtl/strbuf.hxx>
+#include <sfx2/app.hxx>
+#include <sfx2/bindings.hxx>
+#include <sfx2/childwin.hxx>
#include <sfx2/dispatch.hxx>
+#include <sfx2/docfac.hxx>
+#include <sfx2/docfile.hxx>
+#include <sfx2/hintpost.hxx>
+#include <sfx2/ipclient.hxx>
+#include <sfx2/mnumgr.hxx>
+#include <sfx2/module.hxx>
#include <sfx2/msg.hxx>
+#include <sfx2/msgpool.hxx>
#include <sfx2/objface.hxx>
-#include <sfx2/bindings.hxx>
#include <sfx2/request.hxx>
-#include <sfx2/app.hxx>
-#include <sfx2/hintpost.hxx>
-#include "slotserv.hxx"
-#include <sfx2/ipclient.hxx>
-#include "sfxtypes.hxx"
+#include <sfx2/sfxhelp.hxx>
+#include <sfx2/sfxuno.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/viewsh.hxx>
-#include <sfx2/childwin.hxx>
-#include <sfx2/docfac.hxx>
-#include <sfx2/msgpool.hxx>
-#include <sfx2/module.hxx>
-#include <sfx2/sfxuno.hxx>
-#include <sfx2/docfile.hxx>
-#include <sfx2/mnumgr.hxx>
-#include "workwin.hxx"
-#include <rtl/strbuf.hxx>
+#include <svl/eitem.hxx>
+#include <svl/intitem.hxx>
+#include <svl/itemiter.hxx>
+#include <svl/itempool.hxx>
+#include <svl/undo.hxx>
+#include <svl/whiter.hxx>
+#include <svtools/helpopt.hxx>
+#include <vcl/wrkwin.hxx>
-#include <deque>
-#include <vector>
+#include <appdata.hxx>
+#include <sfxtypes.hxx>
+#include <slotserv.hxx>
+#include <workwin.hxx>
DBG_NAME(SfxDispatcherFlush)
DBG_NAME(SfxDispatcherFillState)
commit c7f7c954e0817de664344a620938a4e99ac7549c
Author: Tor Lillqvist <tml at collabora.com>
Date: Fri Oct 11 11:49:50 2013 +0300
Don't display menu unless HAVE_FEATURE_DESKTOP_GUI_ELEMENTS
Idea from http://lists.freedesktop.org/archives/libreoffice/2013-July/054088.html .
Sure, there must be tons of more code that should be ifdeffed for
HAVE_FEATURE_DESKTOP_GUI_ELEMENTS.
Change-Id: I1ef9ec749b795919c6e52e4f9e0a03bd0e874bc3
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 9d52515..27f6288 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/frame/XDispatchRecorderSupplier.hpp>
#include <com/sun/star/frame/XLayoutManager.hpp>
@@ -1238,6 +1240,7 @@ IMPL_LINK( SfxDispatcher, PostMsgHandler, SfxRequest*, pReq )
//--------------------------------------------------------------------
void SfxDispatcher::SetMenu_Impl()
{
+#if HAVE_FEATURE_DESKTOP_GUI_ELEMENTS
if ( pImp->pFrame )
{
SfxViewFrame* pTop = pImp->pFrame->GetTopViewFrame();
@@ -1262,6 +1265,7 @@ void SfxDispatcher::SetMenu_Impl()
}
}
}
+#endif
}
//--------------------------------------------------------------------
commit 3a912a626f9f96b62a6c425292a25ec02280d926
Author: Tor Lillqvist <tml at collabora.com>
Date: Thu Oct 10 23:41:51 2013 +0300
Add a picture and a graphic
Change-Id: Ic58a0c6302b4bdac892ba1d9d019ae5b6f98e27d
diff --git a/odk/examples/java/DocumentHandling/test/test1.odt b/odk/examples/java/DocumentHandling/test/test1.odt
index 70db63b..6ae5681 100644
Binary files a/odk/examples/java/DocumentHandling/test/test1.odt and b/odk/examples/java/DocumentHandling/test/test1.odt differ
commit 22bdb75a7a133c37b22b4a26b52f18f008ea44d4
Author: Tor Lillqvist <tml at collabora.com>
Date: Thu Oct 10 20:29:50 2013 +0300
Changes for iOS SDK 7.0
When building for the iOS Simulator, the -mios-simulator-min-version
switch should be used, not -mmacosx-version-min.
Change-Id: Icaf184b99d6b6160786b7a9de2fe475251d244cf
diff --git a/configure.ac b/configure.ac
index 37683da..f45152e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2903,15 +2903,43 @@ if test $_os = iOS; then
AC_MSG_CHECKING([what iOS SDK to use])
+ if test "$enable_ios_simulator" = yes; then
+ platform=iPhoneSimulator
+ else
+ platform=iPhoneOS
+ fi
+
xcode_developer=`xcode-select -print-path`
+ pref_sdk_ver=7.0
+ for sdkver in 7.0 6.1 6.0; do
+ t=$xcode_developer/Platforms/$platform.platform/Developer/SDKs/$platform$sdkver.sdk
+ if test -d $t; then
+ sysroot=$t
+ break
+ fi
+ done
+
+ if test -z "$sysroot"; then
+ AC_MSG_ERROR([Could not find iOS SDK, expected something like $xcode_developer/Platforms/$platform.platform/Developer/SDKs/${platform}${pref_sdk_ver}])
+ fi
+
+ AC_MSG_RESULT($sysroot)
+
if test "$enable_ios_simulator" = yes; then
- platform=iPhoneSimulator
- versionmin=-mmacosx-version-min=10.7
if test "$BITNESS_OVERRIDE" = 64; then
arch=x86_64
+ versionmin=-mios-simulator-version-min=7.0
else
arch=i386
+ case $sdkver in
+ 7.*)
+ versionmin=-mios-simulator-version-min=5.0
+ ;;
+ *)
+ versionmin=-mmacosx-version-min=10.7
+ ;;
+ esac
fi
else
platform=iPhoneOS
@@ -2924,21 +2952,8 @@ if test $_os = iOS; then
fi
fi
- pref_sdk_ver=6.1
- for I in 6.1 6.0 7.0; do
- t=$xcode_developer/Platforms/$platform.platform/Developer/SDKs/$platform$I.sdk
- if test -d $t; then
- sysroot=$t
- break
- fi
- done
-
- if test -z "$sysroot"; then
- AC_MSG_ERROR([Could not find iOS SDK, expected something like $xcode_developer/Platforms/$platform.platform/Developer/SDKs/${platform}${pref_sdk_ver}])
- fi
-
- AC_MSG_RESULT($sysroot)
-
+ # LTO is not really recommended for iOS builds,
+ # the link time will be astronomical
if test "$ENABLE_LTO" = TRUE; then
lto=-flto
fi
commit 23df408dec36acb6fb6e96de14874fc2a42b7268
Author: Tor Lillqvist <tml at collabora.com>
Date: Thu Oct 10 20:21:05 2013 +0300
Move C++ library check a bit earlier and use result
Change-Id: I459308bbc0f957b11f3088e56cd21b4aeef9721a
diff --git a/configure.ac b/configure.ac
index 735d20e..37683da 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6010,6 +6010,44 @@ AC_SUBST(HAVE_GCC_AVX)
AC_SUBST(HAVE_GCC_BUILTIN_ATOMIC)
dnl ===================================================================
+dnl Identify the C++ library
+dnl ===================================================================
+
+AC_MSG_CHECKING([What the C++ library is])
+AC_LANG_PUSH([C++])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <utility>
+#ifndef __GLIBCXX__
+foo bar
+#endif
+]])],
+ [CPP_LIBRARY=GLIBCXX
+ cpp_library_name="GNU libstdc++"
+ ],
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <utility>
+#ifndef _LIBCPP_VERSION
+foo bar
+#endif
+]])],
+ [CPP_LIBRARY=LIBCPP
+ cpp_library_name="LLVM libc++"
+ ],
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <utility>
+#ifndef _MSC_VER
+foo bar
+#endif
+]])],
+ [CPP_LIBRARY=MSVCRT
+ cpp_library_name="Microsoft"
+ ],
+ AC_MSG_ERROR([Could not figure out what C++ library this is]))))
+AC_MSG_RESULT([$cpp_library_name])
+AC_LANG_POP([C++])
+AC_SUBST(CPP_LIBRARY)
+
+dnl ===================================================================
dnl C++11
dnl ===================================================================
@@ -6043,7 +6081,7 @@ elif test "$GCC" = "yes"; then
fi
fi
-if test "$HAVE_CXX11" = TRUE; then
+if test $CPP_LIBRARY = GLIBCXX -a "$HAVE_CXX11" = TRUE; then
AC_MSG_CHECKING([whether using C++11 causes libstdc++ 4.7.0/4.7.1 ABI breakage])
AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@@ -6145,40 +6183,6 @@ if test "$HAVE_CXX11" = TRUE; then
CXXFLAGS=$save_CXXFLAGS
fi
-AC_MSG_CHECKING([What the C++ library is])
-AC_LANG_PUSH([C++])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#include <utility>
-#ifndef __GLIBCXX__
-foo bar
-#endif
-]])],
- [CPP_LIBRARY=GLIBCXX
- cpp_library_name="GNU libstdc++"
- ],
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#include <utility>
-#ifndef _LIBCPP_VERSION
-foo bar
-#endif
-]])],
- [CPP_LIBRARY=LIBCPP
- cpp_library_name="LLVM libc++"
- ],
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#include <utility>
-#ifndef _MSC_VER
-foo bar
-#endif
-]])],
- [CPP_LIBRARY=MSVCRT
- cpp_library_name="Microsoft"
- ],
- AC_MSG_ERROR([Could not figure out what C++ library this is]))))
-AC_MSG_RESULT([$cpp_library_name])
-AC_LANG_POP([C++])
-AC_SUBST(CPP_LIBRARY)
-
if test "$HAVE_CXX11" = "TRUE"; then
AC_DEFINE(HAVE_CXX11)
elif test -n "$CXXFLAGS_CXX11"; then
commit 09d246c82fa87a51e8c8100a3c37fcd32ea56e35
Author: Tor Lillqvist <tml at collabora.com>
Date: Thu Oct 10 15:34:14 2013 +0300
Use libc++ on iOS
Change-Id: I722b28f0d432c051fbe3a55823bc64b8a86e9a17
diff --git a/configure.ac b/configure.ac
index 8670dec..735d20e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2945,8 +2945,9 @@ if test $_os = iOS; then
# Just add -fvisibility=hidden to CC and CXX directly so that the 3rd-party libs also
# get compiled with it, to avoid ld warnings when linking all that together into one
# executable.
+ # Also, use libc++.
CC="`xcrun -find clang` -arch $arch -fvisibility=hidden -isysroot $sysroot $lto $versionmin"
- CXX="`xcrun -find clang++` -arch $arch -fvisibility=hidden -isysroot $sysroot $lto $versionmin"
+ CXX="`xcrun -find clang++` -arch $arch -fvisibility=hidden -stdlib=libc++ -isysroot $sysroot $lto $versionmin"
INSTALL_NAME_TOOL=`xcrun -find install_name_tool`
AR=`xcrun -find ar`
NM=`xcrun -find nm`
commit 7f213aaae8f1ccb23f43852d7c22baf766685763
Author: Tor Lillqvist <tml at collabora.com>
Date: Thu Oct 10 15:25:07 2013 +0300
Use -fvisibility=hidden also for 3rd-party libs for iOS
Change-Id: Ib2806d71f9c2dc18c64f2c92012eaa1c77ddd9d2
diff --git a/configure.ac b/configure.ac
index a917cfb..8670dec 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2942,8 +2942,11 @@ if test $_os = iOS; then
if test "$ENABLE_LTO" = TRUE; then
lto=-flto
fi
- CC="`xcrun -find clang` -arch $arch -isysroot $sysroot $lto $versionmin"
- CXX="`xcrun -find clang++` -arch $arch -isysroot $sysroot $lto $versionmin"
+ # Just add -fvisibility=hidden to CC and CXX directly so that the 3rd-party libs also
+ # get compiled with it, to avoid ld warnings when linking all that together into one
+ # executable.
+ CC="`xcrun -find clang` -arch $arch -fvisibility=hidden -isysroot $sysroot $lto $versionmin"
+ CXX="`xcrun -find clang++` -arch $arch -fvisibility=hidden -isysroot $sysroot $lto $versionmin"
INSTALL_NAME_TOOL=`xcrun -find install_name_tool`
AR=`xcrun -find ar`
NM=`xcrun -find nm`
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk
index 7cb2983..c747854 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -82,7 +82,11 @@ endif
ifeq ($(HAVE_GCC_VISIBILITY_FEATURE),TRUE)
-gb_VISIBILITY_FLAGS := -DHAVE_GCC_VISIBILITY_FEATURE -fvisibility=hidden
+gb_VISIBILITY_FLAGS := -DHAVE_GCC_VISIBILITY_FEATURE
+# If CC or CXX already include -fvisibility=hidden, don't duplicate it
+ifeq (,$(filter -fvisibility=hidden,$(CC)))
+gb_VISIBILITY_FLAGS += -fvisibility=hidden
+endif
ifneq ($(HAVE_GCC_VISIBILITY_BROKEN),TRUE)
gb_CXXFLAGS_COMMON += -fvisibility-inlines-hidden
endif
More information about the Libreoffice-commits
mailing list