gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] [SCM] Gnash branch, master, updated. e9d69504b1cd95424990


From: Markus Gothe
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. e9d69504b1cd9542499058fa99428a95f696e7da
Date: Sat, 08 Jan 2011 07:29:20 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, master has been updated
       via  e9d69504b1cd9542499058fa99428a95f696e7da (commit)
      from  68db32d4c765b76a3d2cfbf2d218f7d58bad654d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=e9d69504b1cd9542499058fa99428a95f696e7da


commit e9d69504b1cd9542499058fa99428a95f696e7da
Author: Markus Gothe <address@hidden>
Date:   Sat Jan 8 08:28:15 2011 +0100

    Updated --gcc-arch, thanks and kudot to fftw.org

diff --git a/configure.ac b/configure.ac
index 2183bba..d9f6baf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2725,7 +2725,11 @@ AC_SUBST(PCH_FLAGS)
 GNASH_PATH_PTHREADS
 
 GNASH_PATH_BOOST
-dnl AX_GCC_ARCHFLAG(no)
+
+dnl disable --gcc-arch by default
+dnl AX_GCC_ARCHFLAG
+dnl AC_SUBST(CFLAGS)
+dnl AC_SUBST(CLIBS)
 
 AC_ARG_ENABLE([strict],
   AC_HELP_STRING([--enable-strict],[Accept only standards compliant code (GCC 
only)]),
diff --git a/macros/archflag.m4 b/macros/archflag.m4
index 1c8cb0b..1bf9ef6 100644
--- a/macros/archflag.m4
+++ b/macros/archflag.m4
@@ -1,77 +1,35 @@
-dnl  
-dnl    Copyright (C) 2005, 2006, 2007, 2009, 2010 Free Software Foundation, 
Inc.
-dnl  
-dnl  This program is free software; you can redistribute it and/or modify
-dnl  it under the terms of the GNU General Public License as published by
-dnl  the Free Software Foundation; either version 3 of the License, or
-dnl  (at your option) any later version.
-dnl  
-dnl  This program is distributed in the hope that it will be useful,
-dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-dnl  GNU General Public License for more details.
-dnl  You should have received a copy of the GNU General Public License
-dnl  along with this program; if not, write to the Free Software
-dnl  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-
-dnl Copyright (C) 2006, 2007 Steven G. Johnson <address@hidden> and Matteo 
Frigo.
-
-AC_DEFUN([AX_CHECK_COMPILER_FLAGS],
-[AC_PREREQ(2.59) dnl for _AC_LANG_PREFIX
-AC_MSG_CHECKING([whether _AC_LANG compiler accepts $1])
-dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname:
-AS_LITERAL_IF([$1],
-  [AC_CACHE_VAL(AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1), [
-      ax_save_FLAGS=$[]_AC_LANG_PREFIX[]FLAGS
-      _AC_LANG_PREFIX[]FLAGS="$1"
-      AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], 
-        AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=yes,
-        AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=no)
-      _AC_LANG_PREFIX[]FLAGS=$ax_save_FLAGS])],
-  [ax_save_FLAGS=$[]_AC_LANG_PREFIX[]FLAGS
-   _AC_LANG_PREFIX[]FLAGS="$1"
-   AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], 
-     eval AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=yes,
-     eval AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=no)
-   _AC_LANG_PREFIX[]FLAGS=$ax_save_FLAGS])
-eval ax_check_compiler_flags=$AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)
-AC_MSG_RESULT($ax_check_compiler_flags)
-if test "x$ax_check_compiler_flags" = xyes; then
-       m4_default([$2], :)
-else
-       m4_default([$3], :)
-fi
-])dnl AX_CHECK_COMPILER_FLAGS
-
-AC_DEFUN([AX_GCC_X86_CPUID],
-[AC_REQUIRE([AC_PROG_CC])
-AC_LANG_PUSH([C])
-AC_CACHE_CHECK(for x86 cpuid $1 output, ax_cv_gcc_x86_cpuid_$1,
- [AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <stdio.h>], [
-     int op = $1, eax, ebx, ecx, edx;
-     FILE *f;
-     __asm__("push %%ebx\n\t"
-             "cpuid\n\t"
-             "pop %%ebx"
-             : "=a" (eax), "=c" (ecx), "=d" (edx)
-             : "a" (op));
-     __asm__("push %%ebx\n\t"
-             "cpuid\n\t"
-             "mov %%ebx, %%eax\n\t"
-             "pop %%ebx"
-             : "=a" (ebx), "=c" (ecx), "=d" (edx)
-             : "a" (op));
-     f = fopen("conftest_cpuid", "w"); if (!f) return 1;
-     fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx);
-     fclose(f);
-     return 0;
-])], 
-     [ax_cv_gcc_x86_cpuid_$1=`cat conftest_cpuid`; rm -f conftest_cpuid],
-     [ax_cv_gcc_x86_cpuid_$1=unknown; rm -f conftest_cpuid],
-     [ax_cv_gcc_x86_cpuid_$1=unknown])])
-AC_LANG_POP([C])
-])
-
+dnl @synopsis AX_GCC_ARCHFLAG([PORTABLE?], [ACTION-SUCCESS], [ACTION-FAILURE])
+dnl @summary find target architecture name for gcc -march/-mtune flags
+dnl @category Misc
+dnl
+dnl This macro tries to guess the "native" arch corresponding to
+dnl the target architecture for use with gcc's -march=arch or -mtune=arch
+dnl flags.  If found, the cache variable $ax_cv_gcc_archflag is set to this
+dnl flag and ACTION-SUCCESS is executed; otherwise $ax_cv_gcc_archflag is
+dnl is set to "unknown" and ACTION-FAILURE is executed.  The default
+dnl ACTION-SUCCESS is to add $ax_cv_gcc_archflag to the end of $CFLAGS.
+dnl
+dnl PORTABLE? should be either [yes] (default) or [no].  In the former case,
+dnl the flag is set to -mtune (or equivalent) so that the architecture
+dnl is only used for tuning, but the instruction set used is still
+dnl portable.  In the latter case, the flag is set to -march (or equivalent)
+dnl so that architecture-specific instructions are enabled.
+dnl
+dnl The user can specify --with-gcc-arch=<arch> in order to override
+dnl the macro's choice of architecture, or --without-gcc-arch to
+dnl disable this.
+dnl
+dnl When cross-compiling, or if $CC is not gcc, then ACTION-FAILURE is
+dnl called unless the user specified --with-gcc-arch manually.
+dnl
+dnl Requires macros: AX_CHECK_COMPILER_FLAGS, AX_GCC_X86_CPUID
+dnl
+dnl (The main emphasis here is on recent CPUs, on the principle that
+dnl  doing high-performance computing on old hardware is uncommon.)
+dnl
+dnl @version 2008-10-29
+dnl @license GPLWithACException
+dnl @author Steven G. Johnson <address@hidden> and Matteo Frigo.
 AC_DEFUN([AX_GCC_ARCHFLAG],
 [AC_REQUIRE([AC_PROG_CC])
 AC_REQUIRE([AC_CANONICAL_HOST])
@@ -91,7 +49,7 @@ if test "x$ax_gcc_arch" = xyes; then
 ax_gcc_arch=""
 if test "$cross_compiling" = no; then
 case $host_cpu in
-  i[[3456]]86*|x86_64*) # use cpuid codes, in part from x86info-1.7 by D. Jones
+  i[[3456]]86*|x86_64*|amd64*) # use cpuid codes, in part from x86info-1.21 by 
D. Jones
      AX_GCC_X86_CPUID(0)
      AX_GCC_X86_CPUID(1)
      case $ax_cv_gcc_x86_cpuid_0 in
@@ -99,25 +57,28 @@ case $host_cpu in
           case $ax_cv_gcc_x86_cpuid_1 in
            *5[[48]]?:*:*:*) ax_gcc_arch="pentium-mmx pentium" ;;
            *5??:*:*:*) ax_gcc_arch=pentium ;;
+           # This is an Intel core i3/i5/i7
+           *6[[520]]?:*:*:*) ax_gcc_arch="native nocona core2 prescott 
pentium4 pentiumpro" ;;
            *6[[3456]]?:*:*:*) ax_gcc_arch="pentium2 pentiumpro" ;;
            *6a?:*[[01]]:*:*) ax_gcc_arch="pentium2 pentiumpro" ;;
            *6a?:*[[234]]:*:*) ax_gcc_arch="pentium3 pentiumpro" ;;
            *6[[78b]]?:*:*:*) ax_gcc_arch="pentium3 pentiumpro" ;;
            *6[[9d]]?:*:*:*) ax_gcc_arch="pentium-m pentium3 pentiumpro" ;;
-           *6[[e]]?:*:*:*) ax_gcc_arch="pentium-m pentium3 pentiumpro" ;; # 
Core Duo
-           *6??:*:*:*) ax_gcc_arch=pentiumpro ;;
+           *6[[e]]?:*:*:*) ax_gcc_arch="native pentium-m pentium3 pentiumpro" 
;; # Core Duo
+           *6f?:*:*:*) ax_gcc_arch="core2 native pentium-m pentium3 
pentiumpro" ;;
+           *6??:*:*:*) ax_gcc_arch="native pentiumpro" ;;
             *f3[[347]]:*:*:*|*f4[[1347]]:*:*:*)
                case $host_cpu in
-                  x86_64*) ax_gcc_arch="nocona pentium4 pentiumpro" ;;
+                  x86_64*|amd64*) ax_gcc_arch="nocona pentium4 pentiumpro" ;;
                   *) ax_gcc_arch="prescott pentium4 pentiumpro" ;;
                 esac ;;
-            *f??:*:*:*) ax_gcc_arch="pentium4 pentiumpro";;
+            *f??:*:*:*) ax_gcc_arch="native pentium4 pentiumpro";;
           esac ;;
        *:68747541:*:*) # AMD
           case $ax_cv_gcc_x86_cpuid_1 in
            *5[[67]]?:*:*:*) ax_gcc_arch=k6 ;;
-           *5[[8d]]?:*:*:*) ax_gcc_arch="k6-2 k6" ;;
-           *5[[9]]?:*:*:*) ax_gcc_arch="k6-3 k6" ;;
+           *5[[8c]]?:*:*:*) ax_gcc_arch="k6-2 k6" ;;
+           *5[[9d]]?:*:*:*) ax_gcc_arch="k6-3 k6" ;;
            *60?:*:*:*) ax_gcc_arch=k7 ;;
            *6[[12]]?:*:*:*) ax_gcc_arch="athlon k7" ;;
            *6[[34]]?:*:*:*) ax_gcc_arch="athlon-tbird k7" ;;
@@ -132,7 +93,7 @@ case $host_cpu in
            *f[[4cef8b]]?:*:*:*) ax_gcc_arch="athlon64 k8" ;;
            *f5?:*:*:*) ax_gcc_arch="opteron k8" ;;
            *f7?:*:*:*) ax_gcc_arch="athlon-fx opteron k8" ;;
-           *f??:*:*:*) ax_gcc_arch="k8" ;;
+           *f??:*:*:*) ax_gcc_arch="native k8" ;;
           esac ;;
        *:746e6543:*:*) # IDT
           case $ax_cv_gcc_x86_cpuid_1 in
@@ -144,16 +105,17 @@ case $host_cpu in
      esac
      if test x"$ax_gcc_arch" = x; then # fallback
        case $host_cpu in
-         i586*) ax_gcc_arch=pentium ;;
-         i686*) ax_gcc_arch=pentiumpro ;;
+         i586*) ax_gcc_arch="native pentium" ;;
+         i686*) ax_gcc_arch="native pentiumpro" ;;
+          x86_64*|amd64*) ax_gcc_arch="native" ;;
         esac
      fi 
      ;;
 
   sparc*)
      AC_PATH_PROG([PRTDIAG], [prtdiag], [prtdiag], [$PATH:/usr/platform/`uname 
-i`/sbin/:/usr/platform/`uname -m`/sbin/])
-     cputype="`(((grep cpu /proc/cpuinfo | cut -d: -f2) ; ($PRTDIAG -v |grep 
-i sparc) ; grep -i cpu /var/run/dmesg.boot ) | head -n 1) 2> /dev/null`"
-     cputype="`echo "$cputype" | tr -d ' -' |tr $as_cr_LETTERS $as_cr_letters`"
+     cputype=`(((grep cpu /proc/cpuinfo | cut -d: -f2) ; ($PRTDIAG -v |grep -i 
sparc) ; grep -i cpu /var/run/dmesg.boot ) | head -n 1) 2> /dev/null`
+     cputype=`echo "$cputype" | tr -d ' -' |tr $as_cr_LETTERS $as_cr_letters`
      case $cputype in
          *ultrasparciv*) ax_gcc_arch="ultrasparc4 ultrasparc3 ultrasparc v9" ;;
          *ultrasparciii*) ax_gcc_arch="ultrasparc3 ultrasparc v9" ;;
@@ -175,8 +137,8 @@ case $host_cpu in
   alphaev79) ax_gcc_arch="ev79 ev7 ev69 ev68 ev67" ;;
 
   powerpc*)
-     cputype="`((grep cpu /proc/cpuinfo | head -n 1 | cut -d: -f2 | cut -d, 
-f1 | sed 's/ //g') ; /usr/bin/machine ; /bin/machine; grep CPU 
/var/run/dmesg.boot | head -n 1 | cut -d" " -f2) 2> /dev/null`"
-     cputype="`echo $cputype | sed -e 's/ppc//g;s/ *//g'`"
+     cputype=`((grep cpu /proc/cpuinfo | head -n 1 | cut -d: -f2 | cut -d, -f1 
| sed 's/ //g') ; /usr/bin/machine ; /bin/machine; grep CPU /var/run/dmesg.boot 
| head -n 1 | cut -d" " -f2) 2> /dev/null`
+     cputype=`echo $cputype | sed -e 's/ppc//g;s/ *//g'`
      case $cputype in
        *750*) ax_gcc_arch="750 G3" ;;
        *740[[0-9]]*) ax_gcc_arch="$cputype 7400 G4" ;;
@@ -187,7 +149,7 @@ case $host_cpu in
        *POWER5*|*power5*|*gr*|*gs*) ax_gcc_arch="power5 power4 970";;
        603ev|8240) ax_gcc_arch="$cputype 603e 603";;
        *Cell*) ax_gcc_arch="cellppu cell";;
-       *) ax_gcc_arch=$cputype ;;
+       *) ax_gcc_arch="$cputype native" ;;
      esac
      ax_gcc_arch="$ax_gcc_arch powerpc"
      ;;
@@ -201,7 +163,7 @@ for arch in $ax_gcc_arch; do
     flags="-mtune=$arch"
     # -mcpu=$arch and m$arch generate nonportable code on every arch except
     # x86.  And some other arches (e.g. Alpha) don't accept -mtune.  Grrr.
-    case $host_cpu in i*86|x86_64*) flags="$flags -mcpu=$arch -m$arch";; esac
+    case $host_cpu in i*86|x86_64*|amd64*) flags="$flags -mcpu=$arch 
-m$arch";; esac
   else
     flags="-march=$arch -mcpu=$arch -m$arch"
   fi
@@ -220,12 +182,76 @@ if test "x$ax_cv_gcc_archflag" = xunknown; then
   m4_default([$3],:)
 else
   m4_default([$2], [CFLAGS="$CFLAGS $ax_cv_gcc_archflag"])
-  m4_default([$2], [CXXFLAGS="$CXXFLAGS $ax_cv_gcc_archflag"])
 fi
 ])
 
-# Local Variables:
-# c-basic-offset: 2
-# tab-width: 2
-# indent-tabs-mode: nil
-# End:
+AC_DEFUN([AX_GCC_X86_CPUID],
+[AC_REQUIRE([AC_PROG_CC])
+AC_LANG_PUSH([C])
+AC_CACHE_CHECK(for x86 cpuid $1 output, ax_cv_gcc_x86_cpuid_$1,
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <stdio.h>], [
+     int op = $1, eax, ebx, ecx, edx;
+     FILE *f = NULL;
+#if defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || 
defined(__x86_64)
+     __asm__("push %%rbx\n\t"
+             "cpuid\n\t"
+             "pop %%rbx"
+             : "=a" (eax), "=c" (ecx), "=d" (edx)
+             : "a" (op));
+     __asm__("push %%rbx\n\t"
+             "cpuid\n\t"
+             "mov %%rbx, %%rax\n\t"
+             "pop %%rbx"
+             : "=a" (ebx), "=c" (ecx), "=d" (edx)
+             : "a" (op));
+#else
+     __asm__("push %%ebx\n\t"
+             "cpuid\n\t"
+             "pop %%ebx"
+             : "=a" (eax), "=c" (ecx), "=d" (edx)
+             : "a" (op));
+     __asm__("push %%ebx\n\t"
+             "cpuid\n\t"
+             "mov %%ebx, %%eax\n\t"
+             "pop %%ebx"
+             : "=a" (ebx), "=c" (ecx), "=d" (edx)
+             : "a" (op));
+#endif
+     f = fopen("conftest_cpuid", "w"); if (!f) return 1;
+     fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx);
+     fclose(f);
+     return 0;
+])], 
+     [ax_cv_gcc_x86_cpuid_$1=`cat conftest_cpuid`; rm -f conftest_cpuid],
+     [ax_cv_gcc_x86_cpuid_$1=unknown; rm -f conftest_cpuid],
+     [ax_cv_gcc_x86_cpuid_$1=unknown])])
+AC_LANG_POP([C])
+])
+
+AC_DEFUN([AX_CHECK_COMPILER_FLAGS],
+[AC_PREREQ(2.59) dnl for _AC_LANG_PREFIX
+AC_MSG_CHECKING([whether _AC_LANG compiler accepts $1])
+dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname:
+AS_LITERAL_IF([$1],
+  [AC_CACHE_VAL(AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1), [
+      ax_save_FLAGS=$[]_AC_LANG_PREFIX[]FLAGS
+      _AC_LANG_PREFIX[]FLAGS="$1"
+      AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], 
+        AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=yes,
+        AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=no)
+      _AC_LANG_PREFIX[]FLAGS=$ax_save_FLAGS])],
+  [ax_save_FLAGS=$[]_AC_LANG_PREFIX[]FLAGS
+   _AC_LANG_PREFIX[]FLAGS="$1"
+   AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], 
+     eval AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=yes,
+     eval AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=no)
+   _AC_LANG_PREFIX[]FLAGS=$ax_save_FLAGS])
+eval ax_check_compiler_flags=$AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)
+AC_MSG_RESULT($ax_check_compiler_flags)
+if test "x$ax_check_compiler_flags" = xyes; then
+       m4_default([$2], :)
+else
+       m4_default([$3], :)
+fi
+])dnl AX_CHECK_COMPILER_FLAGS
+

-----------------------------------------------------------------------

Summary of changes:
 configure.ac       |    6 +-
 macros/archflag.m4 |  218 +++++++++++++++++++++++++++++-----------------------
 2 files changed, 127 insertions(+), 97 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

[Prev in Thread] Current Thread [Next in Thread]