aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-06-26 22:37:38 +0200
committerLudovic Courtès <ludo@gnu.org>2013-06-26 22:39:21 +0200
commitbeda99e882e6049f4bf426551d0fd8a2cc7127e0 (patch)
tree9caf3488c3700dffd8bdd6d1e1c0f1c6e38021b8 /gnu
parent5708485357ef0e55f5148347958c4fe9a860453e (diff)
downloadguix-beda99e882e6049f4bf426551d0fd8a2cc7127e0.tar
guix-beda99e882e6049f4bf426551d0fd8a2cc7127e0.tar.gz
gnu: cross-base: Add support for `mips64el-linux-gnu-gnuabi64' (N64 ABI).
* gnu/packages/cross-base.scm (gcc-configure-flags-for-triplet): New procedure. (cross-gcc): Use it. (xgcc-mips64el): Use *-gnuabi64 instead of the N32 ABI.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/cross-base.scm18
1 files changed, 17 insertions, 1 deletions
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 68c321ee89..5edc1b52e3 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -30,6 +30,7 @@
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
#:use-module (ice-9 match)
+ #:use-module (ice-9 regex)
#:export (cross-binutils
cross-libc
cross-gcc))
@@ -65,6 +66,20 @@
`(cons "--with-sysroot=/" ,flags)))))))
(cross binutils target)))
+(define (gcc-configure-flags-for-triplet target)
+ "Return a list of additional GCC `configure' flags for TARGET, a GNU triplet.
+
+The purpose of this procedure is to translate extended GNU triplets---e.g.,
+where the OS part is overloaded to denote a specific ABI---into GCC
+`configure' options. We take extended GNU triplets that glibc recognizes."
+ (cond ((string-match "^mips64el.*gnuabin?64$" target)
+ ;; Triplets recognized by glibc as denoting the N64 ABI; see
+ ;; ports/sysdeps/mips/preconfigure.
+ '("--with-abi=64"))
+ (else
+ ;; TODO: Add `armel.*gnueabi', `hf', etc.
+ '())))
+
(define* (cross-gcc target
#:optional (xbinutils (cross-binutils target)) libc)
"Return a cross-compiler for TARGET, where TARGET is a GNU triplet. Use
@@ -86,6 +101,7 @@ GCC that does not target a libc; otherwise, target that libc."
,@(substitute-keyword-arguments (package-arguments gcc-4.7)
((#:configure-flags flags)
`(append (list ,(string-append "--target=" target)
+ ,@(gcc-configure-flags-for-triplet target)
,@(if libc
'()
`( ;; Disable features not needed at this stage.
@@ -260,7 +276,7 @@ XBINUTILS and the cross tool chain."
;;;
(define-public xgcc-mips64el
- (let ((triplet "mips64el-linux-gnu"))
+ (let ((triplet "mips64el-linux-gnuabi64")) ; N64 ABI
(cross-gcc triplet
(cross-binutils triplet)
(cross-libc triplet))))