diff options
Diffstat (limited to 'mkspecs/common')
25 files changed, 319 insertions, 492 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 2bd59410d4..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 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 dad15a22a8..6eb08a9d2f 100644 --- a/mkspecs/common/clang.conf +++ b/mkspecs/common/clang.conf @@ -35,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 = 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/gcc-base.conf b/mkspecs/common/gcc-base.conf index 1c27f34441..ae58326289 100644 --- a/mkspecs/common/gcc-base.conf +++ b/mkspecs/common/gcc-base.conf @@ -45,7 +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_APP += QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden QMAKE_CFLAGS_EXCEPTIONS_OFF += -fno-exceptions 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/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 b5427dd88c..71295a4055 100644 --- a/mkspecs/common/macx.conf +++ b/mkspecs/common/macx.conf @@ -5,12 +5,6 @@ QMAKE_PLATFORM += macos osx macx QMAKE_MAC_SDK = macosx -QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.14 - -QT_MAC_SDK_VERSION_MIN = 10.15 - -QT_MAC_SDK_VERSION_MAX = 12 - device.sdk = macosx device.target = device device.dir_affix = $${device.sdk} diff --git a/mkspecs/common/msvc-version.conf b/mkspecs/common/msvc-version.conf index 59fc0769a5..303b341e9d 100644 --- a/mkspecs/common/msvc-version.conf +++ b/mkspecs/common/msvc-version.conf @@ -120,6 +120,7 @@ greaterThan(QMAKE_MSC_VER, 1919) { MSVC_VER = 16.0 MSVC_TOOLSET_VER = 142 QMAKE_CXXFLAGS_CXX2A = -std:c++latest + QMAKE_CXXFLAGS_CXX2B = -std:c++latest QMAKE_CXXFLAGS += -Zc:externConstexpr } @@ -131,6 +132,14 @@ greaterThan(QMAKE_MSC_VER, 1927) { 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 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/qnx/qplatformdefs.h b/mkspecs/common/qnx/qplatformdefs.h index 1db1197afd..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 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/uikit.conf b/mkspecs/common/uikit.conf index 0388b8e616..8419506f09 100644 --- a/mkspecs/common/uikit.conf +++ b/mkspecs/common/uikit.conf @@ -3,7 +3,7 @@ # QMAKE_PLATFORM += uikit -CONFIG += bitcode reduce_exports shallow_bundle no_qt_rpath +CONFIG += reduce_exports shallow_bundle no_qt_rpath INCLUDEPATH += $$PWD/uikit 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..2a5ea23145 --- /dev/null +++ b/mkspecs/common/wasm/wasm.conf @@ -0,0 +1,86 @@ +# 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 DEMANGLE_SUPPORT=1 \ + # -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) |