[Libreoffice-commits] core.git: configure.ac ios/CustomTarget_Lo_Xcconfig.mk ios/lo.xcconfig.in

Tor Lillqvist tml at collabora.com
Tue Dec 17 04:23:09 PST 2013


 configure.ac                    |   13 +++++++------
 ios/CustomTarget_Lo_Xcconfig.mk |   12 +++++++++---
 ios/lo.xcconfig.in              |   12 +++++++-----
 3 files changed, 23 insertions(+), 14 deletions(-)

New commits:
commit 13b73d94dc2f6fc707e94eb58aee449494128d82
Author: Tor Lillqvist <tml at collabora.com>
Date:   Tue Dec 17 14:13:35 2013 +0200

    Pass also Xcode's ARCHS, OTHER_CFLAGS and OTHER_CPLUSPLUSFLAGS in lo.xcconfig
    
    ARCHS tells Xcode to build the architecture for which the LO code has
    been built. The CFLAGS properties make sure the same -D flags are used
    as for the LO code.
    
    Change-Id: I3c8af0ff9fba7d0b4eddbc0af9aad44fb385314c

diff --git a/configure.ac b/configure.ac
index 0c58a9c..ab86c34 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2973,10 +2973,10 @@ if test $_os = iOS; then
 
     if test "$enable_ios_simulator" = yes; then
         if test "$BITNESS_OVERRIDE" = 64; then
-            arch=x86_64
+            XCODE_ARCHS=x86_64
             versionmin=-mios-simulator-version-min=7.0
         else
-            arch=i386
+            XCODE_ARCHS=i386
             case $sdkver in
             7.*)
                 versionmin=-mios-simulator-version-min=6.1
@@ -2989,10 +2989,10 @@ if test $_os = iOS; then
     else
         platform=iPhoneOS
         if test "$BITNESS_OVERRIDE" = 64; then
-            arch=arm64
+            XCODE_ARCHS=arm64
             versionmin=-miphoneos-version-min=7.0
         else
-            arch=armv7
+            XCODE_ARCHS=armv7
             versionmin=-miphoneos-version-min=6.1
         fi
     fi
@@ -3023,8 +3023,8 @@ if test $_os = iOS; then
 
     stdlib="-stdlib=$XCODE_CLANG_CXX_LIBRARY"
 
-    CC="`xcrun -find clang` -arch $arch -fvisibility=hidden -isysroot $sysroot $lto $versionmin"
-    CXX="`xcrun -find clang++` -arch $arch -fvisibility=hidden $stdlib -isysroot $sysroot $lto $versionmin"
+    CC="`xcrun -find clang` -arch $XCODE_ARCHS -fvisibility=hidden -isysroot $sysroot $lto $versionmin"
+    CXX="`xcrun -find clang++` -arch $XCODE_ARCHS -fvisibility=hidden $stdlib -isysroot $sysroot $lto $versionmin"
 
     INSTALL_NAME_TOOL=`xcrun -find install_name_tool`
     AR=`xcrun -find ar`
@@ -3035,6 +3035,7 @@ if test $_os = iOS; then
 fi
 
 AC_SUBST(XCODE_CLANG_CXX_LIBRARY)
+AC_SUBST(XCODE_ARCHS)
 
 AC_MSG_CHECKING([whether to treat the installation as read-only])
 
diff --git a/ios/CustomTarget_Lo_Xcconfig.mk b/ios/CustomTarget_Lo_Xcconfig.mk
index b6032da..31a6973 100644
--- a/ios/CustomTarget_Lo_Xcconfig.mk
+++ b/ios/CustomTarget_Lo_Xcconfig.mk
@@ -15,10 +15,16 @@ $(call gb_CustomTarget_get_target,ios/Lo_Xcconfig): $(LO_XCCONFIG)
 .PHONY : $(LO_XCCONFIG)
 
 $(LO_XCCONFIG) :
-    # Edit in the list of all our (static) libs in the Xcode
-    # configuration file.
+    # Edit the Xcode configuration file:
+    # - the list of all our (static) libs
+    # - compiler flags
+    #
 	all_libs=`$(SRCDIR)/bin/lo-all-static-libs`; \
-	sed -e "s|^\(LINK_LDFLAGS =\).*$$|\1 $$all_libs|" < $(LO_XCCONFIG) > $(LO_XCCONFIG).new && mv $(LO_XCCONFIG).new $(LO_XCCONFIG)
+	\
+	sed -e "s,^\(LINK_LDFLAGS =\).*$$,\1 $$all_libs," \
+		-e "s,^\(OTHER_CFLAGS =\).*$$,\1 $(gb_GLOBALDEFS)," \
+		-e "s,^\(OTHER_CPLUSPLUSFLAGS =\).*$$,\1 $(gb_GLOBALDEFS)," \
+			< $(LO_XCCONFIG) > $(LO_XCCONFIG).new && mv $(LO_XCCONFIG).new $(LO_XCCONFIG)
 
     # When SRCDIR!=BUILDDIR, Xcode is used on the project in the
     # *source* tree (because that is where the source files are). Copy
diff --git a/ios/lo.xcconfig.in b/ios/lo.xcconfig.in
index c63e13c..3f654ed 100644
--- a/ios/lo.xcconfig.in
+++ b/ios/lo.xcconfig.in
@@ -6,7 +6,7 @@
 // License, v. 2.0. If a copy of the MPL was not distributed with this
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-// Xcode configuration variables
+// Xcode configuration properties
 
 // To avoid confusion, the LO-specific ones that aren't as such used
 // by Xcode (but only expanded in option values) are prefixed with
@@ -17,11 +17,13 @@ LO_INSTDIR = @INSTDIR@
 LO_SRCDIR = @SRC_ROOT@
 LO_WORKDIR = @WORKDIR@
 
-// The value of this variable is inserted in
-// CustomTarget_MobileLibreOffice_app.mk.
-LINK_LDFLAGS =
-
 // These are actual Xcode-known settings. The corresponding autoconf
 // variables are prefixed with XCODE_ to make it clear in configure.ac
 // what they will be used for.
+ARCHS = @XCODE_ARCHS@
 CLANG_CXX_LIBRARY = @XCODE_CLANG_CXX_LIBRARY@
+
+// These settings are edited in CustomTarget_Lo_Xcconfig.mk.
+LINK_LDFLAGS =
+OTHER_CFLAGS =
+OTHER_CPLUSPLUSFLAGS =


More information about the Libreoffice-commits mailing list