Commit Graph

65 Commits

Author SHA1 Message Date
Dmitry Shachnev
f133b226cd qmake: Stop using -isystem flag
This option changes the order of include paths, which can cause problems
of various kinds. See https://bugs.debian.org/958479 for an example.

The benefit of that option is minimal for what it was intended.

Pick-to: 5.15 5.12
Change-Id: I80eeabd09764df290b60bc59aeb2f90d07723608
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-06-06 09:53:59 +00:00
Alexander Shevchenko
305f57411d centralize ICC flags for *nix-systems toolchains
linux-icc and macx-icc toolchains contain a significant amount of code
which can be merged to a common configuration file.

as a side effect, such merge resulted in reduction a parts of
linux-icc and macx-icc toolchains to the common view.

Change-Id: I37d110734eeeb9bd61ca0aa942de380ac8e75f1c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-06-22 17:04:06 +00:00
Mikhail Svetkin
194a404490 Make the use of -fdata-sections and --gc-sections more generic in Qt
Add qmake feature and configure option, which optimze the size of static
exectuable. Use for static build.
Enabled via configure --gc-binaries, or CONFIG += gc-binaries in 3rd party
projects.

Change-Id: I3c25b02caaef6a4afc6019afc9c67122dd11696d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-04-27 06:47:35 +00:00
Liang Qi
112a4af107 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	examples/examples.pro
	qmake/library/qmakebuiltins.cpp
	src/corelib/global/qglobal.cpp
		Re-apply b525ec2 to qrandom.cpp(code movement in 030782e)
	src/corelib/global/qnamespace.qdoc
	src/corelib/global/qrandom.cpp
	src/gui/kernel/qwindow.cpp
		Re-apply a3d59c7 to QWindowPrivate::setVisible() (code movement in d7a9e08)
	src/network/ssl/qsslkey_openssl.cpp
	src/plugins/platforms/android/androidjniinput.cpp
	src/plugins/platforms/xcb/qxcbconnection.cpp
	src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
	src/widgets/widgets/qmenu.cpp
	tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp

Change-Id: If7ab427804408877a93cbe02079fca58e568bfd3
2017-08-31 14:31:31 +02:00
Joerg Bornemann
ea168ead1a Remove unused mkspecs variable QMAKE_LIBS_NIS
Change-Id: I09a161fe4706c19eba4ff54cdb03a10edc34871a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-08-28 13:10:44 +00:00
Thiago Macieira
dfdc466dc1 Add proper detection of x86 RDRAND instruction
The instruction is "RDRAND", but the feature name, according to GCC, is
RDRND, so I had to change some macros in qsimd_p.h.

Change-Id: Icd0e0d4b27cb4e5eb892fffd14b5166779137e63
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-06-12 06:14:48 +00:00
Liang Qi
d1ea481345 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/network/access/qnetworkreply.cpp
	tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp

Change-Id: Iadf766269454087e69fb216fc3857d85b0ddfaad
2017-05-07 13:08:18 +02:00
Allan Sandfeld Jensen
dd03817ab6 Add configure flag to optimize Qt for size
Adds default off configure flag to use compiler optimizations
for size instead of the default speed/size trade-off.

Change-Id: I36702064ef2cc743d2d03a386adf5cefd5371b6e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-04-29 08:02:19 +00:00
Liang Qi
5d6073be27 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	mkspecs/linux-icc/qmake.conf
	mkspecs/macx-icc/qmake.conf
	mkspecs/win32-icc/qmake.conf
	src/gui/painting/qgrayraster.c

Change-Id: Ib08c45ea3215be05f986ecb3e1f4b37d209aa775
2017-04-07 10:24:33 +02:00
Thiago Macieira
280e321e52 Fix detection of F16C for the Intel compiler (again) and Visual Studio
Neither the Intel compiler nor Visual C++ have a dedicated switch to
enable F16C support, like GCC and Clang do. So we used the AVX switch
for that in commit 8241d51f70, as it was
the closest, lowest denominator. That was incorrect and insufficient.

The Intel compiler silently miscompiles the intrinsics with -xAVX,
making calls to out-of-line functions like _mm_cvtps_ph, which don't
exist. So we actually have to use AVX2 support to generate correct code.
That might be a problem later, since Ivy Bridge supports F16C but not
AVX2.

Visual C++ is able to generate F16C code with just -arch:AVX.

Either way, since there's no dedicated command-line switch, there's also
no dedicated preprocessor macro. We're using __AVX2__ for both
compilers, as that's a sufficient condition to indicate a processor that
supports F16C.

Change-Id: I27b55fdf514247549455fffd14b205b8d8b86da7
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2017-04-06 04:15:07 +00:00
Thiago Macieira
8241d51f70 x86: Detect F16C with the Intel compiler too
The .pro file requires the QMAKE_CFLAGS_F16C to be set to something. So
set it to AVX, as the instructions require the VEX prefix anyway (ICC
has no dedicated option for just F16C).

Change-Id: I27b55fdf514247549455fffd14b171940afd35a2
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2017-04-02 17:40:27 +00:00
Liang Qi
71264bae08 Merge remote-tracking branch 'origin/5.9' into dev
Change-Id: I84097f8e7b3b2128028bd7693c913d6968b82bfe
2017-03-02 09:04:38 +01:00
Thiago Macieira
0f1b6acab7 x86: Add detection of the AES and SHA New Instructions
The AES instructions were first introduced with the Westmere shrink
(22nm) of the Nehalem architecture. The SHA instructions are still
pending on Intel architecture, but is available on AMD family 17h (gcc
argument -march=znver1).

Both features operate on SSE registers, so that's why the MSVC command-
line argument is the SSE2 one and the configure-time tests depend on
features.sse2.

The qmake feature names end in "ni" because "aes" and "sha" are too
simple and could clash with other uses. The QT_COMPILER_SUPPORTS_ macro
doesn't have the "NI" suffix because it has to match the GCC/Clang
predefined macro.

Change-Id: I445bb15619f6401494e8fffd149dbd1f862ff51c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2017-02-21 23:48:30 +00:00
Thiago Macieira
53139a8c0a Remove alias options from linux-icc/qmake.conf
They are the default with icc.

Change-Id: Ibc5c715fda334a75bd2efffd14a478c20b527d7c
Reviewed-by: Robert Pancoast <RobertPancoast77@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-02-21 23:41:39 +00:00
Thiago Macieira
b7247ac945 linux-icc: Remove -falign-functions=16
There's no reason to have that. Let the compiler decide whether it wants
to align or not. Current versions seem not to want to align beyond
multiple of 2.

Change-Id: Iab7c358838e1487387a2fffd149d73e0a218d3c2
Reviewed-by: Dominik Haumann <dhaumann@kde.org>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-01-31 19:55:07 +00:00
Thiago Macieira
51dafeda8c linux-icc: always compile applications as position-independent execs
The problem isn't the compiler, but the linker, so we ought to turn this
flag on for all ELF-based systems where we compile Qt with -Bsymbolic,
but so far only the Intel compiler has been affected. We can turn it on
as needed for other systems.

The cause of the problem is the way that ICC materializes the pointer-
to-member-function: it stores the full 2*sizeof(void*) data in an
anonymous variable, so that it can load it in one go, such as one 16-
byte SSE aligned load on 64-bit systems. That relocation in a data
variable gets turned into a fixed-position copy relocation by the
linker, which breaks the signal-identification mechanism.

GCC and Clang are likely to be affected if anyone did:

    static const auto destroyed = &QObject::destroyed;
    QObject::connect(obj, destroyed, [](){});

Task-number: QTBUG-52439
Change-Id: I0d69eaf61af149db9574fffd149d0cfb08459c33
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-01-26 07:42:45 +00:00
Thiago Macieira
3695c2ee11 Disable ICC warning 3373
This warning does not make sense. it seems to trigger when in code like
the following in template functions:

    auto x = 1, y = 2;

3373: nonstandard use of "auto" to both deduce the type from an
initializer and to announce a trailing return type

Other reports on the Internet indicate that no one understands what
triggers this warning and have just worked around it. Additionally, the
same warning exists on other compilers with the same text, so it's
likely come from the EDG front-end. This has been reported to Intel.

Change-Id: I73fa1e59a4844c43a109fffd148d45065ab69eff
Intel-Issue-ID: 6000164202
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-12-07 13:21:01 +00:00
Jani Heikkinen
1a88b2f768 Updated license headers
From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see
http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/

Updated license headers to use new LGPL header instead of LGPL21 one
(in those files which will be under LGPL v3)

Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-01-15 12:25:24 +00:00
Thiago Macieira
f430521392 Update mkspecs to use "c++11" instead of "c++0x"
We no longer support any compilers that don't know the actual version
number of the standard.

Change-Id: Ib056b47dde3341ef9a52ffff13ef154791dd0d22
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-10-18 04:46:45 +00:00
Thiago Macieira
a587ad1e50 configure: Add support for detecting AVX512 instructions
Tested on Linux with Clang 3.7, GCC 4.9, 5.1 and 6.0, ICC 16 beta; on OS
X with Clang-XCode 6.4, ICC 16 beta; on Windows with MSVC 2013 and ICC
15. MinGW is not tested.

GCC 4.9:     AVX512F AVX512ER AVX512CD AVX512PF
GCC 5 & 6:   AVX512F AVX512ER AVX512CD AVX512PF AVX512DQ AVX512BW AVX512VL AVX512IFMA AVX512VBMI
Clang 3.7:   AVX512F AVX512ER AVX512CD
Clang-XCode: <none>
ICC 15 & 16: AVX512F AVX512ER AVX512CD AVX512PF AVX512DQ AVX512BW AVX512VL
MSVC 2013:   <none>

Change-Id: Ib306f8f647014b399b87ffff13f1da1b161c31d7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-09-25 20:29:22 +00:00
Thiago Macieira
2978caa2ed ICC: Remove the -fno-jump-tables workaround.
I added this sometime in the past to work around some ICC bug in
position-independent code. Modern versions don't have the bug.

Change-Id: I42e7ef1a481840699a8dffff140049ce927cdff2
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-09-21 16:39:51 +00:00
Thiago Macieira
ba214ce5a9 ICC: Update LTCG-related options
See https://software.intel.com/node/522852. There are options to turn
off LTCG and, on Linux, to enable/disable fat objects.

Change-Id: I42e7ef1a481840699a8dffff14003db5a9c95b83
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-09-21 16:39:49 +00:00
Thiago Macieira
72ba0079c3 Add a linker version script to Qt libraries
This linker script is only enabled for systems with GCC or GCC-like
compilers, though technically it should work on the BSDs too (will
enable after testing). For regular modules, this declares one ELF
version "Qt_5" and places all QtCore symbols inside, then it declares
unused ELF versions "Qt_5.x" for each older minor release. For modules
declared "internal_module", all symbols are placed in version
Qt_5_PRIVATE_API.

The big advantage of an ELF version is that, when we do Qt 6, both
versions of QtCore could be loaded in memory without conflicts and all
symbols would be resolved to the correct library. No module can talk to
both at the same time, but this avoids mistakes of loading them
indirectly by plugins.

The extra Qt_5.x versions will be used in the next commit.

Change-Id: I049a653beeb5454c9539ffff13e3fe6f050fdf31
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-09-13 18:54:17 +00:00
Thiago Macieira
4684c1afe5 Add detection of C++14 and C++1z compiler features
[ChangeLog][General Improvements] Qt's buildsystem now detects whether
the compiler supports C++14 and experimental support for C++1z. If the
compiler supports it, then Qt is automatically compiled using that
support.
\
This does not apply to user applications built using qmake: those are
still built with C++11 support only. To enable support for C++14 in your
application, add to your .pro file: CONFIG += c++14 (similarly for
C++1z).

Change-Id: Ib056b47dde3341ef9a52ffff13ef1f5d01c42596
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-09-05 23:05:40 +00:00
Thiago Macieira
ff44440651 Make CONFIG += c++11 by default not disable GNU extensions
Prefer -std=gnu++11 unless strict_c++11 is defined. You can enable
strict C++11/C++14 mode by using
   CONFIG += strict_c++

That is enabled for Qt's own code, so we we don't accidentally use GNU
extensions in portable code.

There's no support for strict C++98 mode (that is, the -ansi option).

[ChangeLog][qmake] By default, GNU extensions are now enabled with
Clang, GCC and ICC even in C++11 and C++14 modes. To disable the GNU
extensions, add to your .pro file: CONFIG += strict_c++.

Change-Id: Ib056b47dde3341ef9a52ffff13ef14de2169bef5
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-07-17 17:36:27 +00:00
Allan Sandfeld Jensen
1fce111809 Merge remote-tracking branch 'origin/5.4' into merge5.5
Conflicts:
	src/corelib/global/qglobal.h
	src/corelib/io/qnoncontiguousbytedevice_p.h
	src/gui/image/qjpeghandler.cpp
	src/network/access/qhttpthreaddelegate_p.h
	tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp
	tests/auto/widgets/widgets/qmenubar/BLACKLIST

Change-Id: I01de8c1c28efcedfd7953d05025f54802dc08ab3
2015-05-08 13:26:44 +02:00
Thiago Macieira
36d6eb721e Require -fPIC instead of just -fPIE for -reduce-relocations
GCC 5 combined with a recent binutils have a new optimization that
allows them to generate copy relocations even in -fPIE code. Clang has
the same functionality when compiling an executable with -flto. We need
to let the compilers know that they cannot use copy relocations, so they
need to use really position-independent code.

Position independent code throughout is not really required. We just
need the compilers to use position-independent access to symbols coming
from the Qt libraries, but there's currently no other way of doing that.

Task-number: QTBUG-45755
Change-Id: I0d4913955e3745b69672ffff13db5df7377398c5
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-05-07 19:42:43 +00:00
Jani Heikkinen
83a5694dc2 Update copyright headers
Qt copyrights are now in The Qt Company, so we could update the source
code headers accordingly. In the same go we should also fix the links to
point to qt.io.

Outdated header.LGPL removed (use header.LGPL21 instead)

Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing
combination. New header.LGPL-COMM taken in the use file which were
using old header.LGPL3 (src/plugins/platforms/android/extract.cpp)

Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license
combination

Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe
Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
2015-02-11 06:49:51 +00:00
Matti Paaso
974c210835 Update license headers and add new license files
- Renamed LICENSE.LGPL to LICENSE.LGPLv21
- Added LICENSE.LGPLv3
- Removed LICENSE.GPL

Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2
Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
2014-09-24 12:26:19 +02:00
Thiago Macieira
1bd27f24fb Add link-time optimization support for Clang, GCC and ICC
GCC currently requires fat object files for static libraries, since the
linker would otherwise not load the .o file from the archive at all and
the linking would fail with a lot of undefined references. Clang on
Linux also needs this, but it has no equivalent flag, so enabling LTCG
for Clang on static libraries will result in linker error.

This commit does not add support for enabling it in configure. It can be
enabled on a per-project basis by doing CONFIG += ltcg or by passing
-config ltcg to qmake's command-line.

Change-Id: I52cf99f1ed9f1701e23a3b457ba3502fd28126ce
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-07-23 11:12:02 +02:00
Thiago Macieira
199b2594ff Make the use of -ffunction-sections more generic in Qt
Move it from bootstrap.pro into qt_module.prf so it will apply to any
other bootstrapped libraries, like libQmlDevTools.

Variable called "SPLIT_SECTIONS" because -fdata-sections could be added
in the future, if it proves to be a benefit.

Change-Id: I3fbb004f111620a84e58e9112e9bce3afd95631e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-05-19 19:33:15 +02:00
Frederik Gladhorn
dbafabb019 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/corelib/global/qglobal.h

Change-Id: I03d8b6e07135056baaa1d97c3c63fbe8b25583d9
2014-02-17 11:39:16 +01:00
hjk
9de2853a94 Remove automated generation of dwarf index
The index is only helpful if the version of GDB to
create it uses the same version as the GDB version
that consumes it. Outside the "local development"
scenario this happens only by conincidence, still
we add ~3.6% to the debug library size and face
maintenance issues like QTBUG-34950.

We also don't see the same performance benefit anymore
with recent versions as we did when the feature was
added, so it's best to not create the index anymore.

People who need it, still can add it manually, or
by the 'gdb-add-index' tool that comes with recent
versions of GDB, or trust their distributors to
set up indexes matching their runtime environment.

Task-number: QTBUG-34950
Change-Id: Id4c79fa51fea9622b0891bd9b9b395b948ecb157
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-02-16 15:41:30 +01:00
Frederik Gladhorn
a9c88c1f39 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/gui/image/qimage.cpp
	src/gui/text/qtextengine.cpp
	src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp
	src/printsupport/kernel/qprintengine_win.cpp

Change-Id: I09ce991a57f39bc7b1ad6978d0e0d858df0cd444
2014-02-12 16:28:07 +01:00
Thiago Macieira
8e22d71b22 Disable disabling exceptions with ICC
There's a bug found in ICC 14.0 that causes the compiler to assert when
compiling QtDeclarative. Let's leave this here until at least one year
after the fix is released.

Intel task: DPD200253124
Task-number: QTBUG-36577
Change-Id: I76d4b41da7e60397dac65862a3a6ec024b840744
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-02-12 01:41:39 +01:00
Thiago Macieira
0b144bc76a Add support for using -isystem in qmake
This commit will make qmake use -isystem automatically for any
compilers that declare support for it for any paths that are listed in
QMAKE_DEFAULT_INCDIRS.

Change-Id: I36fefc6d5bba61671f65669f0ea42704b3c3cf31
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-01-20 02:42:31 +01:00
Thiago Macieira
d2580054f9 Update the ICC spec on Linux to actually compile stuff
I had the -fPIE option in my personalised "linux-icc-optimised" spec,
so I never noticed it was missing in the standard one.

I have no idea when -rpath-link is necessary. It isn't for me.

Task-number: QTBUG-34425
Change-Id: I54b2fb8cda10b9197d81b5630b1d29b8c338d96a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-10-30 19:02:01 +01:00
Thiago Macieira
e8853506bf Add support for disabling exceptions with ICC
Change-Id: Id1ea1bda14a20e44af1eb9f53bae877a3b9fd2e4
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-10-17 09:50:58 +02:00
Thiago Macieira
bad6f54c0b Update ICC warnings disabled by default.
Warnings 654 and 411 appear to have disappeared by ICC 14.

Change-Id: Ic200f239a4a4377015d13b2f4ae85595ce864ace
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-09-14 03:20:25 +02:00
Thiago Macieira
bea3ae7669 Add QMAKE_NM to the mkspecs
We'll use nm to get the listing of symbols in the next commit.

The -P option is "portable", which sounds like a good idea. I don't
have access to any of the commercial Unix systems, but I do remember
them printing a different format than GNU binutils's nm.

Change-Id: If6f80624bedaf2b1dabf608e16aa097d9910d739
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-06-10 16:46:06 +02:00
Axel Waggershauser
5fcf441392 Fix '=' alignment and replace tabs in *.conf (whitespace only change)
Replace all tabs with proper space characters and consistently align
the '=' characters. The default alignment for the '=' of 25 characters
has been left as is to get a minimal diff. Lines with the '=' further
to the right and those belonging to 'proper code (TM)' have not been
touched.

The work was mostly done using the following python script (might
come in handy again...):

import sys, re
indent_eq = 25 + 0*4 # 25 characters was the most widely used indentation for the '=' character
p = re.compile(r'(\w+)[ \t]*([\-\+]?)(=$|= )[ \t]*(.*$)')

for fn in sys.argv[1:]:
    with open(fn, 'r+') as f:
        lines = []
        nl_count = 0
        continuity_indent = None
        for l in f:
            m = p.match(l)
            nl = l
            if m:
                n_spaces = max(m.start(3), indent_eq - 1) - len(m.group(2)) - len(m.group(1))
                if m.group(2) and m.start(2) >= indent_eq-1 and m.start(2) % 4 == 0:
                    n_spaces -= 1 # left-shift '+=' by one if the '+' is aligned to a multiple of 4
                n_spaces = max(1, n_spaces) # we want at least one space before '='/'+='
                nl = m.group(1) + ' '*n_spaces + ''.join(m.group(2,3,4)) + '\n'
                continuity_indent = nl.find('= ') + 2 if l[-2] == '\\' else None # remember indent on '\\$'
            elif continuity_indent:
                nl = ' '*continuity_indent + l.lstrip()
                if l[-2] != '\\': # check when to stop the continuation
                    continuity_indent = None
            elif l.startswith('#'):
                nl = l.expandtabs(2)
            if l != nl:
                nl_count += 1
            lines.append(nl)
        if nl_count > 0:
            print fn, nl_count, len(lines)
            f.seek(0)
            f.writelines(lines)
            f.truncate()

Change-Id: I1d2870d0a2fe2e30d398c140fe523e69dd20c81b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-27 17:16:37 +01:00
Axel Waggershauser
b11317a643 Whitespace cleanup: remove trailing whitespace
Remove all trailing whitespace from the following list of files:
*.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README
excluding 3rdparty, test-data and auto generated code.

Note A): the only non 3rdparty c++-files that still
have trailing whitespace after this change are:
* src/corelib/codecs/cp949codetbl_p.h
* src/corelib/codecs/qjpunicode.cpp
* src/corelib/codecs/qbig5codec.cpp
* src/corelib/xml/qxmlstream_p.h
* src/tools/qdoc/qmlparser/qqmljsgrammar.cpp
* src/tools/uic/ui4.cpp
* tests/auto/other/qtokenautomaton/tokenizers/*
* tests/benchmarks/corelib/tools/qstring/data.cpp
* util/lexgen/tokenizer.cpp

Note B): in about 30 files some overlapping 'leading tab' and
'TAB character in non-leading whitespace' issues have been fixed
to make the sanity bot happy. Plus some general ws-fixes here
and there as asked for during review.

Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-16 20:22:50 +01:00
Oswald Buddenhagen
172b381307 purge QMAKE_LIBS_OPENGL_QT
it differed from QMAKE_LIBS_OPENGL only for the irix/sco/unixware -cc
specs for not entirely obvious reasons. as all these specs are obsolete,
remove it.

Change-Id: I7d50ffa11ff830371ea52c9ebe25e1f1bc56b307
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-13 19:42:39 +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
76874dea44 Remove the -falign-stack option from ICC's mkspec.
This option was necessary in early ICC 12 releases because of a
difference in interpreting the ABI requirements with GCC. According to
ICC devs, GCC changed the ABI on its own to require 16-byte-aligned
stacks on i386.

It looks like this option has been the default in later ICC 12
releases. At least 12.1 update 5 has it by default. ICC 13 does not
have the option anymore but accepts it silently for backwards
compatibility.

Change-Id: Id8bb4c250718eef2f02dc97bd47a0efd95b272fc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-10-13 05:51:19 +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
Oswald Buddenhagen
fff5a8f9c9 make qmakespecs announce the compiler family
on the way to eliminate scoping based on the spec.

gcc and msvc go as such into CONFIG, the other ones get the vendor
prefixed, as most are mostly unknown and thus likely to clash with
users' flags.

Change-Id: Ie622f53d90e96dbf05ce7d8c638cd355f04fa20c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-09-21 02:44:22 +02:00
Oswald Buddenhagen
6a3a234742 centralize initialization of CONFIG in mkspecs
"CONFIG += qt warn_on release link_prl" is in every single spec (though
for link_prl there is one genuine exception and two apparent omissions).

Change-Id: I72e1e315586af828eefa3b0b70998ab892ec3c1a
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-09-08 13:36:20 +02:00
Oswald Buddenhagen
809bc47fad centralize initialization of QT in specs
there is no reason whatsoever to duplicate this so many times, and even
less reason to have specs with a deviating default.

Change-Id: Ia25836c079580adebc373697b8bd03598f79c69b
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-09-08 13:36:16 +02:00
Oswald Buddenhagen
cd9599792e remove useless TEMPLATE assignments from specs
"app" is the built-in default anyway

Change-Id: I4f581ee5b81aee08860dbdda5d863943bceafb1b
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-09-08 13:36:12 +02:00