MinGW: reuse gcc-base.conf and g++-base.conf
it allows using optimize_full, ltcg and sanitizers Change-Id: I3ccf8257145c7d8800c2ebe98c5ac5adcec0dc9d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
parent
4499667799
commit
39fc377bf1
@ -8,6 +8,8 @@
|
||||
# you can use the manual test in tests/manual/mkspecs.
|
||||
#
|
||||
|
||||
QMAKE_CFLAGS_PIC = -fPIC
|
||||
|
||||
include(gcc-base.conf)
|
||||
|
||||
QMAKE_COMPILER_DEFINES += __APPLE__ __GNUC__=4 __APPLE_CC__
|
||||
|
@ -8,6 +8,8 @@
|
||||
# you can use the manual test in tests/manual/mkspecs.
|
||||
#
|
||||
|
||||
QMAKE_CFLAGS_PIC = -fPIC
|
||||
|
||||
include(gcc-base.conf)
|
||||
|
||||
QMAKE_LFLAGS_SHLIB += -shared
|
||||
|
@ -41,9 +41,9 @@ QMAKE_CFLAGS_WARN_OFF += -w
|
||||
QMAKE_CFLAGS_RELEASE += $$QMAKE_CFLAGS_OPTIMIZE
|
||||
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_OPTIMIZE -g
|
||||
QMAKE_CFLAGS_DEBUG += -g
|
||||
QMAKE_CFLAGS_SHLIB += -fPIC
|
||||
QMAKE_CFLAGS_STATIC_LIB += -fPIC
|
||||
QMAKE_CFLAGS_APP += -fPIC
|
||||
QMAKE_CFLAGS_SHLIB += $$QMAKE_CFLAGS_PIC
|
||||
QMAKE_CFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_PIC
|
||||
QMAKE_CFLAGS_APP += $$QMAKE_CFLAGS_PIC
|
||||
QMAKE_CFLAGS_ISYSTEM = -isystem
|
||||
QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses
|
||||
QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden
|
||||
|
@ -1,5 +1,6 @@
|
||||
gcc {
|
||||
!clang:!intel_icc:greaterThan(QMAKE_HOST.cpu_count, 1) {
|
||||
# on Windows, MinGW's support for -flto=N is broken
|
||||
!clang:!intel_icc:!equals(QMAKE_HOST.os, Windows):greaterThan(QMAKE_HOST.cpu_count, 1) {
|
||||
# Override LTO number of jobs
|
||||
QMAKE_LFLAGS_LTCG ~= s/^-flto$/-flto=$$QMAKE_HOST.cpu_count/
|
||||
}
|
||||
|
@ -8,6 +8,7 @@
|
||||
#
|
||||
|
||||
load(device_config)
|
||||
include(../common/g++-base.conf)
|
||||
|
||||
MAKEFILE_GENERATOR = MINGW
|
||||
QMAKE_PLATFORM = win32 mingw
|
||||
@ -18,52 +19,21 @@ QMAKE_COMPILER_DEFINES += __GNUC__ WIN32
|
||||
QMAKE_EXT_OBJ = .o
|
||||
QMAKE_EXT_RES = _res.o
|
||||
|
||||
QMAKE_COMPILER = gcc
|
||||
|
||||
QMAKE_CC = $${CROSS_COMPILE}gcc
|
||||
QMAKE_LEX = flex
|
||||
QMAKE_LEXFLAGS =
|
||||
QMAKE_YACC = bison -y
|
||||
QMAKE_YACCFLAGS = -d
|
||||
QMAKE_CFLAGS = -pipe -fno-keep-inline-dllexport
|
||||
QMAKE_CFLAGS_DEPS = -M
|
||||
QMAKE_CFLAGS_WARN_ON = -Wall -Wextra
|
||||
QMAKE_CFLAGS_WARN_OFF = -w
|
||||
QMAKE_CFLAGS_RELEASE = -O2
|
||||
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO = -O2 -g
|
||||
QMAKE_CFLAGS_DEBUG = -g
|
||||
QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
|
||||
QMAKE_CFLAGS_SPLIT_SECTIONS = -ffunction-sections
|
||||
QMAKE_CFLAGS_SSE2 = -msse2 -mstackrealign
|
||||
QMAKE_CFLAGS_SSE3 = -msse3
|
||||
QMAKE_CFLAGS_SSSE3 = -mssse3
|
||||
QMAKE_CFLAGS_SSE4_1 = -msse4.1
|
||||
QMAKE_CFLAGS_SSE4_2 = -msse4.2
|
||||
QMAKE_CFLAGS_AVX = -mavx
|
||||
QMAKE_CFLAGS_AVX2 = -mavx2
|
||||
QMAKE_CFLAGS_NEON = -mfpu=neon
|
||||
QMAKE_CFLAGS += -fno-keep-inline-dllexport
|
||||
QMAKE_CFLAGS_WARN_ON += -Wextra
|
||||
QMAKE_CFLAGS_SSE2 += -mstackrealign
|
||||
|
||||
QMAKE_CXX = $${CROSS_COMPILE}g++
|
||||
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
|
||||
QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
|
||||
QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
|
||||
QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
|
||||
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
|
||||
QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO = $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO
|
||||
QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
|
||||
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
|
||||
QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
|
||||
QMAKE_CXXFLAGS_RTTI_ON = -frtti
|
||||
QMAKE_CXXFLAGS_RTTI_OFF = -fno-rtti
|
||||
QMAKE_CXXFLAGS_EXCEPTIONS_ON = -fexceptions -mthreads
|
||||
QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -fno-exceptions
|
||||
QMAKE_CXXFLAGS_CXX11 = -std=c++11
|
||||
QMAKE_CXXFLAGS_CXX14 = -std=c++1y
|
||||
QMAKE_CXXFLAGS_CXX1Z = -std=c++1z
|
||||
QMAKE_CXXFLAGS_GNUCXX11 = -std=gnu++11
|
||||
QMAKE_CXXFLAGS_GNUCXX14 = -std=gnu++1y
|
||||
QMAKE_CXXFLAGS_GNUCXX1Z = -std=gnu++1z
|
||||
QMAKE_CXXFLAGS_SPLIT_SECTIONS = $$QMAKE_CFLAGS_SPLIT_SECTIONS
|
||||
|
||||
QMAKE_INCDIR =
|
||||
|
||||
@ -74,17 +44,11 @@ QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
|
||||
|
||||
QMAKE_LINK = $${CROSS_COMPILE}g++
|
||||
QMAKE_LINK_C = $${CROSS_COMPILE}gcc
|
||||
QMAKE_LFLAGS =
|
||||
QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads
|
||||
QMAKE_LFLAGS_EXCEPTIONS_OFF =
|
||||
QMAKE_LFLAGS_RELEASE = -Wl,-s
|
||||
QMAKE_LFLAGS_DEBUG =
|
||||
QMAKE_LFLAGS_CONSOLE = -Wl,-subsystem,console
|
||||
QMAKE_LFLAGS_WINDOWS = -Wl,-subsystem,windows
|
||||
QMAKE_LFLAGS_DLL = -shared
|
||||
QMAKE_LFLAGS_CXX11 =
|
||||
QMAKE_LFLAGS_CXX14 =
|
||||
QMAKE_LFLAGS_CXX1Z =
|
||||
QMAKE_LFLAGS_GCSECTIONS = -Wl,--gc-sections
|
||||
QMAKE_LINK_OBJECT_MAX = 10
|
||||
QMAKE_LINK_OBJECT_SCRIPT = object_script
|
||||
@ -114,5 +78,6 @@ QMAKE_OBJCOPY = $${CROSS_COMPILE}objcopy
|
||||
QMAKE_NM = $${CROSS_COMPILE}nm -P
|
||||
|
||||
include(../common/windows-gles.conf)
|
||||
include(../common/gcc-base.conf)
|
||||
|
||||
load(qt_config)
|
||||
|
Loading…
Reference in New Issue
Block a user