qt5base-lts/mkspecs/devices/linux-rasp-pi4-aarch64/qmake.conf
Umair Raihan 55dd943996 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>
2022-07-14 15:09:34 +03:00

26 lines
829 B
Plaintext

#
# 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)