1 Add a Buildroot 'device' to ease cross-compilation
3 Qt5 has a mechanism to support "device" profiles, so that people can
4 specify the compiler, compiler flags and so on for a specific device.
6 We leverage this mechanism in the Buildroot packaging of qt5 to
7 simplify cross-compilation: we have our own "device" definition, which
8 allows us to easily pass the cross-compiler paths and flags from our
11 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
13 Index: b/mkspecs/devices/linux-buildroot-g++/qmake.conf
14 ===================================================================
16 +++ b/mkspecs/devices/linux-buildroot-g++/qmake.conf
18 +include(../common/linux_device_pre.conf)
20 +# modifications to g++-unix.conf
21 +QMAKE_CC = $${BR_CCACHE} $${CROSS_COMPILE}gcc
22 +QMAKE_CXX = $${BR_CCACHE} $${CROSS_COMPILE}g++
24 +#modifications to gcc-base.conf
25 +QMAKE_CFLAGS += $${BR_COMPILER_CFLAGS}
26 +QMAKE_CXXFLAGS += $${BR_COMPILER_CXXFLAGS}
27 +QMAKE_CXXFLAGS_RELEASE += -O3
30 +QMAKE_LIBS += -lrt -lpthread -ldl
32 +include(../common/linux_device_post.conf)
34 Index: b/mkspecs/devices/linux-buildroot-g++/qplatformdefs.h
35 ===================================================================
37 +++ b/mkspecs/devices/linux-buildroot-g++/qplatformdefs.h
39 +#include "../../linux-g++/qplatformdefs.h"