--- Begin Message ---
Subject: |
[PATCH] gnu: add basic support for "alpha-linux" system |
Date: |
Sun, 19 Feb 2017 19:31:58 +0000 |
This change allows cross-building packages
by just using --target=alpha-unknown-linux-gnu re2c:
$ ./pre-inst-env guix build --target=alpha-unknown-linux-gnu re2c
$ file /gnu/store/p1z9iszzb4ng0vzc535sc2ha33ax24l6-re2c-0.16/bin/re2c
/gnu/store/p1z9iszzb4ng0vzc535sc2ha33ax24l6-re2c-0.16/bin/re2c: ELF 64-bit LSB
executable, Alpha (unofficial), version 1 (SYSV), dynamically linked,
interpreter
/gnu/store/0z5d6z3hh41w7z5g2g82zlnwgpbj0i1a-glibc-cross-alpha-unknown-linux-gnu-2.24/lib/ld-linux.so.2,
for GNU/Linux 3.2.0, not stripped
The only slighty nontrivial change is GLIBC_DYNAMIC_LINKER change:
glibc for alpha uses 'GLIBC_DYNAMIC_LINKER<TAB>"/lib/ld-linux.so.2"'
* gnu/packages/bootstrap.scm (glibc-dynamic-linker): add "/lib/ld-linux.so.2"
as "alpha-linux" ld.so
* gnu/packages/gcc.scm (gcc-4.7): fix GLIBC_DYNAMIC_LINKER substitution when
delimiter is a tab
* gnu/packages/linux.scm (system->linux-architecture): add "alpha" arch
Signed-off-by: Sergei Trofimovich <address@hidden>
---
gnu/packages/bootstrap.scm | 1 +
gnu/packages/gcc.scm | 2 +-
gnu/packages/linux.scm | 1 +
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index c8d94c830..b4847094b 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -167,6 +167,7 @@ successful, or false to signal an error."
((string=? system "i586-gnu") "/lib/ld.so.1")
((string=? system "i686-gnu") "/lib/ld.so.1")
((string=? system "aarch64-linux") "/lib/ld-linux-aarch64.so.1")
+ ((string=? system "alpha-linux") "/lib/ld-linux.so.2")
;; 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/gcc.scm b/gnu/packages/gcc.scm
index cfd33f85a..7522f1c7f 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -212,7 +212,7 @@ where the OS part is overloaded to denote a specific
ABI---into GCC
;; Fix the dynamic linker's file name.
(substitute* (find-files "gcc/config"
"^(linux|gnu)(64|-elf|-eabi)?\\.h$")
- (("#define GLIBC_DYNAMIC_LINKER([^ ]*).*$" _ suffix)
+ (("#define GLIBC_DYNAMIC_LINKER([^ \t]*).*$" _ suffix)
(format #f "#define GLIBC_DYNAMIC_LINKER~a \"~a\"~%"
suffix
(string-append libc ,(glibc-dynamic-linker)))))
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 9212b40a1..7d59faf4a 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -106,6 +106,7 @@
((string-prefix? "mips" arch) "mips")
((string-prefix? "arm" arch) "arm")
((string-prefix? "aarch64" arch) "arm64")
+ ((string-prefix? "alpha" arch) "alpha")
(else arch))))
(define (linux-libre-urls version)
--
2.11.1
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#25799: [PATCH] gnu: add basic support for "alpha-linux" system |
Date: |
Thu, 13 Apr 2017 14:50:13 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) |
Hello!
Sergei Trofimovich <address@hidden> skribis:
> I've heard core-updates were merged to master. Congratulations!
Indeed, thanks for following up!
> From fb53ef5d023624dc06de013d4a135bcec979a4cf Mon Sep 17 00:00:00 2001
> From: Sergei Trofimovich <address@hidden>
> Date: Sun, 19 Feb 2017 19:21:06 +0000
> Subject: [PATCH] gnu: add basic support for "alpha-linux" system
>
> This change allows cross-building packages
> by just using --target=alpha-unknown-linux-gnu re2c:
>
> $ ./pre-inst-env guix build --target=alpha-unknown-linux-gnu re2c
> $ file /gnu/store/p1z9iszzb4ng0vzc535sc2ha33ax24l6-re2c-0.16/bin/re2c
> /gnu/store/p1z9iszzb4ng0vzc535sc2ha33ax24l6-re2c-0.16/bin/re2c: \
> ELF 64-bit LSB executable, Alpha (unofficial), version 1 (SYSV),
> dynamically linked, \
> interpreter
> /gnu/store/0z5d6z3hh41w7z5g2g82zlnwgpbj0i1a-glibc-cross-alpha-unknown-linux-gnu-2.24/lib/ld-linux.so.2,
> \
> for GNU/Linux 3.2.0, not stripped
>
> gcc for alpha uses 'GLIBC_DYNAMIC_LINKER<TAB>"/lib/ld-linux.so.2"'
>
> * gnu/packages/gcc.scm (gcc-4.7): fix GLIBC_DYNAMIC_LINKER substitution when
> delimiter is a tab
>
> Signed-off-by: Sergei Trofimovich <address@hidden>
I tweaked the commit log and pushed to ‘core-updates’.
> From 5d31bb14ce6aaecfaf022616e538470036916cef Mon Sep 17 00:00:00 2001
> From: Sergei Trofimovich <address@hidden>
> Date: Mon, 6 Mar 2017 22:21:43 +0000
> Subject: [PATCH] gnu: libffi: apply alpha build fix
>
> * gnu/packages/patches/libffi-3.2.1-complex_alpha.patch: new file
> * gnu/local.mk (dist_patch_DATA): add patch
> * gnu/packages/libffi.scm (libffi): apply Gentoo patch to fix alpha build
Ditto, and I changed the file name to use a hyphen instead of an
underscore. :-)
Hopefully cross-compilation to alpha-linux-gnu now works in ‘core-updates’?
Thank you!
Ludo’.
--- End Message ---