summaryrefslogtreecommitdiff
path: root/package/valgrind/patches/patch-configure_in
blob: 418898ecf97094770965226e2842144afbf3f11d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
--- valgrind-3.7.0.orig/configure.in	2011-11-05 12:13:30.000000000 +0100
+++ valgrind-3.7.0/configure.in	2013-07-23 12:27:45.000000000 +0200
@@ -140,6 +140,8 @@ esac
 # configure-time, and distinguishes them from the VGA_*/VGO_*/VGP_*
 # variables used when compiling C files.
 
+VGCONF_PLATFORM_ARM_ARCH=
+
 AC_CANONICAL_HOST
 
 AC_MSG_CHECKING([for a supported CPU])
@@ -176,15 +178,26 @@ case "${host_cpu}" in
         ;;
 
      armv7*)
-	AC_MSG_RESULT([ok (${host_cpu})])
-	ARCH_MAX="arm"
-	;;
+       # This means we use a armv7 toolchain - at least Cortex-A8
+       AC_MSG_RESULT([ok (${host_cpu} using armv7 codepath)])
+       ARCH_MAX="arm"
+       VGCONF_PLATFORM_ARM_ARCH="-march=armv7 -mcpu=cortex-a8"
+	   ;;
+
+     arm*)
+       # Generic arm toolchain - we will target armv6
+       AC_MSG_RESULT([(${host_cpu}) - no armv7 toolchain specified, will enforce armv6 when compiling])
+       ARCH_MAX="arm"
+       VGCONF_PLATFORM_ARM_ARCH="-march=armv6"
+       AC_DEFINE(ARM_ARCH_V6,1,"Defined for v6 architectures")
+      ;;
 
      *) 
 	AC_MSG_RESULT([no (${host_cpu})])
 	AC_MSG_ERROR([Unsupported host architecture. Sorry])
 	;;
 esac
+AC_SUBST(VGCONF_PLATFORM_ARM_ARCH)
 
 #----------------------------------------------------------------------------