diff options
author | Umair Raihan <umair.raihan@qt.io> | 2022-07-11 17:41:19 +0300 |
---|---|---|
committer | Umair Raihan <umair.raihan@qt.io> | 2022-07-14 15:09:34 +0300 |
commit | 55dd9439961b21f9b4929a80dbccfffc647678b3 (patch) | |
tree | cf64773c83b9b8a56d221d73922495e06482fdb2 /mkspecs | |
parent | 6767ac20c972f0f2654076c22826c392e698edfc (diff) |
Add new mkspecs device for Raspberry Pi 4 (64-bit)
The existing mkspecs for Raspberry Pi 4 (devices/linux-rasp-pi4-v3d-g++) was intended to compile Qt application for the 32-bit version of Raspberry Pi, thus it used compiler flags that are incompatible when compiling Qt application for the ARM 64-bit architecture. According to ARM compiler documentation, -mfpu flag is rejected by AArch64 state while its alternative, -mcpu, has to be avoided when -march flag is already defined. -mfloat-abi flag is not valid with AArch64 targets.
To support both 64-bit and 32-bit architectures, I proposed to add this new mkspecs.
See:
https://developer.arm.com/documentation/101754/0618/armclang-Reference/armclang-Command-line-Options/-mfpu
https://developer.arm.com/documentation/101754/0618/armclang-Reference/armclang-Command-line-Options/-mfloat-abi
Pick-to: 6.3 6.4
Change-Id: I36574875e798281688601edd0f166922592d9830
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'mkspecs')
-rw-r--r-- | mkspecs/devices/linux-rasp-pi4-aarch64/qmake.conf | 25 | ||||
-rw-r--r-- | mkspecs/devices/linux-rasp-pi4-aarch64/qplatformdefs.h | 8 |
2 files changed, 33 insertions, 0 deletions
diff --git a/mkspecs/devices/linux-rasp-pi4-aarch64/qmake.conf b/mkspecs/devices/linux-rasp-pi4-aarch64/qmake.conf new file mode 100644 index 0000000000..9903775883 --- /dev/null +++ b/mkspecs/devices/linux-rasp-pi4-aarch64/qmake.conf @@ -0,0 +1,25 @@ +# +# Generic qmake configuration for building with g++ on Raspberry Pi 4 (64-bit). +# +# Tested with Raspberry Pi OS 64-bit and aarch64 gcc compiler from Debian package repository +# +# A minimal configure line could look something like this: +# ./configure -release -opengl es2 -device linux-rasp-pi4-aarch64 -device-option CROSS_COMPILE=aarch64-linux-gnu- -sysroot ~/rpi-sysroot -prefix /usr/local/qt6 -extprefix $HOME/qt-raspi + +DISTRO_OPTS += deb-multi-arch + +include(../common/linux_device_pre.conf) + +QMAKE_LIBS_EGL += -lEGL +QMAKE_LIBS_OPENGL_ES2 += -lGLESv2 -lEGL + +QMAKE_CFLAGS += -march=armv8-a +QMAKE_CXXFLAGS += $$QMAKE_CFLAGS + +EGLFS_DEVICE_INTEGRATION = eglfs_kms + +LINKER_FLAGS += -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed + +include(../common/linux_device_post.conf) + +load(qt_config) diff --git a/mkspecs/devices/linux-rasp-pi4-aarch64/qplatformdefs.h b/mkspecs/devices/linux-rasp-pi4-aarch64/qplatformdefs.h new file mode 100644 index 0000000000..3fe85b661c --- /dev/null +++ b/mkspecs/devices/linux-rasp-pi4-aarch64/qplatformdefs.h @@ -0,0 +1,8 @@ +/**************************************************************************** +** +** Copyright (C) 2022 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 "../../linux-g++/qplatformdefs.h" |