[Qt-embedded-interest] Difference between -embedded and -xplatform?

Tom Cooksey thomas.cooksey at nokia.com
Tue Mar 31 08:12:48 CEST 2009


> Hi,
>
> Can someone explain the difference between using the -xplatform and
> the -embedded flags when compiling? I am cross compiling Qt Embedded
> for my target device, and had to setup a mkspec file to do so. All is
> working and I'm using the -xplatform flag, but I'm curious if the -
> embedded flag changes the compiled result somehow? Thanks,

If you're cross compiling, you always need to pass -embedded <ARCH> (note: 
-arch should also work instead for packages). Normally that's enough - Qt will 
assume your compiler is called ARCH-linux-g++. However, as you have found, 
sometimes you need to create a mkspec for your cross-compile environment. 
That's what's passed in by -xplatform. So, -embedded sets the architecture (To 
enable the correct inline assembly) and -xplatform sets the mkspec if you need 
something other than the default.

I guess at some point it would be good to be able to specify the architecture 
in the mkspec. Hmmm...



Cheers,

Tom

PS: If you're on a >=armv6 platform, use armv6 as the architecture as Qt uses 
some optimisations which are only possible on armv6 and above (which speed up 
blending of RGB565 among other things)





More information about the Qt-embedded-interest mailing list