[Interest] Cannot configure Qt 5.3.x and 5.4.0 for arm cross-compile
Константин Уткин
kostaui at mail.ru
Fri Dec 12 13:07:36 CET 2014
Greetings!
I'm using Qt on embedded arm platform. I have working configuration for building Qt-5.2.1:
#
# qmake configuration for building with arm-linux-gnueabi-g++
#
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental gdb_dwarf_index
QMAKE_INCREMENTAL_STYLE = sublib
include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)
QT_QPA_DEFAULT_PLATFORM = eglfs
# modifications to g++.conf
QMAKE_CC = $${CROSS_COMPILE}gcc
QMAKE_CXX = $${CROSS_COMPILE}g++
QMAKE_LINK = $${QMAKE_CXX}
QMAKE_LINK_SHLIB = $${QMAKE_CXX}
QMAKE_CFLAGS += -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -fno-strict-aliasing
QMAKE_CXXFLAGS += $$QMAKE_CFLAGS
QMAKE_LIBDIR += /home/uki/tslib-master/src/.libs/\
/usr/local/lib/
QMAKE_INCDIR += /home/uki/tslib-master/src/
QMAKE_LIBS += -licui18n -licuuc -licudata
QMAKE_INCDIR_OPENGL_ES2 = /media/Work1/dvsdk/graphics-sdk_4.03.00.02/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/Include
QMAKE_INCDIR_OPENGL = $$QMAKE_INCDIR_OPENGL_ES2
QMAKE_INCDIR_X11 = /usr/include/
QMAKE_LIBDIR_OPENGL_ES2 = /media/Work1/dvsdk/graphics-sdk_4.03.00.02/gfx_rel_es2.x
QMAKE_LIBDIR_OPENGL = $$QMAKE_LIBDIR_OPENGL_ES2
QMAKE_LIBDIR_X11 = /usr/local/lib/
QMAKE_INCDIR_EGL = $$QMAKE_INCDIR_OPENGL
QMAKE_LIBDIR_EGL = $$QMAKE_LIBDIR_OPENGL
QMAKE_LIBS_EGL = -lEGL -lIMGegl -lsrv_um
QMAKE_LIBS_OPENGL_ES2 = -lGLESv2 $$QMAKE_LIBS_EGL
QMAKE_LIBS_LIBUDEV = -ludev
# modifications to linux.conf
QMAKE_AR = $${CROSS_COMPILE}ar cqs
QMAKE_OBJCOPY = $${CROSS_COMPILE}objcopy
QMAKE_NM = $${CROSS_COMPILE}nm -P
QMAKE_STRIP = $${CROSS_COMPILE}strip
load(qt_config)
And my configuration script (running on Ubuntu 10.04 LTS 32bit):
./configure -prefix /opt/qt-5.2.1/ -xplatform linux-arm-gnueabi-g++ -release -opensource -confirm-license \
-make libs -nomake examples -nomake tests -no-c++11 -shared -accessibility -no-pch -no-largefile \
-qpa eglfs -eglfs -linuxfb -no-audio-backend -sysroot /media/home/root/ubi \
-qt-zlib -qt-libjpeg -qt-libpng -qt-freetype -qt-pcre -opengl es2 -verbose \
-nis -no-cups -no-dbus -no-avx -no-glib -tslib -icu \
-I /home/uki/icu-cross/source/common/ -I /home/uki/icu-cross/source/i18n/ -I /home/uki/icu-cross/source/io/ \
-L /home/uki/icu-cross/source/lib
Unfortunately, I cannot apply this configuration for Qt 5.3.x and 5.4.0 versions.
There is some errors on configuration stage (looks like wrong toolchain selection)
Determining architecture... ()
g++ -c -pipe -pipe -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -fno-strict-aliasing --sysroot=/media/home/root/ubi -g -Wall -W -fPIE -I../../mkspecs/linux-arm-gnueabi-g++ -I. -I../../../../icu-cross/source/common -I../../../../icu-cross/source/i18n -I../../../../icu-cross/source/io -I../../../../tslib-master/src -o arch.o arch.cpp
cc1plus: error: unrecognized command line option "-mfpu=neon"
cc1plus: error: unrecognized command line option "-mfloat-abi=softfp"
arch.cpp:1: error: bad value (armv7-a) for -march= switch
arch.cpp:1: error: bad value (cortex-a8) for -mtune= switch
make: *** [arch.o] Error 1
Unable to determine architecture!
Full config log:
http://pastebin.com/L1umH47v
Adding ' - device - option CROSS_COMPILE =' option does not change nothing: there is already correct CROSS_COMPILE path variable in environment.
So I'm wondering, what should I need to change in configuration to cross-compile Qt 5.3.x and higher...
Best regards,
Konstantin Utkin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20141212/4b03eec7/attachment.html>
More information about the Interest
mailing list