Commit Graph

94 Commits

Author SHA1 Message Date
Frederik Gladhorn
c608ec8254 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/corelib/io/qsavefile_p.h
	src/corelib/tools/qregularexpression.cpp
	src/gui/util/qvalidator.cpp
	src/gui/util/qvalidator.h

Change-Id: I58fdf0358bd86e2fad5d9ad0556f3d3f1f535825
2013-01-22 18:40:13 +01:00
Sergio Ahumada
48e0c4df23 Update copyright year in Digia's license headers
Change-Id: Ic804938fc352291d011800d21e549c10acac66fb
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-01-18 09:07:35 +01:00
Thiago Macieira
f927efd77a Add support for Linux eventfd(7) in the UNIX event loop
eventfd(7) uses less resources than a pipe, as it only needs to store a
single 64-bit integer, as opposed to a full buffer.

It was introduced first on Linux version 2.6.22 and glibc 2.7. However,
both the configure-time test and the runtime usage require the use of
EFD_CLOEXEC for thread-safety, so this code will be enabled only for
Linux 2.6.27 and up as well as glibc 2.9 and up.

Change-Id: Ic7e10b28d7b1d4ca24be614ed84055c4429a68e4
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-01-15 03:29:29 +01:00
Kai Koehne
21bd66e1ea Add configure option to minimize xcb runtime dependencies
Some of the xcb- libraries we depend upon are not (yet) common across
distributions. This is problematic for binaries that should be working
on different distributions. The patch mitigates this by:

Adding the files from
  libxcb-proto (version 0.1.6), compiled with libxcb-1.5
  xcb-util (version 0.3.9)
  xcb-util-image (version 0.3.9)
  xcb-util-keysyms (version 0.3.9)
  xcb-util-renderutil (version 0.3.8)
  xcb-util-wm (version 0.3.9)

from xcb.freedesktop.org/dist to src/3rdparty/xcb.

Adding a configure option '-qt-xcb' to use the sources instead of
linking to the respective runtime libraries.

Task-number: QTBUG-27803
Change-Id: I6ea87daa382871b2b9072a601511523fa0b9f44b
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-11-07 16:55:50 +01:00
Samuel Rødal
04f6edc379 Resolve xcb_poll_for_queued_event at run-time.
By not making this a compile time decision we ensure forward
compatibility for older xcb versions if the xcb plugin is built against
a newer xcb.

Change-Id: I744777d53bf7b8deb6eff372494f4403d19d364c
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2012-11-07 08:42:29 +01:00
Samuel Rødal
cdc2161b6f Made xcb plugin work when the GLX extension is not present.
Change-Id: I9285d7524586ff404206c088019ece33335137d9
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-10-19 18:11:06 +02:00
J-P Nurmi
7e3f46fdaa config.tests/glib: remove app_bundle config (mac compatibility)
Task-number: QTBUG-26800
Change-Id: I73cad91062c993898567cf9a267a8f6872ba4d52
Reviewed-by: Jiang Jiang <gzjjgod@gmail.com>
2012-10-09 18:00:25 +02:00
Fabian Bumberger
c86ed49a79 Use slogger2 for logging on Blackberry instead of writing to stderr
Change-Id: Id0137400f18c8dfe7be7ca44670c16615401d424
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Peter Hartmann <phartmann@rim.com>
2012-10-04 14:25:47 +02:00
J-P Nurmi
91ca6cd619 config.tests/fontconfig: remove app_bundle config (mac compatibility)
Change-Id: I77e00ee57f6062de76814f83d947a7e3a7300ebf
Reviewed-by: Jiang Jiang <gzjjgod@gmail.com>
2012-09-28 16:58:14 +02:00
Iikka Eklund
be15856f61 Change copyrights from Nokia to Digia
Change copyrights and license headers from Nokia to Digia

Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2012-09-22 19:20:11 +02:00
Mark Brand
af7a0ee55f config.tests/arch: make distclean on the test, not qt
Additionally, qmake no longer needs -o since we are in the project
directory.

Change-Id: I89dbe829c064663b653e8f747f0849d63ceb367e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-09-14 00:06:41 +02:00
Kai Koehne
f0e2c6fe1c Add c++11 option to configure.exe
Also check for c++11 support in configure.exe (which is also used by MinGW builds).
The c++11 check is therefore moved from 'unix' to 'common' directory.

Change-Id: I082848f032c2770e52e34f331b83820f395c06b6
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Yuchen Deng <loaden@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-13 16:47:27 +02:00
Oswald Buddenhagen
703253d31b in non-verbose mode, suppress qmake output as well
otherwise missing pkg-config requirements, etc. will be visible.

Change-Id: I5a5c0f35cf75e1fcc09ddbc7fcc54cef6bfec8b5
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: J-P Nurmi <j-p.nurmi@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-10 00:27:21 +02:00
Holger Hans Peter Freyther
08e92ba1e0 mips: Autodetect MIPS DSP rev1 and rev2 instructionset
Not every MIPS SoC has the DSP extensions, auto-detect them by using
builtin GCC functions. Check for the DSP macros and add the result
for rev1 and rev2 to the cpufeatures.

Change-Id: I3d6c950f170f102514c43b349f9a23ee796d801a
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-01 15:28:24 +02:00
Sean Harmer
bc80ee36f8 QNX: Enable pre-compiled header support for QNX
Change-Id: I6af69965b19c5d0d7a46de8000433bc5f1f2abcb
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-27 10:52:20 +02:00
Sean Harmer
bf5e3247ae Enable symbol visibility support on QNX
Change-Id: Ie6015f87976cf16e0474dfa66da885ef24738f6c
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-27 10:50:35 +02:00
Oswald Buddenhagen
ca4823505b introduce compileTest function
this cuts down the enormous duplication of identical command line args
passed to compile.test.
this necessitates the addition of a -config parameter to compile.test,
as QMAKE_CONFIG needs to be extended in some cases.

Change-Id: I677b2fea4a407b9e4395e70a25e4e349efb0a946
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-14 12:49:37 +02:00
Danny Boelens
13b1395924 Fix Mac OS X architecture detection for non-default Xcode setup.
The arch.test script is now using SDK settings passed to it.
If you install Xcode without the "UNIX Development" option, this
is essential to let the compiler find standard headers and let
the test program compile successfully.

In addition, let configure pass the SDK settings given on the
command line to the arch.test script.

Change-Id: I49601d3068d83a71e21fdbac287857f2b7abedd1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-07-21 00:53:40 +02:00
Laszlo Agocs
504c2cb1e1 Add config test for kms
Change-Id: I55afc65d356aaca0fe443dda100805a4df8f0ae6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2012-07-18 08:15:30 +02:00
Girish Ramakrishnan
683540ee5a linuxfb: Add config.test and configure support
The code is exactly the same as what is already done for DirectFB.

Change-Id: I3b84e67a3e999f692da4110f3ac9c82d98b0637c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-07-11 14:55:27 +02:00
Robin Burchell
58e997b2d2 android: Fix evdev configure test.
Android doesn't define a number of items in its input.h for MT, so don't test
for them here. They will still work, they just need manual defines.

Change-Id: I471f55b7c7f8950d2048e525119b2b36c8e9743b
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-07-06 00:37:39 +02:00
Girish Ramakrishnan
ea0d58c131 Move DirectFB tests into qpa
Change-Id: I15c90e2e8befef5529b35fa02d3ca6d67a409cc7
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-07-03 01:55:22 +02:00
Bradley T. Hughes
ccf988e510 clang: Do not use libstdc++ when C++11 is enabled
We expect that the C++ library also supports C++11 when the compiler
says it does as well. When using clang with libstdc++, the library has
no C++11 support or headers, so we cannot use, for example, #include
<initializer_lists>.

Change-Id: I844877107256f15ab314e8f82fe54434dbb07638
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-19 00:39:28 +02:00
Thiago Macieira
53546ce0b6 Update listing of when SSSE3 and SSE4.1 first became available
SSSE3 was first available on the original Intel Core 2 processors, so
add the "Merom" codename. SSE4.1 was available on the 45 nm shrink of
those processors, codename "Penryn", not on the next architecture.

Change-Id: I5fd92db62aa409b7f4e46f9b24d960519177f811
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2012-06-12 17:35:06 +02:00
Thiago Macieira
b4525b3407 Add configure-time checking for the SSE and AVX features on Windows
Modify configure.exe to run some configure-time tests and check if
the SSE and AVX compiler features are supported.

The tests themselves required a bit of changes to compile with
MSVC. The include in sse4_2.cpp was wrong. And for whatever reason, it
didn't like the volatile variables, which GCC, Clang and ICC have been
happy with. This should produce no effect in compilation, though: even
dead code must be syntactically correct. We're not running the output.

Change-Id: Ibe5d0904a378a7efed853c7215f88a2ddcefb1b3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-12 17:34:52 +02:00
Thiago Macieira
f5a7d88378 Move the AVX and SSE tests to config.tests/common
This is the first step in supporting these checks on Windows.

Change-Id: I77cfd46bd733161ad2e52c2f76a6354b95ff737d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-12 04:29:44 +02:00
Thiago Macieira
6a51062e99 Move the SSE2/AVX/Neon/etc. flags into the compiler mkspecs
This allows us to have different flags for the compilers for
supporting the same feature. For example, the official flag in GCC to
support AVX2 is -mavx2, but ICC does not support it (yet), requiring
-march=core-avx2 or -xCORE-AVX2. That flag, instead, enables support
for all the features that the "Core-AVX2" processor (codename Haswell)
will support. And clearly, the MSVC flags are different.

Change-Id: I33b6d8617520925e807747180a8dbaafd79b7a9a
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-12 04:29:42 +02:00
Bradley T. Hughes
bf84d1a1fe configure: Auto-detect and enable C++11 support if available
Enabling support for C++11 adds CONFIG+=c++11 to the Qt build. Projects
using Qt can check for C++11 support using contains(QT_CONFIG, c++11) in
their .pr[iof] files.

The QMAKE_CXXFLAGS_CXX11 and QMAKE_LFLAGS_CXX11 qmake varibles contain
any arguments the compiler needs to enable C++11. CONFIG+=c++11 adds
these arguments to the build.

Support for clang, g++, and the Intel C++ Compiler for Linux are
included in this commit.

Change-Id: Id77f86d7ad4d5c740b890446a40b105879a0d327
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-05 12:30:13 +02:00
Donald Carr
00f88bd090 Migrate fontconfig config test to unix scope
Fontconfig has no X11 dependency and is of broader use to us than the X11
context. The test should also disambiguate whether fontconfig support is
successfully detected or not.

This change also removes a false X11 dependency from the freetype test.

Change-Id: I68a596aa06f614a64163772fe29a09edba119a81
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-06-05 06:14:06 +02:00
Donald Carr
698e5b376d Remove all references to X11 session management
There is no session management currently implemented for the xcb QPA
backend. Update the build system to reflect this.

Change-Id: I3486de5741f1fb7e09330ca142b8235a84d3b91d
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-01 03:15:55 +02:00
Donald Carr
dacc3f2852 set OUTDIR for consistency with config.test
We depend on this being set correctly set in device_config.prf

Change-Id: Iee69c5ce35af26f9ecd6edacdd70e13ae4a9aa90
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-06-01 03:15:50 +02:00
Thiago Macieira
735f7e6248 Record the sub-architecture (CPU features enabled in the compiler)
If the system's compiler has extra features on top of the base
settings enabled or if the mkspec or $CXXFLAGS variable included some,
record them.

This will allow us to choose whether or not to use our own special
compilers, based on whether the system default compiler contains it or
not.

Change-Id: I87cada9fab4cfa58846a831d0a7c7b50d8fa87fd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-05-30 17:28:07 +02:00
Thiago Macieira
1533bfc5fc Improve the architecture-detection mechanism
For the Unix part, this now obeys the -v option, printing the full
command-line it used to compile, allowing testers to identify why
something went wrong.

Unfortunately, it requires a full compilation cycle, instead of just
preprocessing. Just one more among the many on Unix, but maybe a
noticeable slow-down on Windows.

Change-Id: I654b70d99887e04c96731a5b91be9ad555e4d8fe
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-05-30 17:27:56 +02:00
Bradley T. Hughes
7a67c822e3 configure: Remove the -dwarf2 argument for Mac OS X builds
Modern versions of Xcode properly support dwarf2, and as such dwarf2 is
always enabled. This change removes the ability to turn it off, making
dwarf2 non-optional.

Change-Id: I149daeae6048ee8a1ed116363572173ad219102e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-05-11 12:52:21 +02:00
Samuel Rødal
f280efc620 Added QScreen::refreshRate() to get the vertical refresh rate.
To give applications that want it the option to use a fixed timestep for
animations, and to avoid having values of 60 hard-coded (we have a
couple of those in qtdeclarative/src/quick already), we need to know the
refresh rates of the screens we are rendering to.

Change-Id: Ife49162e830440ad7eab563a27e8aebbbafc5fc5
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-05-08 22:30:10 +02:00
Thiago Macieira
fcec903da7 Ensure that qXXXdetection.h can be included directly
Those files might have dependency on one another, on qconfig.h and on
early qglobal.h definitions, so ensure that the only correct include
order is that of qglobal.h.

Change-Id: I89098bacaf16353ee8b51604ee885508dc8e201a
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-04-21 11:19:39 +02:00
Thiago Macieira
a0aad0b1b2 Add a functionality test for DirectFB to ensure it compiles.
Some versions of the DirectFB headers are unclean and will cause Qt
compilation failures. So blacklist those versions. Version 1.5.3
(present in Fedora 16) is known to be buggy and gets disabled by this
patch.

The compile error was:
  qurlquery.h:169:5: error: ‘typeof’ was not declared in this scope

(qplatformcursor_qpa.h includes qevent.h which includes qurl.h which
includes that)

The error comes from the Q_FOREACH expansion. Note that Q_FOREACH uses
__typeof__, so it's supposed to be safe, unless someone ill-advised
goes and defines the GCC "safe" macro (double underscores on both
sides) to something else.

Change-Id: Ida41ee3b3c2fcba86a7e12182e7055123166693b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-04-19 11:07:25 +02:00
Oswald Buddenhagen
143c4d3e13 Merge remote-tracking branch 'origin/master' into api_changes
Conflicts:
	configure
	src/widgets/styles/qwindowsxpstyle.cpp
	tests/auto/gui/kernel/qwindow/qwindow.pro
	tests/auto/gui/kernel/qwindow/tst_qwindow.cpp

Change-Id: I624b6d26abce9874c610c04954c1c45bc074bef3
2012-04-10 15:31:45 +02:00
Rafael Roquetto
b0b36cc53c Fix scopes on iconv related pro/pri files
Ensure corelib and the iconv configure test link against libiconv on QNX-based
platforms. This now includes the Blackberry mkspecs which were
previously excluded.

Change-Id: I60677ab8506b7cf47f504b880bb1078036984e85
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-27 21:14:35 +02:00
Kent Hansen
d236fe2214 Merge master into api_changes
Conflicts:
	src/corelib/global/qisenum.h
	src/dbus/qdbusconnection_p.h
	src/widgets/kernel/qwidget.cpp
	tests/auto/other/qaccessibility/tst_qaccessibility.cpp

Change-Id: I85102515d5fec835832cc20ffdc5c1ba578bd01d
2012-03-27 19:22:48 +02:00
Girish Ramakrishnan
84e98fd9d2 device: Add -device and -device-option to configure
For some reference platforms and SDKs we will need to pass in
extra paths. Currently users have to modify the mkspec to adjust
paths or set environment variables that will be picked up.

This change introduces the -device <name> and -device-option
<key=value> option. The key value pairs will be written to a
qdevice.pri and can be used by the qmake.conf of the device spec.

The reason to not save the key value pairs in qconfig.pri is
becase of the fact that the device spec loads the qdevice.pri
earlier than the qconfig.pri. qdevice.pri allows the mkspec
to set the compiler flags and qconfig.pri allows configure to
add to those compiler flags.

Done-with: Holger Freyther

Change-Id: I931a197b8be72397e1eedfee09502eefc01c9d4f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com>
Reviewed-by: Donald Carr <donald.carr@nokia.com>
2012-03-27 05:35:57 +02:00
Thiago Macieira
1882cf1c9d Add detection of AVX and AVX2 support in the compiler.
Intel CC 12.1 supports AVX2 but only with -march=core-avx2. The -mavx2
option produces a warning.

GCC 4.6 does not recognise any option.

GCC 4.7 recognises both -mavx2 and -march=core-avx2 so let's use the
latter for now. We may need to change to -mavx2 when there's an AMD
processor that supports AVX2 too.

Change-Id: I529240e6e6c2c0e3942d357e0320212d954fe4de
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-23 19:43:00 +01:00
Thiago Macieira
a1b30b49ef Remove detection for MMX support and related technology
This also removes the check for SSE, but the check for SSE2 and
further technologies is kept. If SSE2 is present, then SSE is too. We
don't have any code that uses the original SSE instructions only.

Remove the CMOV detection, since we don't use that anywhere and we're
not likely to ever use them..

Change-Id: I3faf2c555ad1c007c52a54644138902f716c1fe1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-23 19:43:00 +01:00
Girish Ramakrishnan
4cc9523a31 Make architecture detection more robust.
Any message/error in mkspecs or qmake feature files ends up confusing
the current arch detection logic. Instead, search for
"Project MESSAGE: .* Architecture: <arch>".

Change-Id: I308932a5b75f3a1fcbc4fe30c74faf2e83b2d752
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-22 20:59:27 +01:00
Thiago Macieira
69bf30596c Fix the bsymbolic_functions test and improve the error reporting
The bsymbolic_functions test was missing $SYSROOT_FLAG, so the linking
was always failing and the test falsely negative.

Also make the error reporting better: if the flag was requested, error
out if the check fails and report more information in -v mode.

Change-Id: Ie2615f8083e7e58d63d9ee9c23be937dc864b30d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-22 18:59:45 +01:00
Donald Carr
b936b95965 EGLFS: Integrate building into configure.
With the move to the QPA architecture EGL is now only required by
individual platform plugins and the configure script has been adjusted to
reflect this.

Change-Id: Ieadacef0b970f29752d9e3e36a007e5cbb005b0d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-03-21 03:03:29 +01:00
Giuseppe D'Angelo
240ef4d9ec Fix stltest compilation
The usage of std:ptrdiff_t in the test requires the #inclusion of
the cstddef header.

Task-number: QTBUG-24828
Change-Id: I7e1ca6ee010469708f8da1709563b5ebced972e5
Reviewed-by: Anssi Eteläniemi
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-03-20 17:30:32 +01:00
Bradley Smith
336f24465a Improves configure checks for XCB.
The XCB plugin requries libxcb >= 1.5. Configure and
config.tests/qpa/xcb now check for this.

Change-Id: I96c688b79bf5b49fd3ecc4ddc12ebdc2d3788790
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-19 20:16:04 +01:00
Holger Hans Peter Freyther
d4959fa637 arch: Undefine possible architecture defines
Some compilers define the architecture to one leading to detecting
'1' as target architecture. Always undef the architecture name.

Compilers:
gcc version 4.6.3 (Debian 4.6.3-1) has '#define i386 1'
gcc version 4.5.3 (Broadcom stbgcc-4.5.3-1.3) has '#define mips 1'

Change-Id: I7af1bb743579be472467c74e6c08638648823ef3
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-03-16 06:12:00 +01:00
Bradley T. Hughes
ba6952b28d Remove -arch argument and #define QT_ARCH from configures
Do not try to detect the host or target architectures using uname or
similar, and do not override with the -arch or -host-arch configure
arguments. The configures will still accept the -arch and -host-arch
arguments, but it ignores them and instead outputs a warning stating
that these arguments are obsolete and should not be used.

Set QT_ARCH and QT_HOST_ARCH qconfig.pri variables based on the compiler
target. This is done by running qmake (twice when cross-compiling) on
config.tests/arch/arch.pro, which preprocesses a file that contains all
knowns processors.

On Windows, configure.exe has never run any config.tests before, and
does not currently have a function to run a program and capture its
output. Use _popen() to accomplish this (as qmake does for its system()
function). This needs to be done after qmake is built, as does the
mkspecs/qconfig.pri generation. As a side effect, the configure steps
have been slightly re-ordered, but the overall result is the same. The
displayConfig() call is moved to just before generating Makefiles, so
that it can show the detected architecture(s).

Change-Id: I77666c77a93b48848f87648d08e79a42f721683f
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-13 12:27:44 +01:00