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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
From cbcff58ed670c8edc0be1004384cbe0fd07d8d26 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 5 Jul 2017 18:49:21 -0700
Subject: [PATCH 1/2] check for available arm optimizations
Taken From
http://sources.debian.net/src/mpeg2dec/0.5.1-7/debian/patches/65_arm-test-with-compiler.patch/
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
configure.ac | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
index acdcb1e..2c0a721 100644
--- a/configure.ac
+++ b/configure.ac
@@ -59,7 +59,7 @@ elif test x"$GCC" = x"yes"; then
AC_TRY_CFLAGS([$TRY_CFLAGS $CFLAGS],[OPT_CFLAGS="$TRY_CFLAGS"])
dnl arch-specific flags
- arm_conditional=false
+ build_arm_opt=false
case "$host" in
i?86-* | k?-* | x86_64-* | amd64-*)
AC_DEFINE([ARCH_X86],,[x86 architecture])
@@ -102,8 +102,12 @@ elif test x"$GCC" = x"yes"; then
alpha*)
AC_DEFINE([ARCH_ALPHA],,[alpha architecture]);;
arm*)
- arm_conditional=:
- AC_DEFINE([ARCH_ARM],,[ARM architecture]);;
+ AC_LANG(C)
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE([[
+ void foo(void) { __asm__ volatile("pld [r1]"); }]])],
+ build_arm_opt=true; AC_DEFINE([ARCH_ARM],,[ARM architecture]),
+ build_arm_opt=false);;
esac
elif test x"$CC" = x"tendracc"; then
dnl TenDRA portability checking compiler
@@ -123,7 +127,7 @@ else
esac
fi
-AM_CONDITIONAL(ARCH_ARM, ${arm_conditional})
+AM_CONDITIONAL(ARCH_ARM, test x$build_arm_opt = xtrue)
dnl Checks for libtool - this must be done after we set cflags
AC_LIBTOOL_WIN32_DLL
--
2.13.2
|