Skip to contentSkip to conversation

Qt and detecting iWMMXT

DISCUSSION Holger Freyther 5 participants 8 messages Sep 24, 2010 – Sep 25, 2010

lore
Share & tools
lore
#0 lore raw

Hi all,

when building for XScale one could pass -iwmmxt to the configure script. Now how can a recipe find out if XScale systems are targeted? The closest thing I can think of is to look at PACKAGE_ARCH and see if xscale is in it.

Is there a better way?

#1 lore raw

2010/9/24 Holger Freyther <[email protected]>:

Quoted 7 lines

Hi all,

when building for XScale one could pass -iwmmxt to the configure script. Now how can a recipe find out if XScale systems are targeted? The closest thing I can think of is to look at PACKAGE_ARCH and see if xscale is in it.

Is there a better way?

Is this something which is xscale specific or is it armv5te specific ?
In the latter case I guess something like EXTRA_OECONF_armv5te could be used

Frans

#2 lore raw
Quoted 3 lines · Frans Meulenbroeks

Is this something which is xscale specific
or is it armv5te specific ?

It is a Co-Processor from Intel, it is only available in the Marvel SoC (PXA270, PXA3x... maybe the 168 series as well).

#3 lore raw
In reply to Holger Freyther

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 5 lines · Holger Freyther

Hi all,

when building for XScale one could pass -iwmmxt to the configure script. Now how can a recipe find out if XScale systems are targeted? The closest thing I can think of is to look at PACKAGE_ARCH and see if xscale is in it.

Adapted from the mplayer magic Graeme and I came up with some years ago:

#build with support for the iwmmxt instruction (pxa270 and up) MY_ARCH := "${PACKAGE_ARCH}"
PACKAGE_ARCH = "${@base_contains('MACHINE_FEATURES', 'iwmmxt', 'iwmmxt', '${MY_ARCH}',d)}"

QT_CONFIG_FLAGS_append = " ${@base_contains('MACHINE_FEATURES', 'iwmmxt', ' -iwmmxt', '',d)} "

regards,

Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFMnSIlMkyGM64RGpERAumBAKCU8rfNBZ7GTmSgJwgKZ25iWom2xwCgt6hF T3hkQK3OSWktYh6IYsUghmE=
=odW5
-----END PGP SIGNATURE-----

#4 lore raw

2010/9/25 Koen Kooi <[email protected]>:

Quoted 17 lines

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 5 lines · Holger Freyther

Hi all,

when building for XScale one could pass -iwmmxt to the configure script. Now how can a recipe find out if XScale systems are targeted? The closest thing I can think of is to look at PACKAGE_ARCH and see if xscale is in it.

Adapted from the mplayer magic Graeme and I came up with some years ago:

#build with support for the iwmmxt instruction (pxa270 and up) MY_ARCH := "${PACKAGE_ARCH}"
PACKAGE_ARCH = "${@base_contains('MACHINE_FEATURES', 'iwmmxt', 'iwmmxt', '${MY_ARCH}',d)}"

Quoted 6 lines

QT_CONFIG_FLAGS_append = " ${@base_contains('MACHINE_FEATURES', 'iwmmxt', ' -iwmmxt', '',d)} "

regards,

Koen

Nice solution.
Guess it would be useful to have a list of all possible MACHINE_FEATURES and DISTRO_FEATURES somewhere (e.g. wiki)

Frans

#5 lore raw

2010/9/25 Frans Meulenbroeks <[email protected]>:

Quoted 23 lines

2010/9/25 Koen Kooi <[email protected]>:

Quoted 22 lines

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 5 lines · Holger Freyther

Hi all,

when building for XScale one could pass -iwmmxt to the configure script. Now how can a recipe find out if XScale systems are targeted? The closest thing I can think of is to look at PACKAGE_ARCH and see if xscale is in it.

Adapted from the mplayer magic Graeme and I came up with some years ago:

#build with support for the iwmmxt instruction (pxa270 and up) MY_ARCH := "${PACKAGE_ARCH}"
PACKAGE_ARCH = "${@base_contains('MACHINE_FEATURES', 'iwmmxt', 'iwmmxt', '${MY_ARCH}',d)}"

QT_CONFIG_FLAGS_append = " ${@base_contains('MACHINE_FEATURES', 'iwmmxt', ' -iwmmxt', '',d)} "

regards,

Quoted 8 lines
Quoted 1 line

Koen

Nice solution.
Guess it would be useful to have a list of all possible MACHINE_FEATURES and DISTRO_FEATURES somewhere (e.g. wiki)

Frans

Rethinking the issue: assuming we *do* want SOC_FAMILY would it not be more appropriate to use that here?

Frans

#6 lore raw
Quoted 14 lines · Frans Meulenbroeks

2010/9/25 Frans Meulenbroeks<[email protected]>:

Quoted 13 lines

2010/9/25 Koen Kooi<[email protected]>:

Quoted 11 lines

#build with support for the iwmmxt instruction (pxa270 and up) MY_ARCH := "${PACKAGE_ARCH}"
PACKAGE_ARCH = "${@base_contains('MACHINE_FEATURES', 'iwmmxt', 'iwmmxt', '${MY_ARCH}',d)}"

QT_CONFIG_FLAGS_append = " ${@base_contains('MACHINE_FEATURES', 'iwmmxt', ' -iwmmxt', '',d)} "

regards,

Koen

Quoted 9 lines
Quoted 6 lines

Nice solution.
Guess it would be useful to have a list of all possible MACHINE_FEATURES and DISTRO_FEATURES somewhere (e.g. wiki)

Frans

Rethinking the issue: assuming we *do* want SOC_FAMILY would it not be more appropriate to use that here?

you can have a SOC which supports iwmmx and wish not using it so MACHINE_FEATURES seems sane here.

Eric

#7 lore raw
In reply to Holger Freyther
Quoted 2 lines · Holger Freyther

when building for XScale one could pass -iwmmxt to the configure script.

I would avoid -march=iwmmxt because

a) there seems to be kernel bug which does not restore IWMMXT state on ELF loading[1]

b) gcc 4.4.4 is bugged for this architecture (both ICE and generation of inefficent code) and fails e.g. to bootstrap itself or glibc

When you really need iwmmxt support, I recommend to add '.arch iwmmxt' to (inline) assembler instead of using -march=iwmmxt.

Enrico

Footnotes:
[1] http://article.gmane.org/gmane.linux.ports.arm.general/11795