diff options
author | Ludovic Courtès <ludo@gnu.org> | 2013-02-28 09:42:31 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2013-02-28 09:42:45 +0100 |
commit | aacc689677316ebb1ea45bb8fb22f921ebaf97d5 (patch) | |
tree | c3c321a7c5e111767b55100b44e86b212c2a790c | |
parent | a5d8f98c60344548f0b6a70828b95f2b2e1f7553 (diff) | |
download | guile-aacc689677316ebb1ea45bb8fb22f921ebaf97d5.tar.gz |
Fix handling of the *-gnux32 target.
* module/system/base/target.scm (triplet-pointer-size): Fix typo in the
x32 triplet name.
* test-suite/tests/asm-to-bytecode.test (native-os): New procedure.
(test-target): Use (native-word-size) only when both the CPU and OS
match.
-rw-r--r-- | module/system/base/target.scm | 2 | ||||
-rw-r--r-- | test-suite/tests/asm-to-bytecode.test | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/module/system/base/target.scm b/module/system/base/target.scm index 762894ca3..c74ae679d 100644 --- a/module/system/base/target.scm +++ b/module/system/base/target.scm @@ -92,7 +92,7 @@ ((string-match "^mips64.*-gnuabi64" triplet) 8) ; n64 ABI ((string-match "^mips64" cpu) 4) ; n32 or o32 - ((string-match "^x64_64-.*-gnux32" triplet) 4) ; x32 + ((string-match "^x86_64-.*-gnux32" triplet) 4) ; x32 ((string-match "64$" cpu) 8) ((string-match "64[lbe][lbe]$" cpu) 8) diff --git a/test-suite/tests/asm-to-bytecode.test b/test-suite/tests/asm-to-bytecode.test index 3bd8a929b..6d2f20e02 100644 --- a/test-suite/tests/asm-to-bytecode.test +++ b/test-suite/tests/asm-to-bytecode.test @@ -132,6 +132,9 @@ (define (native-cpu) (with-target %host-type target-cpu)) +(define (native-os) + (with-target %host-type target-os)) + (define (native-word-size) ((@ (system foreign) sizeof) '*)) @@ -152,7 +155,8 @@ ;; actually has a 32-bit user-land, for instance (see ;; <http://www.debian.org/ports/sparc/#sparc64bit> ;; for details.) - (if (string=? (native-cpu) (target-cpu)) + (if (and (string=? (native-cpu) (target-cpu)) + (string=? (native-os) (target-os))) (native-word-size) word-size)) (b (compile-bytecode |