diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | m4/as-gcc-inline-assembly.m4 | 10 | ||||
-rw-r--r-- | m4/as-nano.m4 | 4 |
4 files changed, 22 insertions, 4 deletions
@@ -1,3 +1,12 @@ +2007-03-16 David Schleef <ds@schleef.org> + + * configure.ac: + Add -maltivec flag + * m4/as-gcc-inline-assembly.m4: + Require gcc-3.4 + * m4/as-nano.m4: + handle two-digit version numbers, like in 0.3.10 + 2007-03-02 David Schleef <ds@schleef.org> * liboil/i386/math.c: diff --git a/configure.ac b/configure.ac index 7e9063b..91d725d 100644 --- a/configure.ac +++ b/configure.ac @@ -145,6 +145,9 @@ then AS_COMPILER_FLAG(-Werror, LIBOIL_CFLAGS="$LIBOIL_CFLAGS -Werror") fi if test x$HAVE_GCC_ASM = xyes -a x$HAVE_POWERPC = xyes ; then + AS_COMPILER_FLAG(["-Wa,-maltivec"], + [LIBOIL_CFLAGS="$LIBOIL_CFLAGS -maltivec"], + true) AS_COMPILER_FLAG(["-Wa,-mregnames"], [LIBOIL_CFLAGS="$LIBOIL_CFLAGS -Wa,-mregnames"], true) diff --git a/m4/as-gcc-inline-assembly.m4 b/m4/as-gcc-inline-assembly.m4 index 8182f42..70cc7d0 100644 --- a/m4/as-gcc-inline-assembly.m4 +++ b/m4/as-gcc-inline-assembly.m4 @@ -4,7 +4,7 @@ dnl autostars m4 macro for detection of gcc inline assembly dnl David Schleef <ds@schleef.org> -dnl $Id: as-gcc-inline-assembly.m4,v 1.2 2005-12-04 18:51:55 ds Exp $ +dnl $Id: as-gcc-inline-assembly.m4,v 1.3 2007-03-16 23:30:02 ds Exp $ dnl AS_COMPILER_FLAG(ACTION-IF-ACCEPTED, [ACTION-IF-NOT-ACCEPTED]) dnl Tries to compile with the given CFLAGS. @@ -15,7 +15,13 @@ AC_DEFUN([AS_GCC_INLINE_ASSEMBLY], [ AC_MSG_CHECKING([if compiler supports gcc-style inline assembly]) - AC_TRY_COMPILE([], [__asm__ (""::) ], [flag_ok=yes], [flag_ok=no]) + AC_TRY_COMPILE([], [ +#ifdef __GNUC_MINOR__ +#if __GNUC_MAJOR__ * 1000 + __GNUC_MINOR__ < 3004 +#error GCC before 3.4 has critical bugs compiling inline assembly +#endif +#endif +__asm__ (""::) ], [flag_ok=yes], [flag_ok=no]) if test "X$flag_ok" = Xyes ; then $1 diff --git a/m4/as-nano.m4 b/m4/as-nano.m4 index ca09455..119666c 100644 --- a/m4/as-nano.m4 +++ b/m4/as-nano.m4 @@ -5,7 +5,7 @@ dnl autostars m4 macro for versioning (modified) dnl Thomas Vander Stichele <thomas at apestaart dot org> dnl David Schleef <ds@schleef.org> -dnl $Id: as-nano.m4,v 1.1 2005-01-21 07:26:34 ds Exp $ +dnl $Id: as-nano.m4,v 1.2 2007-03-16 23:30:02 ds Exp $ dnl AS_VERSION(ACTION-IF-NO-NANO, [ACTION-IF-NANO]) @@ -13,7 +13,7 @@ AC_DEFUN([AS_NANO], [ AC_MSG_CHECKING(nano version) - NANO=$(echo AC_PACKAGE_VERSION | sed ['s/[0-9]\.[0-9]\.[0-9]\.*//']) + NANO=$(echo AC_PACKAGE_VERSION | sed ['s/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.*//']) AC_SUBST(NANO) if test x"$NANO" = x || test "x$NANO" = "x0" ; then |