Qt 6.8.3 with BlackBerry 10 (QNX 8 / ARMv7) patches
 
 
 
 
 
 
Go to file
Giuseppe D'Angelo 9ff1e6d80b Add hardening build options
This commit enables hardened-specific checks and codegen, inspired by
GCC 14's -fhardened command line switch and LLVM/libc++'s hardened
modes.

We enable (depending on compiler capabilities):

* -ftrivial-auto-var-init=pattern;
* -fstack-protector-strong;
* -fstack-clash-protection;
* -fcf-protection=full or /CETCOMPAT;
* -D_FORTIFY_SOURCE=3 or 2 on Glibc, depending on the Glibc version,
  provided that some optimization level is enabled (release build or
  optimized debug build);
* on libstdc++, -D_GLIBCXX_ASSERTIONS;
* on libc++, -D_LIBCPP_HARDENING_MODE set to
  _LIBCPP_HARDENING_MODE_EXTENSIVE in debug and to
  _LIBCPP_HARDENING_MODE_FAST in release (_DEBUG is too slow);
* -Wl,-z,relro,-z,now.

This aligns us 100% with -fhardened (we already pass -fPIE and -pie
anyhow). Some Linux distributions already ship GCC/Clang with some of
these options enabled by default.

The check for Intel CET has been amended to always test if the compiler
supports the corresponding flag; and, if so, enable the feature. Before,
it was behind a configure option and the test only checked if the
compiler had CET support automatically active (the test didn't pass
-fcf-protection to the compiler).

The check for -fstack-protector-strong has been made general (rather
than QNX-specific). We don't support QNX < 7 anyhow.

Finally, the qt_config_linker_supports_flag_test test has been
amended to also support MSVC.

All of the hardening options are enabled by default.

[ChangeLog][Build System] Qt builds by default in "hardened mode",
meaning that a series of security-related compiler options are
automatically enabled. In the unlikely case in which these options
constitute an unacceptable performance hit, it is possible to disable
individual hardening options when configuring Qt.

Change-Id: I2c026b0438010ad10d5e7b1136fedf4ae3af8822
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-03-19 02:52:43 +01:00
.github/workflows Repair github action workflow 2021-11-10 18:57:33 +01:00
LICENSES Use canonical capitalization of Unicode-3.0 SPDX tag 2024-03-13 14:43:10 +00:00
bin cmake: Override generator for iOS projects to Xcode in qt-cmake.in 2024-03-18 22:34:48 +01:00
cmake Add hardening build options 2024-03-19 02:52:43 +01:00
coin coin: Add instructions to build standalone examples 2024-03-14 11:44:16 +01:00
config.tests Correct license in config.test 2024-02-20 16:22:28 +01:00
dist Remove dist/README 2024-02-29 15:35:57 +01:00
doc Bump Android platform version in documentation to 34 2024-03-08 11:46:58 +02:00
examples CMake: Allow building all examples as standalone just like tests 2024-03-14 11:44:16 +01:00
lib Purge all fonts 2015-08-18 19:59:14 +00:00
libexec CMake: Allow building all examples as standalone just like tests 2024-03-14 11:44:16 +01:00
mkspecs cmake: Propagate Apple platform build requirements to qconfig.pri 2024-03-14 14:50:36 +01:00
qmake Port to QDirListing 2024-03-03 14:02:07 +02:00
src iOS: Remove NSView.safeAreaInsets wrapper 2024-03-19 01:52:29 +01:00
tests QSignalSpy: fix data race between wait() and emit from another thread 2024-03-19 00:55:15 +01:00
util cmake: Rename QT_UIKIT_SDK to QT_APPLE_SDK 2024-03-18 19:04:14 +01:00
.cmake.conf Remove year from generic Qt copyright information 2024-02-14 09:30:07 +00:00
.gitattributes Give batch files CRLF line endings 2020-11-04 15:02:29 +00:00
.gitignore Git ignore Visual Studio CMake build directories 2023-11-24 23:42:05 +01:00
.lgtm.yml Skip LGTM analysis for the bootstrap library and tools 2020-07-16 01:04:34 +02:00
.tag
CMakeLists.txt CMake: Move most of CMakeLists.txt into QtBaseHelpers.cmake 2024-03-14 11:44:16 +01:00
config_help.txt Add hardening build options 2024-03-19 02:52:43 +01:00
configure Change configure license 2024-02-02 15:23:02 +00:00
configure.bat configure.bat: Fix errors on Windows 2024-03-05 11:56:24 +01:00
configure.cmake Add hardening build options 2024-03-19 02:52:43 +01:00
dependencies.yaml Re-add dependencies.yaml now that qt5.git wip/qt6 builds fine 2019-09-18 13:19:31 +02:00
licenseRule.json Add a licenseRule.json file for checking of SPDX license identifiers 2024-03-07 11:08:18 +01:00
qt_cmdline.cmake Add hardening build options 2024-03-19 02:52:43 +01:00