[Pixman] [PATCH 1/2] autotools: use custom build rule to build iwMMXt code
Matt Turner
mattst88 at gmail.com
Wed May 30 13:46:38 PDT 2012
gcc has no sane way of enabling iwmmxt code generation, like -msse for
SSE, so you have to use -march=iwmmxt{,2}. User CFLAGS are placed after
-march=iwmmxt and override the march value, so we have to use a custom
build rule to order the CFLAGS such that pixman-mmx.c will be built with
the necessary CFLAGS.
---
configure.ac | 2 +-
pixman/Makefile.am | 18 +++++++++++++-----
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/configure.ac b/configure.ac
index 5c60b13..a544e19 100644
--- a/configure.ac
+++ b/configure.ac
@@ -614,7 +614,7 @@ fi
have_iwmmxt_intrinsics=no
AC_MSG_CHECKING(whether to use ARM IWMMXT intrinsics)
xserver_save_CFLAGS=$CFLAGS
-CFLAGS="$IWMMXT_CFLAGS $CFLAGS"
+CFLAGS="$CFLAGS $IWMMXT_CFLAGS"
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
#ifndef __arm__
#error "IWMMXT is only available on ARM"
diff --git a/pixman/Makefile.am b/pixman/Makefile.am
index b320a58..1b232ad 100644
--- a/pixman/Makefile.am
+++ b/pixman/Makefile.am
@@ -93,13 +93,21 @@ endif
# iwmmxt code
if USE_ARM_IWMMXT
noinst_LTLIBRARIES += libpixman-iwmmxt.la
-libpixman_iwmmxt_la_SOURCES = pixman-mmx.c
-libpixman_iwmmxt_la_CFLAGS = $(DEP_CFLAGS) $(IWMMXT_CFLAGS)
-libpixman_iwmmxt_la_LIBADD = $(DEP_LIBS)
-libpixman_1_la_LDFLAGS += $(IWMMXT_LDFLAGS)
libpixman_1_la_LIBADD += libpixman-iwmmxt.la
-ASM_CFLAGS_IWMMXT=$(IWMMXT_CFLAGS)
+libpixman_iwmmxt_la-pixman-mmx.lo: pixman-mmx.c
+ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $(IWMMXT_CFLAGS) -MT libpixman_iwmmxt_la-pixman-mmx.lo -MD -MP -MF $(DEPDIR)/libpixman_iwmmxt_la-pixman-mmx.Tpo -c -o libpixman_iwmmxt_la-pixman-mmx.lo `test -f 'pixman-mmx.c' || echo '$(srcdir)/'`pixman-mmx.c
+ $(AM_V_at)$(am__mv) $(DEPDIR)/libpixman_iwmmxt_la-pixman-mmx.Tpo $(DEPDIR)/libpixman_iwmmxt_la-pixman-mmx.Plo
+
+libpixman_iwmmxt_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
+libpixman_iwmmxt_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(CFLAGS) $(IWMMXT_CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+libpixman_iwmmxt_la_LIBADD = $(DEP_LIBS)
+
+libpixman-iwmmxt.la: libpixman_iwmmxt_la-pixman-mmx.lo $(libpixman_iwmmxt_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(libpixman_iwmmxt_la_LINK) libpixman_iwmmxt_la-pixman-mmx.lo $(libpixman_iwmmxt_la_LIBADD) $(LIBS)
endif
# mips dspr2 code
--
1.7.3.4
More information about the Pixman
mailing list