0002-mkspecs-files.patch 1.4 KB

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