Le jeudi 14 juin 2007 à 10:51 +0200, Harald Fernengel a écrit :
> Hi,
> 
> On Wednesday 13 June 2007 16:39:31 Markus Wagner wrote:
> > PS: Anybody has patches for Qt4.3 ?! (Seems to have multiple issuses with
> > ARM/ARMEL)
> 
> I built the 4.3.0 snapshot a while ago without any trouble.
> 
> As far as I remember I built Qt first for the host (i386), then changed 
> scratchbox to the ARM target, reconfigured and built only the libraries. That 
> way, the host tools (moc, uic, rcc) don't have to run in the QEMU emulation.

There is at least 1 big bug with ARM on QT 4.2.x (and 4.3.x). QT define
the type qreal to be float instead of double, and a lot of functions
want a double and not a qreal. And remove this tend to add a new bug in
qtestcase.h where a function is redefined when we compile for arm for
'supporting' qreal=float.. So the C++ compiler complain about a
redefinition.

I add here a patch for QT 4.2.3 (should be OK for other version) which
patch 3 things, the two bug I speak about before, and modifiy the qmake
build file for use host-* tools instead of their ARM conterparts.

Manoel
diff -r -d -u qt-x11-opensource-src-4.2.3.orig/qmake/Makefile.unix qt-x11-opensource-src-4.2.3/qmake/Makefile.unix
--- qt-x11-opensource-src-4.2.3.orig/qmake/Makefile.unix	2007-02-21 10:58:41.000000000 +0100
+++ qt-x11-opensource-src-4.2.3/qmake/Makefile.unix	2007-05-21 13:44:34.000000000 +0200
@@ -1,3 +1,15 @@
+#Maemo/Scratchbox patch
+CXX	    =	host-g++
+CC	    =	host-gcc
+LINK	=   host-ld
+#End
+
+#Maemo/Scratchbox patch
+CXX	    =	host-g++
+CC	    =	host-gcc
+LINK	=   host-ld
+#End
+
 SOURCE_PATH = @SOURCE_PATH@
 BUILD_PATH = @BUILD_PATH@
 QTOBJS = @QMAKE_QTOBJS@
diff -r -d -u qt-x11-opensource-src-4.2.3.orig/src/corelib/global/qglobal.h qt-x11-opensource-src-4.2.3/src/corelib/global/qglobal.h
--- qt-x11-opensource-src-4.2.3.orig/src/corelib/global/qglobal.h	2007-02-21 10:58:41.000000000 +0100
+++ qt-x11-opensource-src-4.2.3/src/corelib/global/qglobal.h	2007-05-21 10:20:58.000000000 +0200
@@ -792,8 +792,9 @@
 
 #if defined(QT_COORD_TYPE)
 typedef QT_COORD_TYPE qreal;
-#elif defined(__arm__)
-typedef float qreal;
+// BN: Defining qreal as float on arm breaks compilation!
+//#elif defined(__arm__)
+//typedef float qreal;
 #else
 typedef double qreal;
 #endif
diff -r -d -u qt-x11-opensource-src-4.2.3.orig/tools/qtestlib/src/qtestcase.h qt-x11-opensource-src-4.2.3/tools/qtestlib/src/qtestcase.h
--- qt-x11-opensource-src-4.2.3.orig/tools/qtestlib/src/qtestcase.h	2007-02-21 10:58:51.000000000 +0100
+++ qt-x11-opensource-src-4.2.3/tools/qtestlib/src/qtestcase.h	2007-05-21 17:01:26.000000000 +0200
@@ -194,6 +194,7 @@
     template <typename T1, typename T2>
     bool qCompare(T1 const &, T2 const &, const char *, const char *, const char *, int);
 
+/* Remove due to redefinition of qreal = double instead of qreal = float
 #if defined(QT_COORD_TYPE) || defined(__arm__)
     template <>
     inline bool qCompare<qreal, double>(qreal const &t1, double const &t2, const char *actual,
@@ -210,7 +211,7 @@
     }
 
 #endif
-
+*/
     template <typename T>
     inline bool qCompare(const T *t1, const T *t2, const char *actual, const char *expected,
                         const char *file, int line)
_______________________________________________
maemo-developers mailing list
[email protected]
https://lists.maemo.org/mailman/listinfo/maemo-developers

Reply via email to