[Libreoffice-commits] .: 7 commits - README.cross RepositoryFixes.mk set_soenv.in solenv/bin solenv/gbuild solenv/inc

Tor Lillqvist tml at kemper.freedesktop.org
Sat Jun 18 06:59:21 PDT 2011


 README.cross                       |   18 +++++----
 RepositoryFixes.mk                 |   16 +++-----
 set_soenv.in                       |    2 -
 solenv/bin/deliver.pl              |    4 +-
 solenv/gbuild/platform/winmingw.mk |   70 +++++++++++++++++++++++--------------
 solenv/inc/libs.mk                 |    5 --
 6 files changed, 64 insertions(+), 51 deletions(-)

New commits:
commit 1ac660e53e8b2a286f6be4b5fdd91d2ae42a8ec3
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Sat Jun 18 16:48:16 2011 +0300

    MinGW hacks, we get a bit further now
    
    I am mostly ignoring the possibility to build natively on Windows
    using MinGW. I don't see any reasoon to bother supporting that. If we
    want to build with MinGW, we want to do it as cross-compilation.
    
    I am not intentionally removing OOo-originated native MinGW
    compilation stuff. Yet. But will soon...

diff --git a/solenv/gbuild/platform/winmingw.mk b/solenv/gbuild/platform/winmingw.mk
index 5f1130a..74fdd2a 100644
--- a/solenv/gbuild/platform/winmingw.mk
+++ b/solenv/gbuild/platform/winmingw.mk
@@ -114,7 +114,6 @@ gb_CFLAGS := \
 	-fmessage-length=0 \
 	-fno-strict-aliasing \
 	-pipe \
-	-nostdinc \
 
 gb_CXXFLAGS := \
 	-Wall \
@@ -128,7 +127,6 @@ gb_CXXFLAGS := \
 	-fmessage-length=0 \
 	-fno-strict-aliasing \
 	-pipe \
-	-nostdinc \
 
 ifneq ($(EXTERNAL_WARNINGS_NOT_ERRORS),TRUE)
 gb_CFLAGS_WERROR := -Werror
@@ -429,7 +427,7 @@ $(call gb_Helper_abbreviate_dirs_native,\
 		@$${RESPONSEFILE} \
 		$(foreach extraobjectlist,$(EXTRAOBJECTLISTS),@$(extraobjectlist)) \
 		--start-group $(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) --end-group \
-		--start-group $(patsubst %.dll,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_dllname,$(lib)))) --end-group \
+		--start-group $(patsubst lib%.dll.a,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_dllname,$(lib)))) --end-group \
 		$(MINGW_CLIB_DIR)/crtend.o \
 		-Map $(basename $(1)).map \
 		-o $(1))
@@ -453,7 +451,7 @@ $(call gb_Helper_abbreviate_dirs_native,\
 		@$${RESPONSEFILE} \
 		$(foreach extraobjectlist,$(EXTRAOBJECTLISTS),@$(extraobjectlist)) \
 		--start-group $(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) --end-group \
-		--start-group $(patsubst %.dll,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_dllname,$(lib)))) --end-group \
+		--start-group $(patsubst lib%.dll.a,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_dllname,$(lib)))) --end-group \
 		$(MINGW_CLIB_DIR)/crtend.o \
 		-Map $(basename $(DLLTARGET)).map \
 		-o $(DLLTARGET) && touch $(1))
@@ -485,8 +483,28 @@ gb_Library_DEFS := -D_DLL
 gb_Library_TARGETTYPEFLAGS := -shared
 gb_Library_get_rpath :=
 
-gb_Library_SYSPRE := i
-gb_Library_PLAINEXT := .lib
+gb_Library_SYSPRE := lib
+gb_Library_UNOVERPRE := $(gb_Library_SYSPRE)uno_
+gb_Library_PLAINEXT := .dll.a
+
+# These refer to *import* library names, I think.
+
+# Except that actually I think there might be confusion here whether
+# things refers to import library or actual DLL names.  As the MinGW
+# work is highly experimental and not even in theory will produce
+# stuff that is binary compatible with MSVC-build binary extensions
+# anyway, we could just unify the names. But on the other hand until
+# complete gbuildification is achieved we want to keep the libs.mk
+# simple, i.e.  avoid lots of WNTGCC special casing in -l flags
+# there. Sigh.
+
+gb_Library_DLLEXT := .dll.a
+gb_Library_UDK_MAJORVER := 3
+gb_Library_RTEXT := gcc3$(gb_Library_DLLEXT)
+gb_Library_OOOEXT := $(gb_Library_DLLPOSTFIX)$(gb_Library_DLLEXT)
+gb_Library_UNOEXT := $(gb_Library_DLLEXT)
+gb_Library_UNOVEREXT := $(gb_Library_UDK_MAJORVER)$(gb_Library_DLLEXT)
+gb_Library_RTVEREXT := $(gb_Library_RTEXT)
 
 gb_Library_PLAINLIBS_NONE += \
 	mingwthrd \
@@ -523,27 +541,29 @@ gb_Library_LAYER := \
 	$(foreach lib,$(gb_Library_UNOLIBS_OOO),$(lib):OOO) \
 	$(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):OOO) \
 
-gb_Library_FILENAMES :=\
-	$(foreach lib,$(gb_Library_TARGETS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_PLAINEXT)) \
+# These refer to *import* libraries. We want the same -l switches to
+# work as on Unix, I think, so we don't bother with any RT or UNO
+# version numbers in the import libraries.
 
-gb_Library_DLLEXT := .dll
-gb_Library_MAJORVER := 3
-gb_Library_RTEXT := gcc3$(gb_Library_DLLEXT)
-gb_Library_OOOEXT := $(gb_Library_DLLPOSTFIX)$(gb_Library_DLLEXT)
-gb_Library_UNOEXT := .uno$(gb_Library_DLLEXT)
-gb_Library_UNOVEREXT := $(gb_Library_MAJORVER)$(gb_Library_DLLEXT)
-gb_Library_RTVEREXT := $(gb_Library_MAJORVER)$(gb_Library_RTEXT)
-
-gb_Library_DLLFILENAMES := \
-	$(foreach lib,$(gb_Library_OOOLIBS),$(lib):$(lib)$(gb_Library_OOOEXT)) \
-	$(foreach lib,$(gb_Library_PLAINLIBS_NONE),$(lib):$(lib)$(gb_Library_DLLEXT)) \
-	$(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):$(lib)$(gb_Library_DLLEXT)) \
-	$(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):$(lib)$(gb_Library_DLLEXT)) \
-	$(foreach lib,$(gb_Library_RTLIBS),$(lib):$(lib)$(gb_Library_RTEXT)) \
-	$(foreach lib,$(gb_Library_RTVERLIBS),$(lib):$(lib)$(gb_Library_RTVEREXT)) \
+# It's the names of some of the DLLs that have version numbers. But
+# whether even that makes any sense, I don't know. Anyway, those DLLs
+# are so far build in the old dmake way, so this file doesn't affect
+# them. Also, one is not supposed to install the bloody DLLs in
+# quesiton system-wide anyway on Windows, so it doesn't really matter
+# whether at some point when we do an ABI break the DLL names stay the
+# same or not.
+
+gb_Library_FILENAMES :=\
+	$(foreach lib,$(gb_Library_OOOLIBS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_OOOEXT)) \
+	$(foreach lib,$(gb_Library_PLAINLIBS_NONE),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_DLLEXT)) \
+	$(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_DLLEXT)) \
+	$(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_DLLEXT)) \
+	$(foreach lib,$(gb_Library_RTLIBS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_RTEXT)) \
+	$(foreach lib,$(gb_Library_RTVERLIBS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_RTVEREXT)) \
 	$(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):$(lib)$(gb_Library_UNOEXT)) \
 	$(foreach lib,$(gb_Library_UNOLIBS_OOO),$(lib):$(lib)$(gb_Library_UNOEXT)) \
-	$(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):$(lib)$(gb_Library_UNOVEREXT)) \
+	$(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):$(gb_Library_UNOVERPRE)$(lib)$(gb_Library_UNOEXT)) \
+
 
 gb_Library_IARCSYSPRE := lib
 gb_Library_IARCEXT := .a
@@ -585,7 +605,7 @@ $(call gb_LinkTarget_get_target,$(call gb_Library__get_linktargetname,$(1))) : N
 endef
 
 define gb_Library_get_dllname
-$(patsubst $(1):%,%,$(filter $(1):%,$(gb_Library_DLLFILENAMES)))
+$(patsubst $(1):%,%,$(filter $(1):%,$(gb_Library_FILENAMES)))
 endef
 
 
commit 5b8c968e4f859e854dcb69132e68469289a868af
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Sat Jun 18 16:46:39 2011 +0300

    Use the slightly different library names for MinGW, too

diff --git a/RepositoryFixes.mk b/RepositoryFixes.mk
index 5155f50..8cdfc17 100644
--- a/RepositoryFixes.mk
+++ b/RepositoryFixes.mk
@@ -30,7 +30,8 @@
 
 # Make has no support for 'or' clauses in conditionals,
 # we use a filter expression instead.
-ifneq (,$(filter LINUX MACOSX DRAGONFLY OPENBSD FREEBSD NETBSD IOS ANDROID, $(OS)))
+ifneq (,$(filter LINUX-GCC MACOSX-GCC WNT-GCC DRAGONFLY-GCC OPENBSD-GCC FREEBSD-GCC NETBSD-GCC IOS-GCC ANDROID-GCC, $(OS)-$(COM)))
+# Could we in fact just check for $(COM) == "GCC" here?
 gb_Library_FILENAMES := $(patsubst comphelper:libcomphelper%,comphelper:libcomphelp%,$(gb_Library_FILENAMES))
 gb_Library_FILENAMES := $(patsubst cppuhelper:libcppuhelper%,cppuhelper:libuno_cppuhelper%,$(gb_Library_FILENAMES))
 gb_Library_FILENAMES := $(patsubst jvmfwk:libuno_jvmfwk%,jvmfwk:libjvmfwk%,$(gb_Library_FILENAMES))
@@ -42,6 +43,11 @@ endif
 
 
 ifeq ($(OS),WNT)
+
+# USE_MINGW refers to the OOo idea of using MinGW natively on Windows,
+# which we don't want to bother with in LibreOffice, I think. If you
+# want to build natively on Windows, use MSVC.
+
 ifneq ($(USE_MINGW),)
 gb_Library_FILENAMES := $(patsubst comphelper:icomphelper%,comphelper:icomphelp%,$(gb_Library_FILENAMES))
 gb_Library_FILENAMES := $(patsubst cppunit:icppunit%,cppunit:libcppunit.dll$(gb_Library_IARCEXT),$(gb_Library_FILENAMES))
commit 8153c8ed7254889c94367cdee545685b17f299a6
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Sat Jun 18 16:35:59 2011 +0300

    Temporary hack can be binned now

diff --git a/set_soenv.in b/set_soenv.in
index 863a391..35f6fea 100755
--- a/set_soenv.in
+++ b/set_soenv.in
@@ -670,8 +670,6 @@ elsif ( $platform =~ m/cygwin|mingw32/ )
   else # The MSVC section starts here
   {   print "Setting Windows (MSVC) specific values... ";
       $outfile        = "WindowsMSVCEnv.Set.sh";
-      # Temporary hack: remove the old winenv.set.sh to avoid confusion... drop after a few weeks
-      unlink('winenv.set.sh');
       $COMPATH        = PathFormat('@COMPATH@');
       $COM            = "MSC";
       $OUTPATH        = "wntmsci at COMEX@";
commit 610c8f48929cbd02161181bd9f080425e0536eeb
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Sat Jun 18 13:04:34 2011 +0300

    It is whether the HOST platform supports symlinks that is relevant

diff --git a/solenv/bin/deliver.pl b/solenv/bin/deliver.pl
index 1f806ea..1e9b784 100755
--- a/solenv/bin/deliver.pl
+++ b/solenv/bin/deliver.pl
@@ -506,8 +506,8 @@ sub init_globals
                 [ '%GUI%',              $gui            ]
               );
 
-    # find out if the system supports symlinks
-    $has_symlinks = eval { symlink("",""); 1 };
+    # find out if the *HOST* system supports symlinks. They all do except Windows
+    $has_symlinks = $ENV{GUI} ne 'WNT';
 }
 
 sub get_base 
commit 05233aeab5efd1152718501c403b6878661a062a
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Sat Jun 18 13:00:13 2011 +0300

    Avoid more pointless special-casing for WNTGCC

diff --git a/solenv/inc/libs.mk b/solenv/inc/libs.mk
index 2624564..f666f86 100644
--- a/solenv/inc/libs.mk
+++ b/solenv/inc/libs.mk
@@ -85,13 +85,8 @@ OPENSSLLIBST=$(STATIC) -lssl -lcrypto $(DYNAMIC)
 REGLIB=-lreg
 XMLOFFLIB=-lxo$(DLLPOSTFIX)
 XMLOFFLLIB=-lxol
-.IF "$(GUI)$(COM)"=="WNTGCC"
-STORELIB=-lstore$(UDK_MAJOR)
-SALLIB=-luno_sal$(UDK_MAJOR)
-.ELSE			# "$(GUI)$(COM)"=="WNTGCC"
 STORELIB=-lstore
 SALLIB=-luno_sal
-.ENDIF			# "$(GUI)$(COM)"=="WNTGCC"
 ODBCLIB=-lodbc$(DLLPOSTFIX)
 ODBCBASELIB=-lodbcbase$(DLLPOSTFIX)
 DBFILELIB=-lfile$(DLLPOSTFIX)
commit 5bd1f05425ff3b5b8616d203a1025c046aa95df0
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Sat Jun 18 12:26:08 2011 +0300

    Avoid duplication

diff --git a/RepositoryFixes.mk b/RepositoryFixes.mk
index a57b612..5155f50 100644
--- a/RepositoryFixes.mk
+++ b/RepositoryFixes.mk
@@ -30,7 +30,7 @@
 
 # Make has no support for 'or' clauses in conditionals,
 # we use a filter expression instead.
-ifneq (,$(filter LINUX DRAGONFLY OPENBSD FREEBSD NETBSD IOS ANDROID, $(OS)))
+ifneq (,$(filter LINUX MACOSX DRAGONFLY OPENBSD FREEBSD NETBSD IOS ANDROID, $(OS)))
 gb_Library_FILENAMES := $(patsubst comphelper:libcomphelper%,comphelper:libcomphelp%,$(gb_Library_FILENAMES))
 gb_Library_FILENAMES := $(patsubst cppuhelper:libcppuhelper%,cppuhelper:libuno_cppuhelper%,$(gb_Library_FILENAMES))
 gb_Library_FILENAMES := $(patsubst jvmfwk:libuno_jvmfwk%,jvmfwk:libjvmfwk%,$(gb_Library_FILENAMES))
@@ -41,16 +41,6 @@ gb_Library_FILENAMES := $(patsubst ucbhelper:libucbhelper%,ucbhelper:libucbhelpe
 endif
 
 
-ifeq ($(OS),MACOSX)
-gb_Library_FILENAMES := $(patsubst comphelper:libcomphelper%,comphelper:libcomphelp%,$(gb_Library_FILENAMES))
-gb_Library_FILENAMES := $(patsubst cppuhelper:libcppuhelper%,cppuhelper:libuno_cppuhelper%,$(gb_Library_FILENAMES))
-gb_Library_FILENAMES := $(patsubst jvmfwk:libuno_jvmfwk%,jvmfwk:libjvmfwk%,$(gb_Library_FILENAMES))
-gb_Library_FILENAMES := $(patsubst salhelper:libsalhelper%,salhelper:libuno_salhelper%,$(gb_Library_FILENAMES))
-gb_Library_FILENAMES := $(patsubst ucbhelper:libucbhelper%,ucbhelper:libucbhelper4%,$(gb_Library_FILENAMES))
-
-endif
-
-
 ifeq ($(OS),WNT)
 ifneq ($(USE_MINGW),)
 gb_Library_FILENAMES := $(patsubst comphelper:icomphelper%,comphelper:icomphelp%,$(gb_Library_FILENAMES))
commit 7f312cb72f3c5e423a10a1fc844c569eb564da52
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Sat Jun 18 11:31:50 2011 +0300

    Update the MinGW part a bit

diff --git a/README.cross b/README.cross
index 0f21f91..84006e8 100644
--- a/README.cross
+++ b/README.cross
@@ -72,10 +72,12 @@ Cygwin gcc in its -mno-cygwin mode, and a native MinGW compiler.  The
 it isn't already, and I have not attempted to check that it keeps
 working. Ditto for native MinGW; if one compiles natively on Windows,
 why not use Microsoft's compiler, as OOo/LO has been build for Windows
-all the time using that and it works fine. In my opinion, it makes
-sense to use MinGW only for cross-compilation. (Because of obvious
-benefits like speed improvement, easier automation in systems like the
-openSUSE Build Servce, etc.)
+all the time using that and it works fine.
+
+In my opinion, the only case where it makes sense to use MinGW is for
+cross-compilation. There is just too much crack on Windows anyway, and
+it is a semi-miracle (well, make that the result of years of work)
+that the MSVC build under Cygwin works as nicely as it does.
 
 MinGW is available as cross-build toolchains pre-packaged in more or
 less official packages for many Linux distros including Debian, Fedora
@@ -83,9 +85,9 @@ and openSUSE. Personally I use the mingw32 packages in the openSUSE
 Build Service, running on openSUSE.
 
 It is somewhat unclear how well thought-out the conditionals and code
-for MinGW inside the LibreOffice code actually is. The little I have
-seen of it seems a bit randomish, with copy-pasting haveing been
-preferred to factoring out differences.
+for MinGW inside the OOo-originated code in LibreOffice actually
+is. The little I have seen of it seems a bit randomish, with
+copy-pasting having been preferred to factoring out differences.
 
 The autogen.lastrun I use for my MinGW cross-compilation experimentation is:
 
@@ -114,12 +116,14 @@ CXX_FOR_BUILD=ccache g++
 --with-max-jobs=1
 --with-system-altlinuxhyph
 --with-system-boost
+--with-system-cairo
 --with-system-curl
 --with-system-db
 --with-system-expat
 --with-system-gettext
 --with-system-hunspell
 --with-system-icu
+--with-system-libpng
 --with-system-libwpd
 --with-system-libwpg
 --with-system-libwps


More information about the Libreoffice-commits mailing list