[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Mingw-cross-env-list] [call for review UPDATED] Qt 4.7-beta1

From: Mark Brand
Subject: Re: [Mingw-cross-env-list] [call for review UPDATED] Qt 4.7-beta1
Date: Wed, 19 May 2010 21:08:30 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20100430 SUSE/3.1b2-7.1 Thunderbird/3.1b2

 Hi Tony,

Nice work, it certainly is a much cleaner makefile, and I like the
out-of-tree build.

The original motivation for building out-of-tree was to be able to use the same source tree for both host and target. Only later did I discover that the target build now also takes care of the necessary bits for the host.

A small patch is needed to build on OSX and Open Solaris (attached)
that disables a check for rpath-link. This is only used in the native
moc build, and I *think* it's more relevant when cross-compiling to
embedded devices [1]. It doesn't have any affect on Ubuntu.

The only other change is to forcibly disable Cocoa (native OSX gui). I
think some of the flags (QT_MAC_USE_COCOA) are set early during
configure and don't check for cross-compile. Later, many "ifdefs" only
check for this and try to use OSX headers/libs.

My interpretation of your changes is in the updated versions here:

Both changes are in a patch to configure. These will probably be good candidates for an upstream merge request. This is the change (for review purposes only, since it's in the updated versions):

diff --git a/configure b/configure
index 82f8c7c..0c7c176 100755
--- a/configure
+++ b/configure
@@ -6304,6 +6304,9 @@ if [ "$PLATFORM_MAC" = "yes" ]; then

+# but disable Cocoa if cross-building for mingw
+[ "$XPLATFORM" = "win32-g++" ] && CFG_MAC_COCOA="no"
# set the global Mac deployment target. This is overridden on an arch-by-arch basis
 # in some cases, see code further down
@@ -7633,7 +7636,7 @@ QMAKE_LIBDIR_QT  = \$\$QT_BUILD_TREE/lib

 # Ensure we can link to uninistalled libraries
-if linkerSupportsFlag -rpath-link "$outpath/lib"; then
+if [ "$XPLATFORM" != "win32-g++" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then echo "QMAKE_LFLAGS += -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib" >> "$CACHEFILE.tmp"

I've also done some more work since my original post to make the changes more workable for upstream merge requests later on. I hope I didn't break anything for you. :)

The test program and most of the demos work too.

Thanks for checking. Would you mind another round of checking?

It also looks like webkit is also being successfully cross-compiled in
places [2], and may be ready for 4.7.

I think [2] is about getting webkit working in Mingw-w64, not in MinGW (on which mingw-cross-env is based). Mingw-w64 is a fork of MinGW.

Anyway, webkit has worked probably since Qt 4.6.0 on mingw-cross-env. You just have to enable it with "-webkit -shared" instead of "-no-webkit -static". The last time I checked, webkit required shared Qt libraries.

[2] http://article.gmane.org/gmane.comp.gnu.mingw.w64.general/927/

One still open issue, albeit not pressing, is that when a 64 bit host is detected, the *target* stage of the build fails later on:

{standard input}: Assembler messages:
{standard input}:217: Error: suffix or operands invalid for `cmpxchg

That's why we still use "-host-arch i386" which also works on 64 bit systems.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]