commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r11399 - gnuradio/branches/developers/balister/arm-con


From: balister
Subject: [Commit-gnuradio] r11399 - gnuradio/branches/developers/balister/arm-configure/config
Date: Thu, 9 Jul 2009 11:05:49 -0600 (MDT)

Author: balister
Date: 2009-07-09 11:05:49 -0600 (Thu, 09 Jul 2009)
New Revision: 11399

Modified:
   gnuradio/branches/developers/balister/arm-configure/config/gr_set_md_cpu.m4
Log:
Add support for detecting compiler for arm. Detect if arm isa is armv5 or 
armv7-a

Modified: 
gnuradio/branches/developers/balister/arm-configure/config/gr_set_md_cpu.m4
===================================================================
--- gnuradio/branches/developers/balister/arm-configure/config/gr_set_md_cpu.m4 
2009-07-09 16:45:11 UTC (rev 11398)
+++ gnuradio/branches/developers/balister/arm-configure/config/gr_set_md_cpu.m4 
2009-07-09 17:05:49 UTC (rev 11399)
@@ -25,6 +25,26 @@
   LF_CHECK_CXX_FLAG([-mabi=altivec -maltivec])
 ])
 
+AC_DEFUN([_FIND_ARM_ISA],
+[
+  AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+  [[#ifndef __ARM_ARCH_5__
+    #error "Not armv5"
+    #endif
+  ]])],
+    [is_armv5=yes],
+    [is_armv5=no])
+
+  AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+  [[#ifndef __ARM_ARCH_7A__
+    #error "Not armv7-a"
+    #endif
+  ]])],
+    [is_armv7a=yes],
+    [is_armv7a=no])
+
+])
+
 AC_DEFUN([GR_SET_MD_CPU],[
   AC_REQUIRE([AC_CANONICAL_HOST])
   AC_ARG_WITH(md-cpu,
@@ -36,6 +56,12 @@
    x86 | i[[3-7]]86)   MD_CPU=x86      MD_SUBCPU=x86 ;;
    x86_64)             MD_CPU=x86      MD_SUBCPU=x86_64 ;;
    powerpc*)            MD_CPU=powerpc ;;
+   arm)
+       _FIND_ARM_ISA
+       if test $is_armv5 = yes; then MD_CPU=ARMV5;
+       elif test $is_armv7a = yes; then MD_CPU=ARMV7A;
+       else MD_CPU=generic; fi
+       ;;
    *)                  MD_CPU=generic ;;
   esac
 
@@ -59,5 +85,7 @@
   AM_CONDITIONAL(MD_CPU_x86,     test "$MD_CPU" = "x86")
   AM_CONDITIONAL(MD_SUBCPU_x86_64,  test "$MD_SUBCPU" = "x86_64")
   AM_CONDITIONAL(MD_CPU_powerpc, test "$MD_CPU" = "powerpc")
+  AM_CONDITIONAL(MD_CPU_armv5, test "$MD_CPU" = "armv5")
+  AM_CONDITIONAL(MD_CPU_armv7a, test "$MD_CPU" = "armv7a")
   AM_CONDITIONAL(MD_CPU_generic, test "$MD_CPU" = "generic")
 ])





reply via email to

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