kumquat-buildroot/package/guile/guile-01-fix_arm_endianness.patch
Pedro Aguilar 6322f25e1f guile: Add new package
Guile is an interpreter and compiler for the Scheme programming
language, a clean and elegant dialect of Lisp.

The patch guile-01-fix_arm_endianness.patch is based on guile's
git commit ^ffd3e55cfd

[Thomas:
 - rewrap comments and help text.
 - add missing host-gettext dependency, since gettext.m4 is needed for
   the package to autoreconf.
 - add missing host-pkgconf dependency.
 - add dependency on wchar, inherited from libunistring.]

Signed-off-by: Pedro Aguilar <paguilar@paguilar.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-11-26 21:51:41 +01:00

26 lines
1.1 KiB
Diff

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)))))