gcc fails to cross compile Qt
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gcc-4.4-armel-cross (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
gcc-4.5-armel-cross (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Building fails when cross compiling building embedded Qt (not for X11). After a little while the compilation stops with the message:
{standard input}: Assembler messages:
{standard input}:26712: Error: selected processor does not support Thumb mode `swp r3,r2,[r1]'
The error occurs on arm-linux-
Host system is Maverick, amd64. The bug has been confimed on g++-4.4-
Steps to reproduce the bug:
*) Please note the attached patch is for configuring Qt to use the Ubuntu armel-cross compiler instead of using the code sourcery compiler.
$ git clone git://gitorious
Topmost commit is currently: caca740ea121922
$ cd qt
$ git apply ../ubuntu-
$ cd ..
$ mkdir qt-build
$ cd qt-build
$ ../qt/configure \
-opensource \
-confirm-
-hostprefix `pwd`/qt-bin \
-prefix /opt/qt \
-fast \
-embedded arm \
-little-endian \
-platform linux-g++ \
-xplatform qws/linux-
-arch arm \
-no-openssl \
-no-cups \
-no-largefile \
-no-qt3support \
-no-webkit \
-no-libmng \
-no-libjpeg \
-no-libtiff \
-no-gif \
-no-script \
-no-scripttools \
-no-sql-sqlite \
-no-
-no-multimedia \
-no-nis \
-qt-mouse-pc \
-plugin-
-exceptions \
-xmlpatterns \
-nomake demos \
-nomake examples \
-nomake docs \
-nomake translations \
-D QT_NO_QWS_CURSOR \
-D QT_QWS_CLIENTBLIT
$ make
...
arm-linux-
{standard input}: Assembler messages:
{standard input}:26712: Error: selected processor does not support Thumb mode `swp r3,r2,[r1]'
make[1]: *** [.obj/release-
make[1]: Leaving directory `/home/
make: *** [sub-corelib-
tags: | added: patch |
Changed in gcc-4.4-armel-cross (Ubuntu): | |
status: | New → Confirmed |
Changed in gcc-4.5-armel-cross (Ubuntu): | |
status: | New → Confirmed |
OK, discussed it with people.
Problem lies in Qt which does not have proper support for Thumb2 instruction set which is used by default. Please add "-marm" into CFLAGS/CXXFLAGS to force normal ARM instruction set - should work.