summaryrefslogtreecommitdiff
path: root/package/guile/0001-fix_arm_endianness.patch
blob: 67c0b606ee7a9e2839582992de0ec18b717fa60f (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
Fix support for ARM endianness, otherwise it gives the error
"unknown CPU endianness"

Signed-off-by: Pedro Aguilar <paguilar@paguilar.org>

diff -Nau guile-2.0.11.orig/module/system/base/target.scm guile-2.0.11/module/system/base/target.scm
--- guile-2.0.11.orig/module/system/base/target.scm	2013-02-28 09:42:45.000000000 +0100
+++ guile-2.0.11/module/system/base/target.scm	2014-11-03 23:05:01.789338997 +0100
@@ -70,7 +70,15 @@
             ((member cpu '("sparc" "sparc64" "powerpc" "powerpc64" "spu"
                            "mips" "mips64"))
              (endianness big))
-            ((string-match "^arm.*el" cpu)
+            ((string-match "^arm.*el" cpu)
+             (endianness little))
+            ((string-match "^arm.*eb" cpu)
+             (endianness big))
+            ((string-prefix? "arm" cpu)          ;ARMs are LE by default
+             (endianness little))
+            ((string-match "^aarch64.*be" cpu)
+             (endianness big))
+            ((string=? "aarch64" cpu)
              (endianness little))
             (else
              (error "unknown CPU endianness" cpu)))))