1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-05-27 19:41:50 +02:00

gnu: Add toolchain support for 'armhf-linux'.

Based on preliminary work by John Darrington <john@darrington.wattle.id.au>.

* gnu/packages/cross-base.scm (xgcc-armhf): New variable.
* gnu/packages/gcc.scm (gcc-configure-flags-for-triplet): Add armhf case.
  (gcc-4.7)[pre-configure]: Add gcc/config/*/linux-eabi.h to the list
  of files in which to patch GLIBC_DYNAMIC_LINKER.
* gnu/packages/bootstrap.scm (glibc-dynamic-linker): Add armhf case.
* guix/utils.scm (gnu-triplet->nix-system, nix-system->gnu-triplet):
  Add armhf cases.
This commit is contained in:
Mark H Weaver
2015-01-07 15:55:23 -05:00
parent f7d2b496b9
commit 3f00ff8b43
4 changed files with 36 additions and 13 deletions
+12 -3
View File
@@ -46,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"))
((string-match "^arm.*-gnueabihf$" target)
'("--with-arch=armv7-a"
"--with-float=hard"
"--with-mode=thumb"
;; See <https://wiki.debian.org/ArmHardFloatPort/VfpComparison#FPU>
"--with-fpu=vfpv3-d16"))
(else
;; TODO: Add `armel.*gnueabi', `hf', etc.
;; TODO: Add `arm.*-gnueabi', etc.
'())))
(define-public gcc-4.7
@@ -184,14 +193,14 @@ where the OS part is overloaded to denote a specific ABI---into GCC
(for-each
(lambda (x)
(substitute* (find-files "gcc/config"
"^linux(64|-elf)?\\.h$")
"^linux(64|-elf|-eabi)?\\.h$")
(("(#define GLIBC_DYNAMIC_LINKER.*)\\\\\n$" _ line)
line)))
'(1 2 3))
;; Fix the dynamic linker's file name.
(substitute* (find-files "gcc/config"
"^linux(64|-elf)?\\.h$")
"^linux(64|-elf|-eabi)?\\.h$")
(("#define GLIBC_DYNAMIC_LINKER([^ ]*).*$" _ suffix)
(format #f "#define GLIBC_DYNAMIC_LINKER~a \"~a\"~%"
suffix