guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/03: gnu: New architecture: armel-linux-gnueabihf


From: John Darrington
Subject: 01/03: gnu: New architecture: armel-linux-gnueabihf
Date: Wed, 26 Nov 2014 16:19:13 +0000

jmd pushed a commit to branch wip-arm
in repository guix.

commit 0386b83a27c2367fb00e6d9f3b240d90c15936b3
Author: John Darrington <address@hidden>
Date:   Thu Nov 13 19:48:59 2014 +0100

    gnu: New architecture: armel-linux-gnueabihf
    
    * gnu/packages/bootstrap.scm (glibc-dynamic-linker): Add armel-linux case.
    * gnu/packages/cross-base.scm: New procedure xgcc-armel.
    * gnu/packages/gcc.scm (gcc-configure-flags-for-triplet): Add flags for 
armel-linux-gnueabihf.
---
 gnu/packages/bootstrap.scm  |    1 +
 gnu/packages/cross-base.scm |   10 +++++-----
 gnu/packages/gcc.scm        |   34 ++++++++++++++++++++++++++++++++--
 3 files changed, 38 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index 854d97b..6062ef8 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -158,6 +158,7 @@ check whether everything is alright."
   (cond ((string=? system "x86_64-linux") "/lib/ld-linux-x86-64.so.2")
         ((string=? system "i686-linux") "/lib/ld-linux.so.2")
         ((string=? system "mips64el-linux") "/lib/ld.so.1")
+        ((string=? system "armel-linux") "/lib/ld-linux-armhf.so.3")
 
         ;; XXX: This one is used bare-bones, without a libc, so add a case
         ;; here just so we can keep going.
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 74809d0..fe6e364 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -323,8 +323,8 @@ XBINUTILS and the cross tool chain."
   ;; Bare-bones Xtensa cross-compiler, used to build the Atheros firmware.
   (cross-gcc "xtensa-elf"))
 
-;; (define-public xgcc-armel
-;;   (let ((triplet "armel-linux-gnueabi"))
-;;     (cross-gcc triplet
-;;                (cross-binutils triplet)
-;;                (cross-libc triplet))))
+(define-public xgcc-armel
+  (let ((triplet "armel-linux-gnueabihf"))
+    (cross-gcc triplet
+               (cross-binutils triplet)
+               (cross-libc triplet))))
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index 6dfdcea..b9fb37a 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -1,3 +1,4 @@
+
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <address@hidden>
 ;;;
@@ -45,8 +46,17 @@ where the OS part is overloaded to denote a specific 
ABI---into GCC
          ;; Triplets recognized by glibc as denoting the N64 ABI; see
          ;; ports/sysdeps/mips/preconfigure.
          '("--with-abi=64"))
-        (else
-         ;; TODO: Add `armel.*gnueabi', `hf', etc.
+
+        ((string-match "^armel-.*-gnueabihf$" target)
+         '("--with-float=hard"
+           "--with-arch=armv7-a"
+           "--with-tune=cortex-a9" 
+           "--with-fpu=neon" 
+           "--with-mode=thumb"
+           "CFLAGS=-Wno-cast-qual"
+           "--disable-werror"))
+  
+       (else
          '())))
 
 (define-public gcc-4.7
@@ -186,6 +196,26 @@ where the OS part is overloaded to denote a specific 
ABI---into GCC
                            suffix
                            (string-append libc ,(glibc-dynamic-linker)))))
 
+                ;; Arm: Patch to be hard float
+                (let ((comment "  /* Modified by Guix */")
+                      (linux-eabi.h "gcc/config/arm/linux-eabi.h"))
+                  (substitute* linux-eabi.h
+                    (("#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_SOFT")
+                     (string-append 
+                      "#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD" 
comment)))
+                  
+                  (substitute* linux-eabi.h
+                    (("#define GLIBC_DYNAMIC_LINKER_DEFAULT 
GLIBC_DYNAMIC_LINKER_SOFT_FLOAT")
+                     (string-append 
+                      "#define GLIBC_DYNAMIC_LINKER_DEFAULT 
GLIBC_DYNAMIC_LINKER_HARD_FLOAT" 
+                      comment)))
+
+                  (substitute* linux-eabi.h
+                    (("#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi")
+                     (string-append  
+                      "#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi"
+                      comment))))
+
                 ;; Tell where to find libstdc++, libc, and `?crt*.o', except
                 ;; `crt{begin,end}.o', which come with GCC.
                 (substitute* (find-files "gcc/config"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]