From df8c52e93dfa3965e4714275f4b8cea2c8e0170b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 4 Jul 2014 15:35:06 +0200 Subject: [PATCH] Recognize arm-* target triplets. Reported by Sylvain Beucler . * module/system/base/target.scm (cpu-endianness): Add case where CPU is "arm". * test-suite/tests/asm-to-bytecode.test ("cross-compilation")["arm-unknown-linux-androideabi"]: New test. --- module/system/base/target.scm | 4 +++- test-suite/tests/asm-to-bytecode.test | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/module/system/base/target.scm b/module/system/base/target.scm index c74ae679d..cefa951a3 100644 --- a/module/system/base/target.scm +++ b/module/system/base/target.scm @@ -1,6 +1,6 @@ ;;; Compilation targets -;; Copyright (C) 2011, 2012, 2013 Free Software Foundation, Inc. +;; Copyright (C) 2011, 2012, 2013, 2014 Free Software Foundation, Inc. ;; This library is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public @@ -72,6 +72,8 @@ (endianness big)) ((string-match "^arm.*el" cpu) (endianness little)) + ((string=? "arm" cpu) ;ARMs are LE by default + (endianness little)) (else (error "unknown CPU endianness" cpu))))) diff --git a/test-suite/tests/asm-to-bytecode.test b/test-suite/tests/asm-to-bytecode.test index 6d2f20e02..62ea0ed9e 100644 --- a/test-suite/tests/asm-to-bytecode.test +++ b/test-suite/tests/asm-to-bytecode.test @@ -1,6 +1,6 @@ ;;;; Assembly to bytecode compilation -*- mode: scheme; coding: utf-8; -*- ;;;; -;;;; Copyright (C) 2010, 2011, 2012, 2013 Free Software Foundation, Inc. +;;;; Copyright (C) 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc. ;;;; ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public @@ -205,6 +205,9 @@ (test-target "x86_64-unknown-linux-gnux32" ; x32 ABI (Debian tuplet) (endianness little) 4) + (test-target "arm-unknown-linux-androideabi" + (endianness little) 4) + (pass-if-exception "unknown target" exception:miscellaneous-error (call-with-values (lambda ()