mingw-cross-env-list
[Top][All Lists]
Advanced

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

Re: [Mingw-cross-env-list] Qt 4.7 (help wanted)


From: Mark Brand
Subject: Re: [Mingw-cross-env-list] Qt 4.7 (help wanted)
Date: Wed, 02 Jun 2010 12:12:21 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.4) Gecko/20100527 SUSE/3.1rc1-3.1 Thunderbird/3.1


How can we influence that search order? Is it possible to pass
some corresponding ./configure options to GCC in src/gcc.mk?

How did the Qt people do that? Did they patch GCC to get that
behaviour? Does the GCC contain some special handling in the
paths when it is built for mingw? If so, why don't _we_ trigger
that special handling, too?


This problem has been driving me crazy, and I'm not the only one it seems. I'm sure I don't understand all the issues, but here is a quick summary:

-We are in good company. There are many reports in various places about this.
-The mingw32 cross RPMs from opensuse have the same "problem" with float.h.
-Undefined symbols _clear87 and _control87 are commons symptoms of this problem, especially when building Qt.
-No standard solution as far as I can tell.
-I still don't understand how Qt managed to build GCC 4.4 with the mingw include directory first. -I spent too much time trying without success to build GCC 4.5 with the mingw include directory first. ): -It's probably correct to have the gcc include directory *before* the mingw include directory anyway.

The least offensive solution I come up with is to move the "#include_next" to the other float.h as in the diff below. How does that strike you?


regards,
Mark


diff -r cd3ff105f48e src/gcc.mk
--- a/src/gcc.mk        Mon May 31 16:37:35 2010 +0200
+++ b/src/gcc.mk        Wed Jun 02 11:55:15 2010 +0200
@@ -49,6 +49,8 @@
     $(MAKE) -C '$(1)/build' -j '$(JOBS)'
     $(MAKE) -C '$(1)/build' -j 1 install

+ echo "#include_next<float.h>" >> '$(PREFIX)/lib/gcc/$(TARGET)/4.5.0/include/float.h'
+
     # create pkg-config script
     (echo '#!/bin/sh'; \
echo 'PKG_CONFIG_PATH= PKG_CONFIG_LIBDIR='\''$(PREFIX)/$(TARGET)/lib/pkgconfig'\'' exec pkg-config --static "$$@"') \
diff -r cd3ff105f48e src/mingwrt.mk
--- a/src/mingwrt.mk    Mon May 31 16:37:35 2010 +0200
+++ b/src/mingwrt.mk    Wed Jun 02 11:55:15 2010 +0200
@@ -22,4 +22,5 @@
     $(INSTALL) -d '$(PREFIX)/$(TARGET)'
     cd '$(1)' && \
         cp -rpv include lib '$(PREFIX)/$(TARGET)'
+ '$(SED)' -i 's,#include_next<float.h>,/*#include_next<float.h>*/,g;' '$(PREFIX)/$(TARGET)/include/float.h'
 endef
diff -r cd3ff105f48e src/qt-1-win32.patch
--- a/src/qt-1-win32.patch      Mon May 31 16:37:35 2010 +0200
+++ b/src/qt-1-win32.patch      Wed Jun 02 11:55:15 2010 +0200
@@ -385,7 +385,7 @@
 +QMAKE_LEXFLAGS                =
 +QMAKE_YACC            = byacc
 +QMAKE_YACCFLAGS               = -d
-+QMAKE_CFLAGS          = -pipe -isystem /usr/i686-pc-mingw32/include
++QMAKE_CFLAGS          = -pipe
 +QMAKE_CFLAGS_DEPS     = -M
 +QMAKE_CFLAGS_WARN_ON  = -Wall
 +QMAKE_CFLAGS_WARN_OFF = -w



reply via email to

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