[Pixman] [PATCH] iwmmxt: Disallow if gcc version is < 4.8.

Siarhei Siamashka siarhei.siamashka at gmail.com
Sun Aug 4 16:49:30 PDT 2013


On Tue, 30 Jul 2013 13:25:43 -0700
Matt Turner <mattst88 at gmail.com> wrote:

> Later versions of gcc-4.7.x are capable of generating iwMMXt
> instructions properly, but gcc-4.8 contains better support and other
> fixes, including iwMMXt in conjunction with hardfp. The existing 4.5
> requirement was based on attempts to have OLPC use a patched gcc to
> build pixman. Let's just require gcc-4.8.
> ---
>  configure.ac | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 5b9512c..daf4062 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -631,8 +631,8 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
>  #ifndef __IWMMXT__
>  #error "IWMMXT not enabled (with -march=iwmmxt)"
>  #endif
> -#if defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5))
> -#error "Need GCC >= 4.5 for IWMMXT intrinsics"
> +#if defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 8))
> +#error "Need GCC >= 4.8 for IWMMXT intrinsics"
>  #endif
>  #include <mmintrin.h>
>  int main () {

While we are at it, it might also make sense to require at least armv5
arch for the pixman build to enable iwmmxt. Linking armv4t and >=armv5
object files together in the same binary results in the linker using
the thumb variant of BLX instructions (not supported by armv4t
processors). We already had this problem with the arm assembly
files, but resolved it using the '.object_arch' directive:

    http://cgit.freedesktop.org/pixman/commit/?id=68d8d83223b5a35e

It's quite possible that armv4t is already dead though (kinda like
the original i386/i486). At least nobody has complained so far. But
on the other hand, it looks like the iwmmxt code in pixman was
somewhat similar to a ticking timebomb, which has exploded only
now after the linux distributions started moving to newer versions
of gcc. So we are only beginning the large scale real testing and
ironing out bugs.

-- 
Best regards,
Siarhei Siamashka


More information about the Pixman mailing list