From f6c61d13a3e166fc9280e8bfe8325cead335d0da Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 17 Nov 2011 09:18:05 +0100 Subject: Windows: Adapt mkspec for MinGW / gcc 4.6. gcc 4.6 becomes the minimum required version in Qt 5. See also d4150975af620e2889cc58bd476bac6b4d101db3 in Qt 4.8. Change-Id: If66ce0be755263c20b0a4371523c6590592d962d Reviewed-by: Oswald Buddenhagen Reviewed-by: Marius Storm-Olsen --- mkspecs/win32-g++/qmake.conf | 4 ++-- qmake/Makefile.win32-g++ | 2 +- qmake/Makefile.win32-g++-sh | 2 +- src/corelib/tools/qlocale_tools.cpp | 7 +++++++ 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/mkspecs/win32-g++/qmake.conf b/mkspecs/win32-g++/qmake.conf index 220af32c54..c1f0ac3307 100644 --- a/mkspecs/win32-g++/qmake.conf +++ b/mkspecs/win32-g++/qmake.conf @@ -1,7 +1,7 @@ # # qmake configuration for win32-g++ # -# Written for MinGW +# Written for MinGW / gcc 4.6 or higher # MAKEFILE_GENERATOR = MINGW @@ -19,7 +19,7 @@ QMAKE_LEX = flex QMAKE_LEXFLAGS = QMAKE_YACC = byacc QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = +QMAKE_CFLAGS = -fno-keep-inline-dllexport QMAKE_CFLAGS_DEPS = -M QMAKE_CFLAGS_WARN_ON = -Wall QMAKE_CFLAGS_WARN_OFF = -w diff --git a/qmake/Makefile.win32-g++ b/qmake/Makefile.win32-g++ index a2f20b6141..28dbe1cc55 100644 --- a/qmake/Makefile.win32-g++ +++ b/qmake/Makefile.win32-g++ @@ -27,7 +27,7 @@ CFLAGS = -c -o$@ -O \ -DQT_BUILD_QMAKE -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM \ -DQT_BOOTSTRAPPED CXXFLAGS = $(CFLAGS) -LFLAGS = -static-libgcc -static-libstdc++ -s +LFLAGS = -static-libgcc -s LIBS = -lole32 -luuid -ladvapi32 -lkernel32 LINKQMAKE = g++ $(LFLAGS) -o qmake.exe $(OBJS) $(QTOBJS) $(LIBS) ADDCLEAN = diff --git a/qmake/Makefile.win32-g++-sh b/qmake/Makefile.win32-g++-sh index 4b5c3d02e0..f68e3bf46d 100644 --- a/qmake/Makefile.win32-g++-sh +++ b/qmake/Makefile.win32-g++-sh @@ -27,7 +27,7 @@ CFLAGS = -c -o$@ -O \ -DQT_BUILD_QMAKE -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM \ -DQT_BOOTSTRAPPED CXXFLAGS = $(CFLAGS) -LFLAGS = -static-libgcc -static-libstdc++ -s +LFLAGS = -static-libgcc -s LIBS = -lole32 -luuid -ladvapi32 -lkernel32 LINKQMAKE = g++ $(LFLAGS) -o qmake.exe $(OBJS) $(QTOBJS) $(LIBS) ADDCLEAN = diff --git a/src/corelib/tools/qlocale_tools.cpp b/src/corelib/tools/qlocale_tools.cpp index df31bf97c8..750379c014 100644 --- a/src/corelib/tools/qlocale_tools.cpp +++ b/src/corelib/tools/qlocale_tools.cpp @@ -2253,6 +2253,13 @@ static int quorem(Bigint *b, Bigint *S) * calculation. */ +#if defined(Q_OS_WIN) && defined (Q_CC_GNU) && !defined(_clear87) // See QTBUG-7576 +extern "C" { +__attribute__ ((dllimport)) unsigned int __cdecl __MINGW_NOTHROW _control87 (unsigned int unNew, unsigned int unMask); +__attribute__ ((dllimport)) unsigned int __cdecl __MINGW_NOTHROW _clearfp (void); /* Clear the FPU status word */ +} +# define _clear87 _clearfp +#endif /* This actually sometimes returns a pointer to a string literal cast to a char*. Do NOT try to modify the return value. */ -- cgit v1.2.3