Add a Buildroot 'device' to ease cross-compilation Qt5 has a mechanism to support "device" profiles, so that people can specify the compiler, compiler flags and so on for a specific device. We leverage this mechanism in the Buildroot packaging of qt5 to simplify cross-compilation: we have our own "device" definition, which allows us to easily pass the cross-compiler paths and flags from our qt5.mk. Signed-off-by: Thomas Petazzoni Index: b/mkspecs/devices/linux-buildroot-g++/qmake.conf =================================================================== --- /dev/null +++ b/mkspecs/devices/linux-buildroot-g++/qmake.conf @@ -0,0 +1,11 @@ +include(../common/linux_device_pre.conf) + +#modifications to gcc-base.conf +QMAKE_CFLAGS += $${BR_COMPILER_CFLAGS} +QMAKE_CXXFLAGS += $${BR_COMPILER_CXXFLAGS} +QMAKE_CXXFLAGS_RELEASE += -O3 + +QMAKE_LIBS += -lrt -lpthread -ldl + +include(../common/linux_device_post.conf) +load(qt_config) Index: b/mkspecs/devices/linux-buildroot-g++/qplatformdefs.h =================================================================== --- /dev/null +++ b/mkspecs/devices/linux-buildroot-g++/qplatformdefs.h @@ -0,0 +1 @@ +#include "../../linux-g++/qplatformdefs.h"