0001-fix_arm_endianness.patch 1.1 KB

12345678910111213141516171819202122232425
  1. Fix support for ARM endianness, otherwise it gives the error
  2. "unknown CPU endianness"
  3. Signed-off-by: Pedro Aguilar <paguilar@paguilar.org>
  4. diff -Nau guile-2.0.11.orig/module/system/base/target.scm guile-2.0.11/module/system/base/target.scm
  5. --- guile-2.0.11.orig/module/system/base/target.scm 2013-02-28 09:42:45.000000000 +0100
  6. +++ guile-2.0.11/module/system/base/target.scm 2014-11-03 23:05:01.789338997 +0100
  7. @@ -70,7 +70,15 @@
  8. ((member cpu '("sparc" "sparc64" "powerpc" "powerpc64" "spu"
  9. "mips" "mips64"))
  10. (endianness big))
  11. - ((string-match "^arm.*el" cpu)
  12. + ((string-match "^arm.*el" cpu)
  13. + (endianness little))
  14. + ((string-match "^arm.*eb" cpu)
  15. + (endianness big))
  16. + ((string-prefix? "arm" cpu) ;ARMs are LE by default
  17. + (endianness little))
  18. + ((string-match "^aarch64.*be" cpu)
  19. + (endianness big))
  20. + ((string=? "aarch64" cpu)
  21. (endianness little))
  22. (else
  23. (error "unknown CPU endianness" cpu)))))