• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/libmpeg2/0003-fix-arm-detection.patch
Thomas PetazzoniThomas Petazzoni committed 187e5bc92b605 Nov 2016
Raw file
Source viewDiff to previous
 
1
Improve the ARM detection to work on Thumb-only architecture
2
​
3
The ARM-specific assembly code doesn't build on Thumb-only
4
architectures such as ARMv7-M, but the configure script assumes that
5
if the host tuple is arm*, then it can build and use the ARM optimized
6
code.
7
​
8
This patch improves the configure.ac detection logic, by building one
9
of the instruction of the optimized assembly code, and using this to
10
decide whether or not the optimizations should be enabled.
11
​
12
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
13
​
14
Index: b/configure.ac
15
===================================================================
16
--- a/configure.ac
17
+++ b/configure.ac
18
@@ -101,8 +101,10 @@
19
     alpha*)
20
    AC_DEFINE([ARCH_ALPHA],,[alpha architecture]);;
21
     arm*)
22
-   arm_conditional=:
23
-   AC_DEFINE([ARCH_ARM],,[ARM architecture]);;
24
+   AC_TRY_LINK([], [asm(".syntax divided\nstmfd sp!,{r4-r11,lr}")],
25
+        [AC_DEFINE([ARCH_ARM],,[ARM architecture])
26
+         use_arm_optimization=yes],
27
+        [use_arm_optimization=no])
28
     esac
29
 elif test x"$CC" = x"tendracc"; then
30
     dnl TenDRA portability checking compiler
31
@@ -122,7 +124,7 @@
32
     esac
33
 fi
34
 
35
-AM_CONDITIONAL(ARCH_ARM, ${arm_conditional})
36
+AM_CONDITIONAL(ARCH_ARM, test "${use_arm_optimization}" = "yes")
37
 
38
 dnl Checks for libtool - this must be done after we set cflags
39
 AC_LIBTOOL_WIN32_DLL
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.