2013-03-07 11:18:38 +01:00
|
|
|
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 <thomas.petazzoni@free-electrons.com>
|
|
|
|
|
|
|
|
Index: b/mkspecs/devices/linux-buildroot-g++/qmake.conf
|
|
|
|
===================================================================
|
|
|
|
--- /dev/null
|
|
|
|
+++ b/mkspecs/devices/linux-buildroot-g++/qmake.conf
|
2014-09-16 14:58:18 +02:00
|
|
|
@@ -0,0 +1,16 @@
|
2013-11-20 13:17:41 +01:00
|
|
|
+include(../common/linux_device_pre.conf)
|
2013-03-07 11:18:38 +01:00
|
|
|
+
|
2014-09-16 14:58:18 +02:00
|
|
|
+# modifications to g++-unix.conf
|
|
|
|
+QMAKE_CC = $${BR_CCACHE} $${CROSS_COMPILE}gcc
|
|
|
|
+QMAKE_CXX = $${BR_CCACHE} $${CROSS_COMPILE}g++
|
|
|
|
+
|
2013-03-07 11:18:38 +01:00
|
|
|
+#modifications to gcc-base.conf
|
2014-02-04 15:10:03 +01:00
|
|
|
+QMAKE_CFLAGS += $${BR_COMPILER_CFLAGS}
|
|
|
|
+QMAKE_CXXFLAGS += $${BR_COMPILER_CXXFLAGS}
|
2013-03-07 11:18:38 +01:00
|
|
|
+QMAKE_CXXFLAGS_RELEASE += -O3
|
2014-05-29 09:31:57 +02:00
|
|
|
+CONFIG += nostrip
|
2013-03-07 11:18:38 +01:00
|
|
|
+
|
|
|
|
+QMAKE_LIBS += -lrt -lpthread -ldl
|
|
|
|
+
|
2013-11-20 13:17:41 +01:00
|
|
|
+include(../common/linux_device_post.conf)
|
2013-03-07 11:18:38 +01:00
|
|
|
+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"
|