qt5base-0002-mkspecs-files.patch 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  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,11 @@
  14. +include(../common/linux_device_pre.conf)
  15. +
  16. +#modifications to gcc-base.conf
  17. +QMAKE_CFLAGS += $${BUILDROOT_COMPILER_CFLAGS}
  18. +QMAKE_CXXFLAGS += $${BUILDROOT_COMPILER_CXXFLAGS}
  19. +QMAKE_CXXFLAGS_RELEASE += -O3
  20. +
  21. +QMAKE_LIBS += -lrt -lpthread -ldl
  22. +
  23. +include(../common/linux_device_post.conf)
  24. +load(qt_config)
  25. Index: b/mkspecs/devices/linux-buildroot-g++/qplatformdefs.h
  26. ===================================================================
  27. --- /dev/null
  28. +++ b/mkspecs/devices/linux-buildroot-g++/qplatformdefs.h
  29. @@ -0,0 +1 @@
  30. +#include "../../linux-g++/qplatformdefs.h"