mpir: fix build on ARM Thumb-only platforms
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 8 May 2017 19:45:48 +0000 (21:45 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Tue, 9 May 2017 15:03:23 +0000 (17:03 +0200)
The optimized ARM assembly code is not suitable for Thumb-only
platforms, so use the generic code in such situations.

Fixes:

  http://autobuild.buildroot.net/results/4d7f2a1326f75e11693bdd51ad274079b0dd0ce4/
  (ARM Cortex-M4 toolchain)

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/mpir/mpir.mk

index b7f38290078aa9672b7adb3c1444aa1fae2e10e4..cf175023586ec570e461466a3c3bfe019bd15e2f 100644 (file)
@@ -20,4 +20,10 @@ ifeq ($(BR2_MIPS_NABI64),y)
 MPIR_CONF_OPTS += ABI=64
 endif
 
+# The optimized ARM assembly code uses ARM-only (i.e not Thumb1/2
+# compatible) instructions.
+ifeq ($(BR2_arm)$(BR2_armeb):$(BR2_ARM_CPU_HAS_ARM),y:)
+MPIR_CONF_ENV += MPN_PATH="generic"
+endif
+
 $(eval $(autotools-package))