march=armv4t unknown switch

Aung
Dear all friends,

When I try to compile Qt 4.7 on my host Ubuntu 10.10

Configure OK.
When make, it gives 
-march=armv4t unknown switch

I already did all necessary edit.
When I remove -march & -mtune switch, all is OK.

But compile results ARMV5T architecture & give segmentation fault.

Plz help me
With Thanks

davef
Just had another try at cross-compiling 4.7.2

First are you just doing 4.7?  Why not 4.7.2?

Better shows us your qmake.conf and your complete ./configure command.

Which cross-compiler are you using and you have exported the path to it?

davef
Let's backup a bit . . .

are you compiling the X11 version or cross-compiling the Qt/embedded
version?

Note:  even those two files on the download site at Nokia have the same
name and are the same size they are two quite different files.

The first file is for your desktop (X11) installation and the second
(Qt/embedded Linux) has to be cross-compiled for use on the target.

Aung
I also try with Qt 4.7.2 but same result
Here is qmake.conf

#
# qmake configuration for building with arm-none-linux-gnueabi-g++
#

include(../../common/g++.conf)
include(../../common/linux.conf)
include(../../common/qws.conf)

# modifications to g++.conf
QMAKE_CC                = arm-none-linux-gnueabi-gcc
QMAKE_CXX               = arm-none-linux-gnueabi-g++
QMAKE_LINK              = arm-none-linux-gnueabi-g++
QMAKE_LINK_SHLIB        = arm-none-linux-gnueabi-g++

# modifications to linux.conf
QMAKE_AR                = arm-none-linux-gnueabi-ar cqs
QMAKE_OBJCOPY           = arm-none-linux-gnueabi-objcopy
QMAKE_STRIP             = arm-none-linux-gnueabi-strip

load(qt_config)

Here is ./configure command

./configure -embedded arm -xplatform qws/linux-arm-g++ -prefix
/opt/qt-everywhere-opensource-src-4.7.2 -little-endian -no-qt3support
-no-largefile -no-cups -qt-gfx-transformed -no-openssl -no-webkit -nomake
tools -optimized-qmake 

I used compiler arm-linux-gcc 4.3.2 toolschain provided in DVD with
purchase of mini2440

davef
Before we go any further . . . have you compiled the X11 version and
checked to see that it works. Try some of the examples or demos.

Then other people suggest installed Qt/embedded for the host with the
virtual frame buffer and learning to use that BEFORE cross-compiling for
the traget.

However, here is my qmake.conf (note full path to compiler)

#
# qmake configuration for building with arm-linux-g++
#

include(../../common/g++.conf)
include(../../common/linux.conf)
include(../../common/qws.conf)

# compiler flags to take advantage of the ARM architecture
QMAKE_CFLAGS_RELEASE   += -msoft-float -D_GCC_FLOAT_NOT_NEED -march=armv4t
-mtune=arm920t
QMAKE_CXXFLAGS_RELEASE += -msoft-float -D_GCC_FLOAT_NOT_NEED -march=armv4t
-mtune=arm920t


# modifications to g++.conf
QMAKE_CC                =
/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-gcc
QMAKE_CXX               =
/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-g++
QMAKE_LINK              =
/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-g++
QMAKE_LINK_SHLIB        =
/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-g++

# modifications to linux.conf
QMAKE_AR                =
/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-ar cqs
QMAKE_OBJCOPY           =
/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-objcopy
QMAKE_RANLIB            =
/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-ranlib
QMAKE_INCDIR           += /usr/local/tslib/include
QMAKE_LIBDIR           += /usr/local/tslib/lib 

load(qt_config)


CU tomorrow.

Aung
Finally, I can make it... :)

Thanks for your advice...
I changed like that..

# modifications to g++.conf
QMAKE_CC                =
/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-gcc -msoft-float
-D_GCC_FLOAT_NOT_NEED -march=armv4t -mtune=arm920t
QMAKE_CXX               =
/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-g++ -msoft-float
-D_GCC_FLOAT_NOT_NEED -march=armv4t -mtune=arm920t
QMAKE_LINK              =
/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-g++ -msoft-float
-D_GCC_FLOAT_NOT_NEED -march=armv4t -mtune=arm920t
QMAKE_LINK_SHLIB        =
/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-g++ -msoft-float
-D_GCC_FLOAT_NOT_NEED -march=armv4t -mtune=arm920t

Previously, my error may be due to absence of absolute path to QMAKE_CC
QMAKE_CXX

I tried it for about one week...

davef
So, you managed to cross-compile Qt without errors.  You are lucky I have
been trying on and off for about a year now!