Skip to content

Instantly share code, notes, and snippets.

@cyberbobs
Last active August 29, 2015 14:04
Show Gist options
  • Save cyberbobs/dc0472d78db030434996 to your computer and use it in GitHub Desktop.
Save cyberbobs/dc0472d78db030434996 to your computer and use it in GitHub Desktop.
Compiling host Qt 5.2.1 for Yocto + SABRE (qtbase/mkspecs/devices/linux-imx6-g++/qmake.conf)
#
# qmake configuration for the Freescale iMX6 boards (single, dual and quad)
#
# This mkspec is based and tested on the ltib-source-release 3.0.15
# Building ltib including glib, gpu-drivers and what ever you want to use (e.g. dbus or fontconfig)
# This mkspec is tested with a framebuffer (eglfs) configuration (not testes with X11)
# A typical configure line looks like:
# /home/tsenyk/qt5/qt5/configure -opensource -confirm-license -make libs -device imx6 \
# -device-option CROSS_COMPILE=/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi- \
# -sysroot <path-to-your-ltib-install>/rootfs -no-gcc-sysroot \
# -prefix /usr/local/Qt-5.0.0/Qt5-imx6-1
#
# NOTE: currently ltib doesn't produce a proper staging/sysroot-filessystem.
# If gcc's --sysroot is used, the toolchain doesn't find basic binaries (e.g. crt1.o),
# therefore you have to pass -no-gcc-sysroot to configure if you pass -sysroot to configure!
include(../common/linux_device_pre.conf)
EGLFS_PLATFORM_HOOKS_SOURCES = $$PWD/qeglfshooks_imx6.cpp
DISTRO_OPTS += hard-float
QMAKE_INCDIR += $$[QT_SYSROOT]/usr/include
QMAKE_LIBDIR += $$[QT_SYSROOT]/usr/lib
QMAKE_LIBS_EGL += -lEGL
QMAKE_LIBS_OPENGL_ES2 += -lGLESv2 -lEGL -lGAL
QMAKE_LIBS_OPENVG += -lOpenVG -lEGL -lGAL
QMAKE_LFLAGS += -Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib
IMX6_CFLAGS = -march=armv7-a -mfpu=neon -DLINUX=1 -DEGL_API_FB=1
IMX6_CFLAGS_RELEASE = -O2 $$IMX6_CFLAGS
QMAKE_CFLAGS_RELEASE += $$IMX6_CFLAGS_RELEASE
QMAKE_CXXFLAGS_RELEASE += $$IMX6_CFLAGS_RELEASE
QMAKE_CFLAGS_DEBUG += $$IMX6_CFLAGS
QMAKE_CXXFLAGS_DEBUG += $$IMX6_CFLAGS
include(../common/linux_arm_device_post.conf)
load(qt_config)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment