1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-09 21:40:33 +02:00

Have `cpu-word-size' error out on unknown CPUs; add support for MIPSEL.

* module/system/base/target.scm (cpu-word-size): Add support for
  `mipsel'.  Call `error' when CPU is unknown.
This commit is contained in:
Ludovic Courtès 2012-01-09 23:25:02 +01:00
parent 211e71a184
commit 9d608ede96

View file

@ -1,6 +1,6 @@
;;; Compilation targets ;;; Compilation targets
;; Copyright (C) 2011 Free Software Foundation, Inc. ;; Copyright (C) 2011, 2012 Free Software Foundation, Inc.
;; This library is free software; you can redistribute it and/or ;; This library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public ;; modify it under the terms of the GNU Lesser General Public
@ -82,9 +82,9 @@
(cond ((string-match "^i[0-9]86$" cpu) 4) (cond ((string-match "^i[0-9]86$" cpu) 4)
((string-match "64$" cpu) 8) ((string-match "64$" cpu) 8)
((string-match "64[lbe][lbe]$" cpu) 8) ((string-match "64[lbe][lbe]$" cpu) 8)
((member cpu '("sparc" "powerpc" "mips")) 4) ((member cpu '("sparc" "powerpc" "mips" "mipsel")) 4)
((string-match "^arm.*" cpu) 4) ((string-match "^arm.*" cpu) 4)
(else "unknown CPU word size" cpu)))) (else (error "unknown CPU word size" cpu)))))
(define (triplet-cpu t) (define (triplet-cpu t)
(substring t 0 (string-index t #\-))) (substring t 0 (string-index t #\-)))