[Qt-interest] Fixed a non-aligned memory access for SH4 platformin QT Embedded 4.5

Calabro' Fabio Fabio.Calabro at consulenti.fastweb.it
Tue Aug 25 12:52:29 CEST 2009


Hi Sunny,

If you define a new architecture coping linux-sh-g++ and calling it linux-sh4-g++, you have to define it in ./src/corelib/arch/qatomic_arch.h too.
Open this file and add:

#elif defined(QT_ARCH_SH4)
#include "QtCore/qatomic_sh4.h"

fill qatomic_sh4.h coping QAtomic operation from qatomic_sh.h

You have to create a new dir on /src/corelib/arch called sh4
and create arch.pri 

You had this Warning because the new arch that you defined is not knows from qt that can't find QAtomic operations ... and are telling you to use generic QAtomic methods.

so if you want to use a custom name for your build follow what qt did for sh porting ... and do the same. Or ...simply build with -embedded sh and modify qmake.conf directly :)

Best Regard

Fabio 




-----Original Message-----
From: sunny an [mailto:sunny at i-winix.com]
Sent: Tue 8/25/2009 12:28 PM
To: Calabro' Fabio
Cc: qt-interest at trolltech.com
Subject: RE: [Qt-interest] Fixed a non-aligned memory access for SH4 platformin QT Embedded 4.5
 
First of all, Thanks a lot for your reply!

I have configured like this :

./configure -embedded sh4

actually, It was a first try to compile QT embedded library. So I used a
simple option.

Before configure run, I made mkspecs/qws/linux-sh4-g++ directory using
linux-sh-g++ copy and modified qmake.conf like bellow article you
described.

./configure was successful and run make & make install.
It also successful. but somthing strange log appeared like bellows:


for /root/project/tools/qt-embedded-linux-opensource-src-4.5.2/examples/qtconcurrent/runfunction/runfunction.pro

for /root/project/tools/qt-embedded-linux-opensource-src-4.5.2/examples/qtconcurrent/wordcount/wordcount.pro

for /root/project/tools/qt-embedded-linux-opensource-src-4.5.2/examples/qtconcurrent/imagescaling/imagescaling.pro

for /root/project/tools/qt-embedded-linux-opensource-src-4.5.2/examples/phonon/musicplayer/musicplayer.pro

for /root/project/tools/qt-embedded-linux-opensource-src-4.5.2/examples/phonon/capabilities/capabilities.pro

        NOTICE: Atomic operations are not yet supported for this
        architecture.

        Qt will use the 'generic' architecture instead, which uses a
        single pthread_mutex_t to protect all atomic operations. This
        implementation is the slow (but safe) fallback implementation
        for architectures Qt does not yet support.

Qt is now configured for building. Just run 'gmake'.
Once everything is built, you must run 'gmake install'.
Qt will be installed into /usr/local/Trolltech/QtEmbedded-4.5.2-generic

To reconfigure, run 'gmake confclean' and 'configure'.

[root at localhost qt-embedded-linux-opensource-src-4.5.2]# 

Do you know what the NOTICE mean???


Best Regards


Sunny An.

-  
------------------------------------------------------------
An Jung Sun
STB Devision R&D Dept. Principal Engineer

WINIX Co., Ltd. 
Angade BLDG, 363, Yangjae-dong, Seocho-gu, Seoul, Korea
Tel:+82-2-555-9200(Ext.335), Fax:+82-2-529-4846
Email:sunny at i-winix.com
------------------------------------------------------------


2009-08-25 (?), 10:27 +0200, Calabro' Fabio ???:
> Hi Sunny,
> 
> I'm using something like this:
> 
> ./configure -embedded sh -fast -depths all -release -qconfig box -no-qt3support -no-accessibility -no-exceptions -no-iconv -no-cups -no-nis -system-zlib -qt-gif -qt-libpng -no-libmng -qt-libjpeg -qt-freetype -no-qdbus -no-glib -qt-kbd-usb -qt-kbd-tty  -qt-mouse-pc -no-webkit -no-svg -no-scripttools -no-phonon -no-phonon-backend -prefix $YOURPREFIX -confirm-license -opensource -little-endian 
> 
> where depths is all but can be 16 32... depend on your necessity and -qconfig box is your custom configuration file where you can enable or disable qt features you have need. You have to create it on  /src/corelib/global/ dir like qconfig-box.h. Have a look to qconfig-medium.h ..large etc .... and create you custom qconfig. 
> Of course you have to customize qmake.conf for your compiler ... for example: 
> 
> QMAKE_CC                = sh4-linux-gcc
> QMAKE_CXX               = sh4-linux-g++
> QMAKE_LINK              = sh4-linux-g++
> QMAKE_LINK_SHLIB        = sh4-linux-g++
> 
> I thing this is all information you have need to compile for your target. Let me know if will be everything ok
> 
> Best Regard
> Fabio
> 
> 
> 
> 
> 
> 
> 
> 
> -----Original Message-----
> From: sunny an [mailto:sunny at i-winix.com]
> Sent: Tue 8/25/2009 4:00 AM
> To: qt-interest at trolltech.com; Calabro' Fabio
> Subject: [Qt-interest] Fixed a non-aligned memory access for SH4 platformin QT Embedded 4.5
>  
> Hi~
> 
> I'm a software engineer using QT embedded on SH4 architecure target like
> 
> you. target cpu is STi7101.
> 
> I am trying to install QT Embedded linux 4.5.2 on my host pc.
> 
> I don't know what is exact option for my target. 
> 
> Could you let me know install option for SH4?
> 
> 
> ./configure -embedded [architecure] <-- what is an [architecture]?
> 
> 
> Thanks in advance!
> 
> Regards,
> 
> Sunny An. 
> 
> -  
> ------------------------------------------------------------
> An Jung Sun
> STB Devision R&D Dept. Principal Engineer
> 
> WINIX Co., Ltd. 
> Angade BLDG, 363, Yangjae-dong, Seocho-gu, Seoul, Korea
> Tel:+82-2-555-9200(Ext.335), Fax:+82-2-529-4846
> Email:sunny at i-winix.com
> ------------------------------------------------------------
> 
> 
> 






More information about the Qt-interest-old mailing list