diff options
Diffstat (limited to 'mkspecs/common')
52 files changed, 404 insertions, 844 deletions
diff --git a/mkspecs/common/aix/qplatformdefs.h b/mkspecs/common/aix/qplatformdefs.h index 3606a2f1cb..e3b3ea3b93 100644 --- a/mkspecs/common/aix/qplatformdefs.h +++ b/mkspecs/common/aix/qplatformdefs.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the qmake spec of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef Q_AIX_QPLATFORMDEFS_H #define Q_AIX_QPLATFORMDEFS_H diff --git a/mkspecs/common/android/qplatformdefs.h b/mkspecs/common/android/qplatformdefs.h index f75bc4093b..41b7315cef 100644 --- a/mkspecs/common/android/qplatformdefs.h +++ b/mkspecs/common/android/qplatformdefs.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Collabora Ltd, author <robin.burchell@collabora.co.uk> -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtCore module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2012 Collabora Ltd, author <robin.burchell@collabora.co.uk> +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QPLATFORMDEFS_H #define QPLATFORMDEFS_H @@ -129,11 +93,9 @@ && !defined(QT_NO_READDIR64) #define QT_DIRENT struct dirent64 #define QT_READDIR ::readdir64 -#define QT_READDIR_R ::readdir64_r #else #define QT_DIRENT struct dirent #define QT_READDIR ::readdir -#define QT_READDIR_R ::readdir_r #endif #define QT_SOCKET_CONNECT ::connect @@ -144,11 +106,7 @@ #define QT_SIGNAL_ARGS int #define QT_SIGNAL_IGNORE SIG_IGN -#if defined(__GLIBC__) && (__GLIBC__ >= 2) #define QT_SOCKLEN_T socklen_t -#else -#define QT_SOCKLEN_T int -#endif #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) #define QT_SNPRINTF ::snprintf diff --git a/mkspecs/common/angle.conf b/mkspecs/common/angle.conf deleted file mode 100644 index fad0e719d2..0000000000 --- a/mkspecs/common/angle.conf +++ /dev/null @@ -1,13 +0,0 @@ -# Renaming these files requires that the LIBRARY entry of their corresponding -# def files are also updated to reflect the name. -# The .def files are found in the angle directories: -# -# qtbase\src\3rdparty\angle\src\libEGL\libEGL[d?].def -# qtbase\src\3rdparty\angle\src\libEGL\libGLESv2[d?].def -# -# If a combined ANGLE library is used, the def files will automatically be -# combined into QtANGLE[d?].def by QtAngle.pro. - -LIBEGL_NAME = libEGL -LIBGLESV2_NAME = libGLESv2 -LIBQTANGLE_NAME = QtANGLE diff --git a/mkspecs/common/bsd/qplatformdefs.h b/mkspecs/common/bsd/qplatformdefs.h index 8e976d3290..04b801f9fc 100644 --- a/mkspecs/common/bsd/qplatformdefs.h +++ b/mkspecs/common/bsd/qplatformdefs.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the qmake spec of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef Q_BSD_PLATFORMDEFS_H #define Q_BSD_PLATFORMDEFS_H diff --git a/mkspecs/common/c89/qplatformdefs.h b/mkspecs/common/c89/qplatformdefs.h index b931c03847..4c75b3bf77 100644 --- a/mkspecs/common/c89/qplatformdefs.h +++ b/mkspecs/common/c89/qplatformdefs.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the qmake spec of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef Q_C89_QPLATFORMDEFS_H #define Q_C89_QPLATFORMDEFS_H diff --git a/mkspecs/common/clang.conf b/mkspecs/common/clang.conf index aead581478..6eb08a9d2f 100644 --- a/mkspecs/common/clang.conf +++ b/mkspecs/common/clang.conf @@ -18,7 +18,6 @@ QMAKE_PCH_OUTPUT_EXT = .pch QMAKE_CFLAGS_OPTIMIZE_SIZE = -Oz -QMAKE_CFLAGS_ISYSTEM = -isystem QMAKE_CFLAGS_PRECOMPILE = -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} QMAKE_CFLAGS_USE_PRECOMPILE = -Xclang -include-pch -Xclang ${QMAKE_PCH_OUTPUT} QMAKE_CFLAGS_LTCG = -flto=thin @@ -36,10 +35,12 @@ QMAKE_CXXFLAGS_CXX11 = -std=c++11 QMAKE_CXXFLAGS_CXX14 = -std=c++1y QMAKE_CXXFLAGS_CXX1Z = -std=c++1z QMAKE_CXXFLAGS_CXX2A = -std=c++2a +QMAKE_CXXFLAGS_CXX2B = -std=c++2b QMAKE_CXXFLAGS_GNUCXX11 = -std=gnu++11 QMAKE_CXXFLAGS_GNUCXX14 = -std=gnu++1y QMAKE_CXXFLAGS_GNUCXX1Z = -std=gnu++1z QMAKE_CXXFLAGS_GNUCXX2A = -std=gnu++2a +QMAKE_CXXFLAGS_GNUCXX2B = -std=gnu++2b QMAKE_LFLAGS_CXX11 = QMAKE_LFLAGS_CXX14 = @@ -54,3 +55,7 @@ QMAKE_RANLIB_LTCG = true # No need to run, since llvm-ar has "s" QMAKE_CFLAGS_COVERAGE_TRACE_PC_GUARD = -fsanitize-coverage=trace-pc-guard QMAKE_CXXFLAGS_COVERAGE_TRACE_PC_GUARD = -fsanitize-coverage=trace-pc-guard QMAKE_LFLAGS_COVERAGE_TRACE_PC_GUARD = -fsanitize-coverage=trace-pc-guard + +QMAKE_CFLAGS_COVERAGE_SOURCE_BASED = -fprofile-instr-generate -fcoverage-mapping +QMAKE_CXXFLAGS_COVERAGE_SOURCE_BASED = -fprofile-instr-generate -fcoverage-mapping +QMAKE_LFLAGS_COVERAGE_SOURCE_BASED = -fprofile-instr-generate -fcoverage-mapping diff --git a/mkspecs/common/g++-base.conf b/mkspecs/common/g++-base.conf index c337696304..d392879f66 100644 --- a/mkspecs/common/g++-base.conf +++ b/mkspecs/common/g++-base.conf @@ -33,10 +33,12 @@ QMAKE_CXXFLAGS_CXX11 = -std=c++11 QMAKE_CXXFLAGS_CXX14 = -std=c++1y QMAKE_CXXFLAGS_CXX1Z = -std=c++1z QMAKE_CXXFLAGS_CXX2A = -std=c++2a +QMAKE_CXXFLAGS_CXX2B = -std=c++2b QMAKE_CXXFLAGS_GNUCXX11 = -std=gnu++11 QMAKE_CXXFLAGS_GNUCXX14 = -std=gnu++1y QMAKE_CXXFLAGS_GNUCXX1Z = -std=gnu++1z QMAKE_CXXFLAGS_GNUCXX2A = -std=gnu++2a +QMAKE_CXXFLAGS_GNUCXX2B = -std=gnu++2b QMAKE_LFLAGS_CXX11 = QMAKE_LFLAGS_CXX14 = QMAKE_LFLAGS_CXX1Z = diff --git a/mkspecs/common/g++-win32.conf b/mkspecs/common/g++-win32.conf index 6369436863..67ad1e3b8c 100644 --- a/mkspecs/common/g++-win32.conf +++ b/mkspecs/common/g++-win32.conf @@ -17,7 +17,7 @@ include(g++-base.conf) MAKEFILE_GENERATOR = MINGW QMAKE_PLATFORM = win32 mingw -CONFIG += precompile_header +CONFIG += debug_and_release debug_and_release_target precompile_header DEFINES += UNICODE _UNICODE WIN32 MINGW_HAS_SECURE_API=1 QMAKE_COMPILER_DEFINES += __GNUC__ _WIN32 # can't add 'DEFINES += WIN64' and 'QMAKE_COMPILER_DEFINES += _WIN64' defines for @@ -31,7 +31,7 @@ QMAKE_YACCFLAGS = -d QMAKE_CFLAGS_SSE2 += -mstackrealign -QMAKE_CXXFLAGS_EXCEPTIONS_ON = -fexceptions -mthreads +QMAKE_CXXFLAGS_EXCEPTIONS_ON = -fexceptions QMAKE_INCDIR = @@ -40,7 +40,6 @@ QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $< QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $obj $src QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< -QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads QMAKE_LFLAGS_RELEASE = -Wl,-s QMAKE_LFLAGS_CONSOLE = -Wl,-subsystem,console QMAKE_LFLAGS_WINDOWS = -Wl,-subsystem,windows @@ -48,7 +47,6 @@ QMAKE_LFLAGS_DLL = -shared QMAKE_LFLAGS_GCSECTIONS = -Wl,--gc-sections equals(QMAKE_HOST.os, Windows) { QMAKE_LINK_OBJECT_MAX = 10 - QMAKE_LINK_OBJECT_SCRIPT = object_script } QMAKE_EXT_OBJ = .o QMAKE_EXT_RES = _res.o @@ -65,7 +63,6 @@ QMAKE_LIBS_OPENGL = -lglu32 -lopengl32 -lgdi32 -luser32 QMAKE_LIBS_OPENGL_ES2 = -lgdi32 -luser32 QMAKE_LIBS_OPENGL_ES2_DEBUG = -lgdi32 -luser32 QMAKE_LIBS_COMPAT = -ladvapi32 -lshell32 -lcomdlg32 -luser32 -lgdi32 -lws2_32 -QMAKE_LIBS_QT_ENTRY = -lmingw32 -lqtmain QMAKE_IDL = midl QMAKE_LIB = $${CROSS_COMPILE}ar -rc @@ -76,5 +73,4 @@ QMAKE_STRIPFLAGS_LIB += --strip-unneeded QMAKE_OBJCOPY = $${CROSS_COMPILE}objcopy QMAKE_NM = $${CROSS_COMPILE}nm -P -include(angle.conf) include(windows-vulkan.conf) diff --git a/mkspecs/common/gcc-base.conf b/mkspecs/common/gcc-base.conf index 472333d2ea..ae58326289 100644 --- a/mkspecs/common/gcc-base.conf +++ b/mkspecs/common/gcc-base.conf @@ -45,8 +45,7 @@ QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_OPTIMIZE -g QMAKE_CFLAGS_DEBUG += -g 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_APP += QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden QMAKE_CFLAGS_EXCEPTIONS_OFF += -fno-exceptions @@ -54,6 +53,7 @@ QMAKE_CFLAGS_SPLIT_SECTIONS += -ffunction-sections -fdata-sections QMAKE_CFLAGS_LTCG = -flto -fno-fat-lto-objects QMAKE_CFLAGS_LTCG_FATOBJECTS = -ffat-lto-objects QMAKE_CFLAGS_DISABLE_LTCG = -fno-lto +QMAKE_CFLAGS_SHSTK = -mshstk QMAKE_CXXFLAGS += $$QMAKE_CFLAGS QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS @@ -74,6 +74,7 @@ QMAKE_CXXFLAGS_SPLIT_SECTIONS += $$QMAKE_CFLAGS_SPLIT_SECTIONS QMAKE_CXXFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG QMAKE_CXXFLAGS_LTCG_FATOBJECTS = $$QMAKE_CFLAGS_LTCG_FATOBJECTS QMAKE_CXXFLAGS_DISABLE_LTCG = $$QMAKE_CFLAGS_DISABLE_LTCG +QMAKE_CXXFLAGS_SHSTK = $$QMAKE_CFLAGS_SHSTK QMAKE_LFLAGS += QMAKE_LFLAGS_DEBUG += @@ -85,6 +86,7 @@ QMAKE_LFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG -fuse-linker-plugin QMAKE_CFLAGS_C99 = -std=c99 QMAKE_CFLAGS_C11 = -std=c11 +QMAKE_CFLAGS_C17 = -std=c17 QMAKE_CFLAGS_SSE2 += -msse2 QMAKE_CFLAGS_SSE3 += -msse3 @@ -105,8 +107,15 @@ QMAKE_CFLAGS_AVX512BW += -mavx512bw QMAKE_CFLAGS_AVX512VL += -mavx512vl QMAKE_CFLAGS_AVX512IFMA += -mavx512ifma QMAKE_CFLAGS_AVX512VBMI += -mavx512vbmi +QMAKE_CFLAGS_AVX512VNNI += -mavx512vnni +QMAKE_CFLAGS_AVX512IFMA += -mavx512ifma +QMAKE_CFLAGS_AVX512VBMI += -mavx512vbmi +QMAKE_CFLAGS_AVX512VBMI2 += -mavx512vbmi2 +QMAKE_CFLAGS_AVX512BITALG += -mavx512bitalg +QMAKE_CFLAGS_AVX512POPCNTDQ += -mavx512vpopcntd QMAKE_CFLAGS_AESNI += -maes QMAKE_CFLAGS_SHANI += -msha +QMAKE_CFLAGS_VAES += -mvaes QMAKE_CFLAGS_NEON += -mfpu=neon QMAKE_CFLAGS_MIPS_DSP += -mdsp QMAKE_CFLAGS_MIPS_DSPR2 += -mdspr2 @@ -119,4 +128,6 @@ QMAKE_AR_LTCG = gcc-ar cqs QMAKE_NM_LTCG = gcc-nm -P QMAKE_RANLIB_LTCG = true # No need to run since gcc-ar has "s" +QMAKE_LINK_OBJECT_SCRIPT = object_script + include(sanitize.conf) diff --git a/mkspecs/common/ghs-base.conf b/mkspecs/common/ghs-base.conf index a66971578c..3fd4cf70a7 100644 --- a/mkspecs/common/ghs-base.conf +++ b/mkspecs/common/ghs-base.conf @@ -8,7 +8,7 @@ QMAKE_COMPILER = ghs QMAKE_CFLAGS += --signed_fields --no_commons --diag_suppress=1,82,228,236,381,611,961,997,1795,1974 QMAKE_CFLAGS_DEPS += -MD -QMAKE_CFLAGS_RELEASE += -Ospeed -Olink -Omax +QMAKE_CFLAGS_RELEASE += -Ospeed -Olink -Omax -no_uvfd QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_RELEASE -g QMAKE_CFLAGS_DEBUG += -g -Omaxdebug QMAKE_CFLAGS_SHLIB += @@ -29,12 +29,13 @@ QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB QMAKE_CXXFLAGS_APP += $$QMAKE_CFLAGS_APP QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS +QMAKE_CFLAGS_C99 = -std=c99 QMAKE_CXXFLAGS_CXX11 += --c++11 --thread_local_storage QMAKE_CXXFLAGS_EXCEPTIONS_ON += --exceptions QMAKE_LFLAGS += --signed_fields --no_commons --no_implicit_include --link_once_templates -non_shared --new_outside_of_constructor QMAKE_LFLAGS_DEBUG += -g -Omaxdebug -QMAKE_LFLAGS_RELEASE += -Ospeed -Olink -Omax +QMAKE_LFLAGS_RELEASE += -Ospeed -Olink -Omax -no_uvfd QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_LFLAGS_RELEASE -g QMAKE_LFLAGS_CXX11 += --c++11 --thread_local_storage QMAKE_LFLAGS_EXCEPTIONS_ON += --exceptions diff --git a/mkspecs/common/ghs-integrity-armv8.conf b/mkspecs/common/ghs-integrity-armv8.conf index e454cfd245..ac30b6c7af 100644 --- a/mkspecs/common/ghs-integrity-armv8.conf +++ b/mkspecs/common/ghs-integrity-armv8.conf @@ -17,8 +17,16 @@ os_directory = $$(INTEGRITY_DIR) isEmpty(os_directory): \ error("This qmakespec requires $INTEGRITY_DIR to be set") -QMAKE_CC = cxintarm64 -bsp $$bsp_name -os_dir $$os_directory -non_shared -QMAKE_CXX = cxintarm64 -bsp $$bsp_name -os_dir $$os_directory -non_shared +iy_build_target = $$(INTEGRITY_BUILD_TARGET) +isEmpty(iy_build_target): \ + message("This qmakespec requires $INTEGRITY_BUILD_TARGET to be set [dbg|rel|chk|cov] for Integrity versions 11.7.6 and higher") + +start_name = $$(INTEGRITY_DIR)/libs/$$(INTEGRITY_BSP)/$$(INTEGRITY_BUILD_TARGET) +rtos_name= libs/$$(INTEGRITY_BSP)/$$(INTEGRITY_BUILD_TARGET) + +QMAKE_CC = cxintarm64 -bsp $$bsp_name -os_dir $$os_directory -non_shared -startfile_dir=$$start_name --rtos_library_directory=$$rtos_name --rtos_library_directory=libs/arm64/$$iy_build_target +QMAKE_CXX = cxintarm64 -bsp $$bsp_name -os_dir $$os_directory -non_shared -startfile_dir=$$start_name --rtos_library_directory=$$rtos_name --rtos_library_directory=libs/arm64/$$iy_build_target + QMAKE_LINK = $$QMAKE_CXX QMAKE_AR = $$QMAKE_CXX -archive -o diff --git a/mkspecs/common/icc-base-unix.conf b/mkspecs/common/icc-base-unix.conf index e0bb55577e..e6cf54eea3 100644 --- a/mkspecs/common/icc-base-unix.conf +++ b/mkspecs/common/icc-base-unix.conf @@ -48,11 +48,18 @@ QMAKE_CFLAGS_AVX512PF += -march=knl QMAKE_CFLAGS_AVX512DQ += -march=skylake-avx512 QMAKE_CFLAGS_AVX512BW += -march=skylake-avx512 QMAKE_CFLAGS_AVX512VL += -march=skylake-avx512 +QMAKE_CFLAGS_AVX512VNNI += -march=cascadelake +QMAKE_CFLAGS_AVX512IFMA += -march=icelake-client # technically, cannonlake +QMAKE_CFLAGS_AVX512VBMI += -march=icelake-client # ditto +QMAKE_CFLAGS_AVX512VBMI2 += -march=icelake-client +QMAKE_CFLAGS_AVX512BITALG += -march=icelake-client +QMAKE_CFLAGS_AVX512POPCNTDQ += -march=icelake-client QMAKE_CFLAGS_AESNI += -maes QMAKE_CFLAGS_F16C += $$QMAKE_CFLAGS_AVX2 QMAKE_CFLAGS_RDRND += -mrdrnd QMAKE_CFLAGS_RDSEED += -mrdseed QMAKE_CFLAGS_SHANI += -msha +QMAKE_CFLAGS_VAES += -mvaes QMAKE_CXX = icpc QMAKE_CXXFLAGS = $$QMAKE_CFLAGS @@ -68,7 +75,7 @@ QMAKE_CXXFLAGS_SPLIT_SECTIONS = $$QMAKE_CFLAGS_SPLIT_SECTIONS 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_CXX1Z = -std=c++17 QMAKE_CXXFLAGS_GNUCXX11 = -std=gnu++11 QMAKE_CXXFLAGS_GNUCXX14 = -std=gnu++1y QMAKE_CXXFLAGS_GNUCXX1Z = -std=gnu++1z diff --git a/mkspecs/common/integrity/qplatformdefs.h b/mkspecs/common/integrity/qplatformdefs.h index f0b4dea8e1..5369899eb8 100644 --- a/mkspecs/common/integrity/qplatformdefs.h +++ b/mkspecs/common/integrity/qplatformdefs.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2015 Green Hills Software. All rights reserved. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the qmake spec of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2015 Green Hills Software. All rights reserved. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef Q_INTEGRITY_PLATFORMDEFS_H #define Q_INTEGRITY_PLATFORMDEFS_H diff --git a/mkspecs/common/mac/qplatformdefs.h b/mkspecs/common/mac/qplatformdefs.h index 1927587097..f394941305 100644 --- a/mkspecs/common/mac/qplatformdefs.h +++ b/mkspecs/common/mac/qplatformdefs.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the qmake spec of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QPLATFORMDEFS_H #define QPLATFORMDEFS_H diff --git a/mkspecs/common/macx.conf b/mkspecs/common/macx.conf index d16b77acb8..71295a4055 100644 --- a/mkspecs/common/macx.conf +++ b/mkspecs/common/macx.conf @@ -5,21 +5,14 @@ QMAKE_PLATFORM += macos osx macx QMAKE_MAC_SDK = macosx -QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.13 -QMAKE_APPLE_DEVICE_ARCHS = x86_64 - -# Should be 10.15, but as long as the CI builds with -# older SDKs we have to keep this. -QT_MAC_SDK_VERSION_MIN = 10.14 - -QT_MAC_SDK_VERSION_MAX = 10.15 - device.sdk = macosx device.target = device device.dir_affix = $${device.sdk} device.CONFIG = $${device.sdk} device.deployment_identifier = $${device.sdk} +CONFIG += only_active_arch + QMAKE_LIBS_VULKAN = include(mac.conf) diff --git a/mkspecs/common/msvc-based-version.conf b/mkspecs/common/msvc-based-version.conf index 38aecbaf59..adc893836a 100644 --- a/mkspecs/common/msvc-based-version.conf +++ b/mkspecs/common/msvc-based-version.conf @@ -21,6 +21,7 @@ greaterThan(QMAKE_MSC_FULL_VER, 190023918):!intel_icl { greaterThan(QMAKE_MSC_VER, 1909) { # Visual Studio 2017 (15.0) / Visual C++ 19.10 and up MSVC_VER = 15.0 + MSVC_TOOLSET_VER = 141 COMPAT_MKSPEC = win32-msvc2017 } @@ -29,4 +30,16 @@ greaterThan(QMAKE_MSC_VER, 1910) { COMPAT_MKSPEC = } +greaterThan(QMAKE_MSC_VER, 1919) { + # Visual Studio 2019 (16.0) / Visual C++ 19.20 and up + MSVC_VER = 16.0 + MSVC_TOOLSET_VER = 142 +} + +greaterThan(QMAKE_MSC_VER, 1929) { + # Visual Studio 2022 (17.0) / Visual C++ 19.30 and up + MSVC_VER = 17.0 + MSVC_TOOLSET_VER = 143 +} + !isEmpty(COMPAT_MKSPEC):!$$COMPAT_MKSPEC: CONFIG += $$COMPAT_MKSPEC diff --git a/mkspecs/common/msvc-desktop.conf b/mkspecs/common/msvc-desktop.conf index f5d12f445b..72fe0ec34e 100644 --- a/mkspecs/common/msvc-desktop.conf +++ b/mkspecs/common/msvc-desktop.conf @@ -60,7 +60,7 @@ QMAKE_CFLAGS_SHANI = $$QMAKE_CFLAGS_SSE2 QMAKE_CXX = $$QMAKE_CC QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -w34100 -w34189 -w44996 +QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -w34100 -w34189 QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO @@ -85,8 +85,8 @@ QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<< QMAKE_LINK = link QMAKE_LFLAGS = /NOLOGO /DYNAMICBASE /NXCOMPAT -QMAKE_LFLAGS_RELEASE = /OPT:REF /INCREMENTAL:NO -QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = /DEBUG /OPT:REF /INCREMENTAL:NO +QMAKE_LFLAGS_RELEASE = /OPT:REF /OPT:ICF /INCREMENTAL:NO +QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = $$QMAKE_LFLAGS_RELEASE /DEBUG QMAKE_LFLAGS_DEBUG = /DEBUG QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS @@ -105,7 +105,6 @@ QMAKE_LIBS_OPENGL = glu32.lib opengl32.lib gdi32.lib user32.lib QMAKE_LIBS_OPENGL_ES2 = gdi32.lib user32.lib QMAKE_LIBS_OPENGL_ES2_DEBUG = gdi32.lib user32.lib QMAKE_LIBS_COMPAT = advapi32.lib shell32.lib comdlg32.lib user32.lib gdi32.lib ws2_32.lib -QMAKE_LIBS_QT_ENTRY = -lqtmain QMAKE_IDL = midl QMAKE_LIB = lib /NOLOGO @@ -115,6 +114,5 @@ VCPROJ_EXTENSION = .vcproj VCSOLUTION_EXTENSION = .sln VCPROJ_KEYWORD = Qt4VSv1.0 -include(angle.conf) include(windows-desktop.conf) include(windows-vulkan.conf) diff --git a/mkspecs/common/msvc-version.conf b/mkspecs/common/msvc-version.conf index adb45582c7..303b341e9d 100644 --- a/mkspecs/common/msvc-version.conf +++ b/mkspecs/common/msvc-version.conf @@ -1,6 +1,6 @@ # # qmake configuration for Microsoft Visual Studio C/C++ Compiler -# This file is used by win32-msvc and all winrt-XXX-msvcXXX specs +# This file is used by win32-msvc # # @@ -15,6 +15,7 @@ COMPAT_MKSPEC = win32-msvc2005 greaterThan(QMAKE_MSC_VER, 1499) { # Visual Studio 2008 (9.0) / Visual C++ 15.0 and up MSVC_VER = 9.0 + MSVC_TOOLSET_VER = 90 COMPAT_MKSPEC = win32-msvc2008 QMAKE_CFLAGS_MP = -MP QMAKE_CXXFLAGS_MP = $$QMAKE_CFLAGS_MP @@ -23,6 +24,7 @@ greaterThan(QMAKE_MSC_VER, 1499) { greaterThan(QMAKE_MSC_VER, 1599) { # Visual Studio 2010 (10.0) / Visual C++ 16.0 and up MSVC_VER = 10.0 + MSVC_TOOLSET_VER = 100 COMPAT_MKSPEC = win32-msvc2010 MAKEFILE_GENERATOR = MSBUILD @@ -35,6 +37,7 @@ greaterThan(QMAKE_MSC_VER, 1599) { greaterThan(QMAKE_MSC_VER, 1699) { # Visual Studio 2012 (11.0) / Visual C++ 17.0 and up MSVC_VER = 11.0 + MSVC_TOOLSET_VER = 110 COMPAT_MKSPEC = win32-msvc2012 QMAKE_CXXFLAGS_EXCEPTIONS_OFF = /wd4530 /wd4577 QT_CONFIG += c++11 @@ -44,6 +47,7 @@ greaterThan(QMAKE_MSC_VER, 1699) { greaterThan(QMAKE_MSC_VER, 1799) { # Visual Studio 2013 (12.0) / Visual C++ 18.0 and up MSVC_VER = 12.0 + MSVC_TOOLSET_VER = 120 COMPAT_MKSPEC = win32-msvc2013 QMAKE_CFLAGS += -FS QMAKE_CXXFLAGS += -FS -Zc:rvalueCast -Zc:inline @@ -63,6 +67,7 @@ greaterThan(QMAKE_MSC_VER, 1799) { greaterThan(QMAKE_MSC_VER, 1899) { # Visual Studio 2015 (14.0) / Visual C++ 19.0 and up MSVC_VER = 14.0 + MSVC_TOOLSET_VER = 140 COMPAT_MKSPEC = win32-msvc2015 QMAKE_CFLAGS += -Zc:strictStrings QMAKE_CFLAGS_WARN_ON += -w44456 -w44457 -w44458 @@ -77,8 +82,9 @@ greaterThan(QMAKE_MSC_VER, 1899) { greaterThan(QMAKE_MSC_VER, 1909) { # Visual Studio 2017 (15.0) / Visual C++ 19.10 and up MSVC_VER = 15.0 + MSVC_TOOLSET_VER = 141 COMPAT_MKSPEC = win32-msvc2017 - QMAKE_CXXFLAGS += -Zc:referenceBinding + QMAKE_CXXFLAGS += -permissive- # Only Visual Studio 2017 version 15.3 / Visual C++ 19.11 & up have support # for AVX-512. We enable the switches anyway and let configure check if they @@ -93,11 +99,6 @@ greaterThan(QMAKE_MSC_VER, 1909) { QMAKE_CFLAGS_AVX512IFMA = -arch:AVX512 QMAKE_CFLAGS_AVX512VBMI = -arch:AVX512 - # For now permissive fails as soon as UWP API comes into play. In qtbase this - # API is used in direct2d, but also in multimedia, positioning and sensors. - # We can try again with a later version of Visual Studio. - # QMAKE_CXXFLAGS_STRICTCXX = -permissive- - # MSVC partially supports the following, but '__cplusplus' definition is set # as for C++98 until MSVC fully conforms with C++14, see # https://developercommunity.visualstudio.com/content/problem/139261/msvc-incorrectly-defines-cplusplus.html @@ -117,8 +118,32 @@ greaterThan(QMAKE_MSC_VER, 1910) { greaterThan(QMAKE_MSC_VER, 1919) { # Visual Studio 2019 (16.0) / Visual C++ 19.20 and up MSVC_VER = 16.0 + MSVC_TOOLSET_VER = 142 QMAKE_CXXFLAGS_CXX2A = -std:c++latest + QMAKE_CXXFLAGS_CXX2B = -std:c++latest + + QMAKE_CXXFLAGS += -Zc:externConstexpr +} + +greaterThan(QMAKE_MSC_VER, 1927) { + # Visual Studio 2019 (16.8 or 16.9) / Visual C++ 19.28 and up + MSVC_VER = 16.8 + QMAKE_CFLAGS_C11 = /std:c11 + QMAKE_CFLAGS_C17 = /std:c17 +} + +greaterThan(QMAKE_MSC_VER, 1928) { + # Visual Studio 2019 (16.10 or 16.11) / Visual C++ 19.29 and up + MSVC_VER = 16.10 + + # -std:c++20 compiler option for Visual Studio 2019 16.11.0 and up + greaterThan(QMAKE_MSC_FULL_VER, 192930132): QMAKE_CXXFLAGS_CXX2A = -std:c++20 +} +greaterThan(QMAKE_MSC_VER, 1929) { + # Visual Studio 2022 (17.0) / Visual C++ 19.30 and up + MSVC_VER = 17.0 + MSVC_TOOLSET_VER = 143 } !isEmpty(COMPAT_MKSPEC):!$$COMPAT_MKSPEC: CONFIG += $$COMPAT_MKSPEC diff --git a/mkspecs/common/nacl/g++-nacl32.conf b/mkspecs/common/nacl/g++-nacl32.conf deleted file mode 100644 index 319d3ca475..0000000000 --- a/mkspecs/common/nacl/g++-nacl32.conf +++ /dev/null @@ -1,12 +0,0 @@ - -# 32-bit x86 nacl configuration. - -QMAKE_CC = i686-nacl-gcc -QMAKE_CXX = i686-nacl-g++ -QMAKE_LINK = i686-nacl-g++ -QMAKE_LINK_SHLIB = i686-nacl-g++ -QMAKE_AR = i686-nacl-ar q -QMAKE_OBJCOPY = i686-nacl-objcopy -QMAKE_NM = i686-nacl-nm -P -QMAKE_STRIP = i686-nacl-strip - diff --git a/mkspecs/common/nacl/g++-nacl64.conf b/mkspecs/common/nacl/g++-nacl64.conf deleted file mode 100644 index 8a20535775..0000000000 --- a/mkspecs/common/nacl/g++-nacl64.conf +++ /dev/null @@ -1,12 +0,0 @@ - -# 32-bit x86 nacl configuration. - -QMAKE_CC = x86_64-nacl-gcc -QMAKE_CXX = x86_64-nacl-g++ -QMAKE_LINK = x86_64-nacl-g++ -QMAKE_LINK_SHLIB = x86_64-nacl-g++ -QMAKE_AR = x86_64-nacl-ar q -QMAKE_OBJCOPY = x86_64-nacl-objcopy -QMAKE_NM = x86_64-nacl-nm -P -QMAKE_STRIP = x86_64-nacl-strip - diff --git a/mkspecs/common/nacl/nacl-base.conf b/mkspecs/common/nacl/nacl-base.conf deleted file mode 100644 index d94c5c96d7..0000000000 --- a/mkspecs/common/nacl/nacl-base.conf +++ /dev/null @@ -1,11 +0,0 @@ -QMAKE_PLATFORM = nacl $$QMAKE_PLATFORM - -# Work around linker crash when using PIC. We are building -# statically so this is safe. -QMAKE_CFLAGS_STATIC_LIB -= -fPIC -QMAKE_CFLAGS_SHLIB -= -fPIC -QMAKE_CXXFLAGS_STATIC_LIB -= -fPIC -QMAKE_CXXFLAGS_SHLIB -= -fPIC - -QMAKE_LIBS_DYNLOAD -= -ldl -QMAKE_LIBS_OPENGL_ES2 = -lppapi_gles2 diff --git a/mkspecs/common/nacl/qplatformdefs.h b/mkspecs/common/nacl/qplatformdefs.h deleted file mode 100644 index 2b9c7227ef..0000000000 --- a/mkspecs/common/nacl/qplatformdefs.h +++ /dev/null @@ -1,54 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the qmake spec of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#define _POSIX_TIMERS - -#include "qglobal.h" - -// extra disabling. -#ifdef __native_client__ -#define QT_NO_FSFILEENGINE -#endif - -#define QT_NO_SOCKET_H - -#define DIR void * -#define PATH_MAX 256 - -#include "qfunctions_nacl.h" -#include <pthread.h> diff --git a/mkspecs/common/posix/qplatformdefs.h b/mkspecs/common/posix/qplatformdefs.h index 3ebc523338..e7ce7a568d 100644 --- a/mkspecs/common/posix/qplatformdefs.h +++ b/mkspecs/common/posix/qplatformdefs.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the qmake spec of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef Q_POSIX_QPLATFORMDEFS_H #define Q_POSIX_QPLATFORMDEFS_H @@ -144,11 +108,9 @@ && !defined(QT_NO_READDIR64) #define QT_DIRENT struct dirent64 #define QT_READDIR ::readdir64 -#define QT_READDIR_R ::readdir64_r #else #define QT_DIRENT struct dirent #define QT_READDIR ::readdir -#define QT_READDIR_R ::readdir_r #endif #define QT_SOCKLEN_T socklen_t diff --git a/mkspecs/common/qcc-base-qnx-aarch64le.conf b/mkspecs/common/qcc-base-qnx-aarch64le.conf index 914ef33f37..92eff22954 100644 --- a/mkspecs/common/qcc-base-qnx-aarch64le.conf +++ b/mkspecs/common/qcc-base-qnx-aarch64le.conf @@ -8,7 +8,7 @@ include(g++-unix.conf) include(unix.conf) QMAKE_CC = qcc -Vgcc_ntoaarch64le -QMAKE_CXX = qcc -Vgcc_ntoaarch64le +QMAKE_CXX = q++ -Vgcc_ntoaarch64le QNX_CPUDIR = aarch64le include(qcc-base-qnx.conf) diff --git a/mkspecs/common/qcc-base-qnx-armle-v7.conf b/mkspecs/common/qcc-base-qnx-armle-v7.conf index ad3bb33da4..25b8bbc808 100644 --- a/mkspecs/common/qcc-base-qnx-armle-v7.conf +++ b/mkspecs/common/qcc-base-qnx-armle-v7.conf @@ -9,7 +9,7 @@ include(unix.conf) include(g++-unix.conf) QMAKE_CC = qcc -Vgcc_ntoarmv7le -QMAKE_CXX = qcc -Vgcc_ntoarmv7le +QMAKE_CXX = q++ -Vgcc_ntoarmv7le QNX_CPUDIR = armle-v7 QMAKE_CFLAGS += -mfpu=neon diff --git a/mkspecs/common/qcc-base-qnx-x86-64.conf b/mkspecs/common/qcc-base-qnx-x86-64.conf index fd04104f71..8e77b5b660 100644 --- a/mkspecs/common/qcc-base-qnx-x86-64.conf +++ b/mkspecs/common/qcc-base-qnx-x86-64.conf @@ -8,7 +8,7 @@ include(g++-unix.conf) include(unix.conf) QMAKE_CC = qcc -Vgcc_ntox86_64 -QMAKE_CXX = qcc -Vgcc_ntox86_64 +QMAKE_CXX = q++ -Vgcc_ntox86_64 QNX_CPUDIR = x86_64 include(qcc-base-qnx.conf) diff --git a/mkspecs/common/qcc-base-qnx-x86.conf b/mkspecs/common/qcc-base-qnx-x86.conf index 37a5d9ce70..23bc84c3c8 100644 --- a/mkspecs/common/qcc-base-qnx-x86.conf +++ b/mkspecs/common/qcc-base-qnx-x86.conf @@ -9,7 +9,7 @@ include(unix.conf) include(g++-unix.conf) QMAKE_CC = qcc -Vgcc_ntox86 -QMAKE_CXX = qcc -Vgcc_ntox86 +QMAKE_CXX = q++ -Vgcc_ntox86 QNX_CPUDIR = x86 include(qcc-base-qnx.conf) diff --git a/mkspecs/common/qcc-base-qnx.conf b/mkspecs/common/qcc-base-qnx.conf index 4725371c29..dce6d8ea2c 100644 --- a/mkspecs/common/qcc-base-qnx.conf +++ b/mkspecs/common/qcc-base-qnx.conf @@ -46,7 +46,7 @@ QMAKE_RPATHLINKDIR_POST += $${QNX_DIR}/$${QNX_CPUDIR}/lib $${QNX_DIR}/$${QNX_CPU QMAKE_CXXFLAGS_CXX11 = QMAKE_CXXFLAGS_CXX14 = -QMAKE_CXXFLAGS_CXX1Z = +QMAKE_CXXFLAGS_CXX1Z = -Wc,-std=gnu++1z QMAKE_CXXFLAGS_GNUCXX11 = -Wc,-std=gnu++11 QMAKE_CXXFLAGS_GNUCXX14 = -Wc,-std=gnu++1y diff --git a/mkspecs/common/qcc-base.conf b/mkspecs/common/qcc-base.conf index 24ee29b6b8..b13e3b55bd 100644 --- a/mkspecs/common/qcc-base.conf +++ b/mkspecs/common/qcc-base.conf @@ -38,7 +38,6 @@ QMAKE_CFLAGS_SHANI += -msha QMAKE_CFLAGS_STACK_PROTECTOR_STRONG = -fstack-protector-strong -QMAKE_CXXFLAGS += $$QMAKE_CFLAGS -lang-c++ QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF @@ -56,4 +55,3 @@ QMAKE_CFLAGS_USE_PRECOMPILE = -Wc,-include -Wc,${QMAKE_PCH_OUTPUT_BASE} QMAKE_CXXFLAGS_PRECOMPILE = -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE -QMAKE_LFLAGS += -lang-c++ diff --git a/mkspecs/common/qnx/qplatformdefs.h b/mkspecs/common/qnx/qplatformdefs.h index b30cd96002..285301b157 100644 --- a/mkspecs/common/qnx/qplatformdefs.h +++ b/mkspecs/common/qnx/qplatformdefs.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2014 BlackBerry Limited. All rights reserved. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the qmake spec of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2014 BlackBerry Limited. All rights reserved. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef Q_QNX_PLATFORMDEFS_H #define Q_QNX_PLATFORMDEFS_H @@ -82,11 +46,6 @@ #define QT_NO_READDIR64 #endif #include "../posix/qplatformdefs.h" -#if defined(__EXT_QNX__READDIR64_R) -#define QT_EXT_QNX_READDIR_R ::_readdir64_r -#elif defined(__EXT_QNX__READDIR_R) -#define QT_EXT_QNX_READDIR_R ::_readdir_r -#endif #define QT_SNPRINTF ::snprintf #define QT_VSNPRINTF ::vsnprintf @@ -99,6 +58,4 @@ inline int getpagesize() #include <stdlib.h> -#define QT_QWS_TEMP_DIR QString::fromLatin1(qgetenv("TMP")) - #endif // Q_QNX_PLATFORMDEFS_H diff --git a/mkspecs/common/rtems/qplatformdefs.h b/mkspecs/common/rtems/qplatformdefs.h index b4ec1de87f..83b52b3079 100644 --- a/mkspecs/common/rtems/qplatformdefs.h +++ b/mkspecs/common/rtems/qplatformdefs.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2018 The Qt Company. All rights reserved. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the qmake spec of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2018 The Qt Company. All rights reserved. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef Q_RTEMS_PLATFORMDEFS_H #define Q_RTEMS_PLATFORMDEFS_H diff --git a/mkspecs/common/sanitize.conf b/mkspecs/common/sanitize.conf index 8417fa4c2f..409bd99061 100644 --- a/mkspecs/common/sanitize.conf +++ b/mkspecs/common/sanitize.conf @@ -21,7 +21,7 @@ QMAKE_SANITIZE_FUZZERNL_CFLAGS = -fsanitize=fuzzer-no-link QMAKE_SANITIZE_FUZZERNL_CXXFLAGS = -fsanitize=fuzzer-no-link QMAKE_SANITIZE_FUZZERNL_LFLAGS = -fsanitize=fuzzer-no-link -QMAKE_SANITIZE_UNDEFINED_CFLAGS = -fsanitize=undefined -QMAKE_SANITIZE_UNDEFINED_CXXFLAGS = -fsanitize=undefined -QMAKE_SANITIZE_UNDEFINED_LFLAGS = -fsanitize=undefined +QMAKE_SANITIZE_UNDEFINED_CFLAGS = -fsanitize=undefined -fsanitize=float-divide-by-zero +QMAKE_SANITIZE_UNDEFINED_CXXFLAGS = -fsanitize=undefined -fsanitize=float-divide-by-zero +QMAKE_SANITIZE_UNDEFINED_LFLAGS = -fsanitize=undefined -fsanitize=float-divide-by-zero diff --git a/mkspecs/common/solaris.conf b/mkspecs/common/solaris.conf index 024b75a9d9..d21766283b 100644 --- a/mkspecs/common/solaris.conf +++ b/mkspecs/common/solaris.conf @@ -6,6 +6,7 @@ QMAKE_PLATFORM += solaris include(unix.conf) +QMAKE_CFLAGS_PIC = -fPIC QMAKE_CFLAGS_THREAD = -D_REENTRANT QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD QMAKE_LFLAGS_GCSECTIONS = -Wl,-z,ignore diff --git a/mkspecs/common/uikit.conf b/mkspecs/common/uikit.conf index 424381e285..8419506f09 100644 --- a/mkspecs/common/uikit.conf +++ b/mkspecs/common/uikit.conf @@ -3,10 +3,8 @@ # QMAKE_PLATFORM += uikit -CONFIG += bitcode reduce_exports shallow_bundle no_qt_rpath +CONFIG += reduce_exports shallow_bundle no_qt_rpath INCLUDEPATH += $$PWD/uikit -DEFINES += GLES_SILENCE_DEPRECATION - include(mac.conf) diff --git a/mkspecs/common/uikit/GLES2/gl2.h b/mkspecs/common/uikit/GLES2/gl2.h index 0974509a35..1ca3921692 100644 --- a/mkspecs/common/uikit/GLES2/gl2.h +++ b/mkspecs/common/uikit/GLES2/gl2.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the qmake spec of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include <OpenGLES/ES2/gl.h> #include <OpenGLES/ES2/glext.h> diff --git a/mkspecs/common/uikit/clang.conf b/mkspecs/common/uikit/clang.conf index 6b9b7eea8e..f828f8b6f8 100644 --- a/mkspecs/common/uikit/clang.conf +++ b/mkspecs/common/uikit/clang.conf @@ -1,7 +1,3 @@ # # compiler settings for iOS/tvOS/watchOS clang compilers # - -# Based on the following information, http://clang.llvm.org/doxygen/ObjCRuntime_8h_source.html, -# we can conclude that it's safe to always pass the following flags -QMAKE_OBJECTIVE_CFLAGS += -fobjc-nonfragile-abi -fobjc-legacy-dispatch diff --git a/mkspecs/common/vxworks/qplatformdefs.h b/mkspecs/common/vxworks/qplatformdefs.h new file mode 100644 index 0000000000..28f4e8b436 --- /dev/null +++ b/mkspecs/common/vxworks/qplatformdefs.h @@ -0,0 +1,52 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef Q_VXWORKS_PLATFORMDEFS_H +#define Q_VXWORKS_PLATFORMDEFS_H + +#include "qglobal.h" + +#include <unistd.h> +#include <fcntl.h> + +#include <sys/time.h> +#include <dirent.h> +#include <pthread.h> + +// from VxWorks 7 <system.h> +#ifndef S_ISSOCK +# ifdef S_IFSOCK +# define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) +# else +# define S_ISSOCK(m) 0 +# endif +#endif + +#include "../common/posix/qplatformdefs.h" + +#undef QT_OPEN_LARGEFILE + +#define O_LARGEFILE 0 +#define QT_OPEN_LARGEFILE O_LARGEFILE + +#define QT_MMAP ::mmap + +#define QT_SNPRINTF ::snprintf +#define QT_VSNPRINTF ::vsnprintf + +#define S_ISVTX 01000 + +/* + * vxworks introduces some defines that replace READ with 0 and WRITE with 1 + * this causes issues with moc and Q_PROPERTY + */ +#undef READ +#undef WRITE + +/* vxworks exposes these definitions only when _POSIX_C_SOURCE >=200809L but we don't want to set this, as it hides other API */ +#ifndef UTIME_NOW +# define UTIME_NOW ((1l << 30) - 1l) +# define UTIME_OMIT ((1l << 30) - 2l) +#endif + +#endif /* Q_VXWORKS_PLATFORMDEFS_H */ diff --git a/mkspecs/common/wasm/qplatformdefs.h b/mkspecs/common/wasm/qplatformdefs.h new file mode 100644 index 0000000000..99087a2044 --- /dev/null +++ b/mkspecs/common/wasm/qplatformdefs.h @@ -0,0 +1,143 @@ +// Copyright (C) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef Q_WASM_PLATFORMDEFS_H +#define Q_WASM_PLATFORMDEFS_H + +// Get Qt defines/settings + +#include "qglobal.h" + +// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs + +// 1) need to reset default environment if _BSD_SOURCE is defined +// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0 +// 3) it seems older glibc need this to include the X/Open stuff + +#include <unistd.h> + +// We are hot - unistd.h should have turned on the specific APIs we requested + +#include <features.h> +#include <pthread.h> +#include <dirent.h> +#include <fcntl.h> +#include <grp.h> +#include <pwd.h> +#include <signal.h> +#include <dlfcn.h> + +#include <sys/types.h> +#include <sys/ioctl.h> +#include <sys/ipc.h> +#include <sys/time.h> +#include <sys/socket.h> +#include <sys/stat.h> +#include <sys/wait.h> + +#ifndef QT_NO_IPV6IFNAME +#include <net/if.h> +#endif + +#ifndef _GNU_SOURCE +# define _GNU_SOURCE +#endif + +#ifdef QT_LARGEFILE_SUPPORT +#define QT_STATBUF struct stat64 +#define QT_STATBUF4TSTAT struct stat64 +#define QT_STAT ::stat64 +#define QT_FSTAT ::fstat64 +#define QT_LSTAT ::lstat64 +#define QT_OPEN ::open64 +#define QT_TRUNCATE ::truncate64 +#define QT_FTRUNCATE ::ftruncate64 +#define QT_LSEEK ::lseek64 +#else +#define QT_STATBUF struct stat +#define QT_STATBUF4TSTAT struct stat +#define QT_STAT ::stat +#define QT_FSTAT ::fstat +#define QT_LSTAT ::lstat +#define QT_OPEN ::open +#define QT_TRUNCATE ::truncate +#define QT_FTRUNCATE ::ftruncate +#define QT_LSEEK ::lseek +#endif + +#ifdef QT_LARGEFILE_SUPPORT +#define QT_FOPEN ::fopen64 +#define QT_FSEEK ::fseeko64 +#define QT_FTELL ::ftello64 +#define QT_FGETPOS ::fgetpos64 +#define QT_FSETPOS ::fsetpos64 +#define QT_MMAP ::mmap64 +#define QT_FPOS_T fpos64_t +#define QT_OFF_T off64_t +#else +#define QT_FOPEN ::fopen +#define QT_FSEEK ::fseek +#define QT_FTELL ::ftell +#define QT_FGETPOS ::fgetpos +#define QT_FSETPOS ::fsetpos +#define QT_MMAP ::mmap +#define QT_FPOS_T fpos_t +#define QT_OFF_T long +#endif + +#define QT_STAT_REG S_IFREG +#define QT_STAT_DIR S_IFDIR +#define QT_STAT_MASK S_IFMT +#define QT_STAT_LNK S_IFLNK +#define QT_SOCKET_CONNECT ::connect +#define QT_SOCKET_BIND ::bind +#define QT_FILENO fileno +#define QT_CLOSE ::close +#define QT_READ ::read +#define QT_WRITE ::write +#define QT_ACCESS ::access +#define QT_GETCWD ::getcwd +#define QT_CHDIR ::chdir +#define QT_MKDIR ::mkdir +#define QT_RMDIR ::rmdir +#define QT_OPEN_LARGEFILE O_LARGEFILE +#define QT_OPEN_RDONLY O_RDONLY +#define QT_OPEN_WRONLY O_WRONLY +#define QT_OPEN_RDWR O_RDWR +#define QT_OPEN_CREAT O_CREAT +#define QT_OPEN_TRUNC O_TRUNC +#define QT_OPEN_APPEND O_APPEND +#define QT_OPEN_EXCL O_EXCL + +// Directory iteration +#define QT_DIR DIR + +#define QT_OPENDIR ::opendir +#define QT_CLOSEDIR ::closedir + +#if defined(QT_LARGEFILE_SUPPORT) \ + && defined(QT_USE_XOPEN_LFS_EXTENSIONS) \ + && !defined(QT_NO_READDIR64) +#define QT_DIRENT struct dirent64 +#define QT_READDIR ::readdir64 +#else +#define QT_DIRENT struct dirent +#define QT_READDIR ::readdir +#endif + +#define QT_SOCKET_CONNECT ::connect +#define QT_SOCKET_BIND ::bind + + +#define QT_SIGNAL_RETTYPE void +#define QT_SIGNAL_ARGS int +#define QT_SIGNAL_IGNORE SIG_IGN + +#define QT_SOCKLEN_T socklen_t + +#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) +#define QT_SNPRINTF ::snprintf +#define QT_VSNPRINTF ::vsnprintf +#endif + +#endif // Q_WASM_PLATFORMDEFS_H diff --git a/mkspecs/common/wasm/wasm.conf b/mkspecs/common/wasm/wasm.conf new file mode 100644 index 0000000000..51fa9d7ceb --- /dev/null +++ b/mkspecs/common/wasm/wasm.conf @@ -0,0 +1,85 @@ +# qmake configuration for building with emscripten +MAKEFILE_GENERATOR = UNIX +QMAKE_PLATFORM = wasm unix + +include(../gcc-base.conf) +include(../clang.conf) + +load(device_config) +load(emcc_ver) + +# Support enabling asyncify by configuring with "-device-option QT_EMSCRIPTEN_ASYNCIFY=1" +!isEmpty(QT_EMSCRIPTEN_ASYNCIFY): { + !equals(QT_EMSCRIPTEN_ASYNCIFY, 1):!equals(QT_EMSCRIPTEN_ASYNCIFY, 0): \ + message(Error: The value for QT_EMSCRIPTEN_ASYNCIFY must be 0 or 1) + equals(QT_EMSCRIPTEN_ASYNCIFY, 1): { + QMAKE_CFLAGS += -DQT_HAVE_EMSCRIPTEN_ASYNCIFY + QMAKE_CXXFLAGS += -DQT_HAVE_EMSCRIPTEN_ASYNCIFY + QMAKE_LFLAGS += -s ASYNCIFY + + # Emscripten recommends building with optimizations when using asyncify + # in order to reduce wasm file size, and may also generate broken wasm + # (with "wasm validation error: too many locals" type errors) if optimizations + # are omitted. Enable optimizations also for debug builds. + QMAKE_LFLAGS_DEBUG += -Os + } +} + +# Declare async functions +QMAKE_LFLAGS += -s ASYNCIFY_IMPORTS=qt_asyncify_suspend_js,qt_asyncify_resume_js + +EMCC_COMMON_LFLAGS += \ + -s WASM=1 \ + -s MAX_WEBGL_VERSION=2 \ + -s ERROR_ON_UNDEFINED_SYMBOLS=1 \ + --bind \ + -s FETCH=1 \ + -s MODULARIZE=1 \ + -s WASM_BIGINT=1 \ + -s STACK_SIZE=5MB + +# The -s arguments can also be used with release builds, +# but are here in debug for clarity. +EMCC_COMMON_LFLAGS_DEBUG = \ + $$EMCC_COMMON_LFLAGS \ + # -s LIBRARY_DEBUG=1 \ #print out library calls, verbose + # -s SYSCALL_DEBUG=1 \ #print out sys calls, verbose + # -s FS_LOG=1 \ #print out filesystem ops, verbose + # -s SOCKET_DEBUG \ #print out socket,network data transfer + # -s GL_DEBUG=1 \ + --profiling-funcs + +QMAKE_LFLAGS_DEBUG += -g2 +QMAKE_LFLAGS_RELEASE += -O2 + +QMAKE_COMPILER += emscripten + +QMAKE_CC = emcc +QMAKE_CXX = em++ + +QMAKE_LINK = $$QMAKE_CXX +QMAKE_LINK_SHLIB = $$QMAKE_CXX +QMAKE_LINK_C = $$QMAKE_CC +QMAKE_LINK_C_SHLIB = $$QMAKE_CC + +QMAKE_LIBS_THREAD = $$QMAKE_CFLAGS_THREAD + +QMAKE_LFLAGS += $$EMCC_COMMON_LFLAGS +QMAKE_LFLAGS_DEBUG += $$EMCC_COMMON_LFLAGS_DEBUG + +QMAKE_PREFIX_SHLIB = lib +QMAKE_EXTENSION_SHLIB = so # llvm bitcode, linked to js in post_link +QMAKE_PREFIX_STATICLIB = lib +QMAKE_EXTENSION_STATICLIB = a # llvm bitcode + +QMAKE_AR = emar cqs +equals(QMAKE_HOST.os, Windows) { + QMAKE_RESPONSEFILE_THRESHOLD = 1 + QMAKE_AR_CMD = \ + "$(file >$(OBJECTS_DIR)/$(TARGET).rsp, $(subst \\,/,$(OBJECTS)))$$escape_expand(\\n\\t)" \ + "$(AR) $(DESTDIR)$(TARGET) @$(OBJECTS_DIR)/$(TARGET).rsp" +} + +QMAKE_DISTCLEAN += *.html *.js *.wasm + +load(qt_config) diff --git a/mkspecs/common/winrt_winphone/assets/logo_150x150.png b/mkspecs/common/winrt_winphone/assets/logo_150x150.png Binary files differdeleted file mode 100644 index 069171ca4d..0000000000 --- a/mkspecs/common/winrt_winphone/assets/logo_150x150.png +++ /dev/null diff --git a/mkspecs/common/winrt_winphone/assets/logo_30x30.png b/mkspecs/common/winrt_winphone/assets/logo_30x30.png Binary files differdeleted file mode 100644 index 2acac59e73..0000000000 --- a/mkspecs/common/winrt_winphone/assets/logo_30x30.png +++ /dev/null diff --git a/mkspecs/common/winrt_winphone/assets/logo_310x150.png b/mkspecs/common/winrt_winphone/assets/logo_310x150.png Binary files differdeleted file mode 100644 index 1a79482947..0000000000 --- a/mkspecs/common/winrt_winphone/assets/logo_310x150.png +++ /dev/null diff --git a/mkspecs/common/winrt_winphone/assets/logo_310x310.png b/mkspecs/common/winrt_winphone/assets/logo_310x310.png Binary files differdeleted file mode 100644 index 02144a9f39..0000000000 --- a/mkspecs/common/winrt_winphone/assets/logo_310x310.png +++ /dev/null diff --git a/mkspecs/common/winrt_winphone/assets/logo_44x44.png b/mkspecs/common/winrt_winphone/assets/logo_44x44.png Binary files differdeleted file mode 100644 index 3cc5bec19f..0000000000 --- a/mkspecs/common/winrt_winphone/assets/logo_44x44.png +++ /dev/null diff --git a/mkspecs/common/winrt_winphone/assets/logo_480x800.png b/mkspecs/common/winrt_winphone/assets/logo_480x800.png Binary files differdeleted file mode 100644 index 39a37dac5b..0000000000 --- a/mkspecs/common/winrt_winphone/assets/logo_480x800.png +++ /dev/null diff --git a/mkspecs/common/winrt_winphone/assets/logo_620x300.png b/mkspecs/common/winrt_winphone/assets/logo_620x300.png Binary files differdeleted file mode 100644 index a2be79f5d7..0000000000 --- a/mkspecs/common/winrt_winphone/assets/logo_620x300.png +++ /dev/null diff --git a/mkspecs/common/winrt_winphone/assets/logo_70x70.png b/mkspecs/common/winrt_winphone/assets/logo_70x70.png Binary files differdeleted file mode 100644 index 334b2722b5..0000000000 --- a/mkspecs/common/winrt_winphone/assets/logo_70x70.png +++ /dev/null diff --git a/mkspecs/common/winrt_winphone/assets/logo_71x71.png b/mkspecs/common/winrt_winphone/assets/logo_71x71.png Binary files differdeleted file mode 100644 index 16d0808759..0000000000 --- a/mkspecs/common/winrt_winphone/assets/logo_71x71.png +++ /dev/null diff --git a/mkspecs/common/winrt_winphone/assets/logo_store.png b/mkspecs/common/winrt_winphone/assets/logo_store.png Binary files differdeleted file mode 100644 index 417ccdcb5f..0000000000 --- a/mkspecs/common/winrt_winphone/assets/logo_store.png +++ /dev/null diff --git a/mkspecs/common/winrt_winphone/manifests/10.0/AppxManifest.xml.in b/mkspecs/common/winrt_winphone/manifests/10.0/AppxManifest.xml.in deleted file mode 100644 index 18683e01e3..0000000000 --- a/mkspecs/common/winrt_winphone/manifests/10.0/AppxManifest.xml.in +++ /dev/null @@ -1,51 +0,0 @@ -<?xml version=\"1.0\" encoding=\"utf-8\"?> - -<Package - xmlns=\"http://schemas.microsoft.com/appx/manifest/foundation/windows10\" - xmlns:mp=\"http://schemas.microsoft.com/appx/2014/phone/manifest\" - xmlns:uap=\"http://schemas.microsoft.com/appx/manifest/uap/windows10\" - xmlns:uap3=\"http://schemas.microsoft.com/appx/manifest/uap/windows10/3\" - xmlns:mobile=\"http://schemas.microsoft.com/appx/manifest/mobile/windows10\" - IgnorableNamespaces=\"uap uap3 mp mobile\"> - - <Identity - Name=\"$${WINRT_MANIFEST.identity}\" - Publisher=\"$${WINRT_MANIFEST.publisherid}\" - Version=\"$${WINRT_MANIFEST.version}\" - ProcessorArchitecture=\"$${WINRT_MANIFEST.architecture}\" /> - - <mp:PhoneIdentity PhoneProductId=\"$${WINRT_MANIFEST.identity}\" PhonePublisherId=\"$${WINRT_MANIFEST.phone_publisher_id}\"/> - - <Properties> - <DisplayName>$${WINRT_MANIFEST.name}</DisplayName> - <PublisherDisplayName>$${WINRT_MANIFEST.publisher}</PublisherDisplayName> - <Logo>$${WINRT_MANIFEST.logo_store}</Logo> - </Properties> - - <Dependencies> - <TargetDeviceFamily Name=\"Windows.Universal\" - MinVersion=\"$${WINRT_MANIFEST.minVersion}\" - MaxVersionTested=\"$${WINRT_MANIFEST.maxVersionTested}\" />$${WINRT_MANIFEST.dependencies} - </Dependencies> - - <Resources> - <Resource Language=\"en\"/> - </Resources> - - <Applications> - <Application Id=\"App\" - Executable=\"$${WINRT_MANIFEST.target}.exe\" - EntryPoint=\"$${WINRT_MANIFEST.target}.App\"> - <uap:VisualElements - DisplayName=\"$${WINRT_MANIFEST.name}\" - Description=\"$${WINRT_MANIFEST.description}\" - BackgroundColor=\"$${WINRT_MANIFEST.background}\" - Square150x150Logo=\"$${WINRT_MANIFEST.logo_150x150}\" - Square44x44Logo=\"$${WINRT_MANIFEST.logo_44x44}\"> - - <uap:SplashScreen Image=\"$${WINRT_MANIFEST.logo_620x300}\" /> - </uap:VisualElements> - </Application> - </Applications> - $${WINRT_MANIFEST.capabilities} -</Package> diff --git a/mkspecs/common/winrt_winphone/qmake.conf b/mkspecs/common/winrt_winphone/qmake.conf deleted file mode 100644 index e683018a81..0000000000 --- a/mkspecs/common/winrt_winphone/qmake.conf +++ /dev/null @@ -1,105 +0,0 @@ -# -# qmake configuration for winrt and windows phone 8.1 -# -# Written for Microsoft Visual C++ -# - -MAKEFILE_GENERATOR = MSBUILD -QMAKE_COMPILER = msvc -QMAKE_PLATFORM = winrt win32 -CONFIG = package_manifest $$CONFIG incremental flat precompile_header autogen_precompile_source debug_and_release debug_and_release_target rtti -# MSVC 2017 15.8+ fixed std::aligned_storage but compilation fails without -# _ENABLE_EXTENDED_ALIGNED_STORAGE flag since the fix breaks binary compatibility. -DEFINES += UNICODE WIN32 QT_LARGEFILE_SUPPORT Q_BYTE_ORDER=Q_LITTLE_ENDIAN _ENABLE_EXTENDED_ALIGNED_STORAGE -DEFINES_RELEASE += NDEBUG -QMAKE_COMPILER_DEFINES += _WIN32 - -DEPLOYMENT_PLUGIN += qwinrt - -QMAKE_CC = cl -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = bison -y -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -nologo -QMAKE_CFLAGS_WARN_ON = -W3 -QMAKE_CFLAGS_WARN_OFF = -W0 -QMAKE_CFLAGS_RELEASE = -O2 -MD -QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MD -Zi -QMAKE_CFLAGS_DEBUG = -Zi -MDd -QMAKE_CFLAGS_YACC = -QMAKE_CFLAGS_LTCG = -GL -QMAKE_CFLAGS_MP = -MP -QMAKE_CFLAGS_SSE2 = -arch:SSE2 -QMAKE_CFLAGS_SSE3 = -arch:SSE2 -QMAKE_CFLAGS_SSSE3 = -arch:SSE2 -QMAKE_CFLAGS_SSE4_1 = -arch:SSE2 -QMAKE_CFLAGS_SSE4_2 = -arch:SSE2 -QMAKE_CFLAGS_AVX = -arch:AVX -QMAKE_CFLAGS_AVX2 = -arch:AVX -QMAKE_CFLAGS_AESNI = -arch:SSE2 -QMAKE_CFLAGS_SHANI = -arch:SSE2 - -QMAKE_CXX = $$QMAKE_CC -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -w34100 -w34189 -w44996 -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_LTCG = $$QMAKE_CFLAGS_LTCG -QMAKE_CXXFLAGS_MP = $$QMAKE_CFLAGS_MP -QMAKE_CXXFLAGS_STL_ON = -EHsc -QMAKE_CXXFLAGS_STL_OFF = -QMAKE_CXXFLAGS_RTTI_ON = -GR -QMAKE_CXXFLAGS_RTTI_OFF = -QMAKE_CXXFLAGS_EXCEPTIONS_ON = -EHsc -QMAKE_CXXFLAGS_EXCEPTIONS_OFF = /wd4530 /wd4577 - -QMAKE_INCDIR = - -QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$obj $src -QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ $< -QMAKE_RUN_CC_IMP_BATCH = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ @<< -QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$obj $src -QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ $< -QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<< - -QMAKE_LINK = link -QMAKE_LFLAGS = /NOLOGO /DYNAMICBASE /NXCOMPAT /NODEFAULTLIB:ole32.lib /APPCONTAINER -QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO -QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = /DEBUG /OPT:REF /INCREMENTAL:NO -QMAKE_LFLAGS_DEBUG = /DEBUG -QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS -QMAKE_LFLAGS_EXE = /MANIFEST:NO -QMAKE_LFLAGS_DLL = /MANIFEST:NO /DLL -QMAKE_LFLAGS_LTCG = /LTCG -QMAKE_PREFIX_SHLIB = -QMAKE_EXTENSION_SHLIB = dll -QMAKE_PREFIX_STATICLIB = -QMAKE_EXTENSION_STATICLIB = lib - -QMAKE_LIBS += runtimeobject.lib -QMAKE_LIBS_GUI = -QMAKE_LIBS_NETWORK += ws2_32.lib - -QMAKE_LIBS_QT_ENTRY = -lqtmain - -QMAKE_IDL = midl -QMAKE_LIB = lib /NOLOGO -QMAKE_RC = rc - -VCPROJ_EXTENSION = .vcxproj -VCSOLUTION_EXTENSION = .sln -VCPROJ_KEYWORD = Qt4VSv1.0 -WINRT_ASSETS_PATH = $$PWD/assets - -WINRT_MANIFEST.capabilities = defaults -WINRT_MANIFEST.capabilities_device = defaults - -WINDOWS_TARGET_PLATFORM_VERSION = $$(UCRTVERSION) - -include(../angle.conf) - -load(qt_config) diff --git a/mkspecs/common/winrt_winphone/qplatformdefs.h b/mkspecs/common/winrt_winphone/qplatformdefs.h deleted file mode 100644 index c561e41668..0000000000 --- a/mkspecs/common/winrt_winphone/qplatformdefs.h +++ /dev/null @@ -1,139 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the qmake spec of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QPLATFORMDEFS_H -#define QPLATFORMDEFS_H - -#ifdef UNICODE -#ifndef _UNICODE -#define _UNICODE -#endif -#endif - -// Get Qt defines/settings - -#include "qglobal.h" -#include "qfunctions_winrt.h" - -#define _POSIX_ -#include <limits.h> -#undef _POSIX_ - -#include <tchar.h> -#include <io.h> -#include <direct.h> -#include <stdio.h> -#include <fcntl.h> -#include <errno.h> -#include <sys/stat.h> -#include <stdlib.h> - -#ifdef QT_LARGEFILE_SUPPORT -#define QT_STATBUF struct _stati64 // non-ANSI defs -#define QT_STATBUF4TSTAT struct _stati64 // non-ANSI defs -#define QT_STAT ::_stati64 -#define QT_FSTAT ::_fstati64 -#else -#define QT_STATBUF struct _stat // non-ANSI defs -#define QT_STATBUF4TSTAT struct _stat // non-ANSI defs -#define QT_STAT ::_stat -#define QT_FSTAT ::_fstat -#endif -#define QT_STAT_REG _S_IFREG -#define QT_STAT_DIR _S_IFDIR -#define QT_STAT_MASK _S_IFMT -#if defined(_S_IFLNK) -# define QT_STAT_LNK _S_IFLNK -#endif -#define QT_FILENO _fileno -#define QT_OPEN ::_open -#define QT_CLOSE ::_close -#ifdef QT_LARGEFILE_SUPPORT -#define QT_LSEEK ::_lseeki64 -#define QT_TSTAT ::_tstati64 -#else -#define QT_LSEEK ::_lseek -#define QT_TSTAT ::_tstat -#endif -#define QT_READ ::_read -#define QT_WRITE ::_write -#define QT_ACCESS ::_access -#define QT_GETCWD ::_getcwd -#define QT_CHDIR ::_chdir -#define QT_MKDIR ::_mkdir -#define QT_RMDIR ::_rmdir -#define QT_OPEN_LARGEFILE 0 -#define QT_OPEN_RDONLY _O_RDONLY -#define QT_OPEN_WRONLY _O_WRONLY -#define QT_OPEN_RDWR _O_RDWR -#define QT_OPEN_CREAT _O_CREAT -#define QT_OPEN_TRUNC _O_TRUNC -#define QT_OPEN_APPEND _O_APPEND -#if defined(O_TEXT) -# define QT_OPEN_TEXT _O_TEXT -# define QT_OPEN_BINARY _O_BINARY -#endif - -#include "../common/c89/qplatformdefs.h" - -#ifdef QT_LARGEFILE_SUPPORT -#undef QT_FSEEK -#undef QT_FTELL -#undef QT_OFF_T - -#define QT_FSEEK ::_fseeki64 -#define QT_FTELL ::_ftelli64 -#define QT_OFF_T __int64 -#endif - -#define QT_SIGNAL_ARGS int - -#define QT_VSNPRINTF(buffer, count, format, arg) \ - vsnprintf_s(buffer, count, count-1, format, arg) - -#define QT_SNPRINTF ::_snprintf - -# define F_OK 0 -# define X_OK 1 -# define W_OK 2 -# define R_OK 4 - -typedef int mode_t; - -#endif // QPLATFORMDEFS_H |