summaryrefslogtreecommitdiffstats
path: root/Tools/qmake/mkspecs/features/unix/default_post.prf
blob: 2df72d90978613c5c6fb49433f084b574502f50b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# -------------------------------------------------------------------
# Unix specific defaults
#
# See 'Tools/qmake/README' for an overview of the build system
# -------------------------------------------------------------------

# Use SSE2 floating point math on 32 bit instead of the default
# 387 to make layout test results same on 32 and on 64 bit builds.
# See https://bugs.webkit.org/show_bug.cgi?id=52810#c39 for details.
linux-g++*:isEqual(QT_ARCH,i386) {
    !production_build {
        QMAKE_CFLAGS += -march=pentium4 -msse2 -mfpmath=sse
        QMAKE_CXXFLAGS += -march=pentium4 -msse2 -mfpmath=sse
    }

    # Use the stabs format for 32 bit debug builds to make the object files a bit smaller.
    QMAKE_CXXFLAGS_DEBUG -= -g
    QMAKE_CXXFLAGS_DEBUG += -gstabs
}

linux-*g++* {
    !production_build {
        # Treat warnings as errors on x86/Linux/GCC
        isEqual(QT_ARCH,x86_64)|isEqual(QT_ARCH,i386): QMAKE_CXXFLAGS += -Werror
    }
}

*-g++* {
    greaterThan(QT_GCC_MAJOR_VERSION, 3):greaterThan(QT_GCC_MINOR_VERSION, 5) {
        !contains(QMAKE_CXXFLAGS, -std=(c|gnu)\\+\\+(0x|11)) {
            # We need to deactivate those warnings because some names conflicts with upcoming c++0x types (e.g.nullptr).
            QMAKE_CXXFLAGS_WARN_ON += -Wno-c++0x-compat
            QMAKE_CXXFLAGS += -Wno-c++0x-compat
        }
    }
}

# Don't warn about OVERRIDE and FINAL, since they are feature-checked anyways
*clang:!contains(QMAKE_CXXFLAGS, -std=c++11) {
    QMAKE_CXXFLAGS += -Wno-c++11-extensions -Wno-c++0x-extensions
    QMAKE_OBJECTIVE_CFLAGS += -Wno-c++11-extensions -Wno-c++0x-extensions
}

contains(TEMPLATE, app): CONFIG += rpath

isEqual(QT_ARCH,i386):CONFIG(debug, debug|release) {
  # Make ld not cache the symbol tables of input files in memory to avoid memory exhaustion during the linking phase.
  config_gnuld: QMAKE_LFLAGS += -Wl,--no-keep-memory
}

load(default_post)