mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
platform: Add glibc-dynamic-linker field.
* gnu/platform.scm (<platform>)[glibc-dynamic-linker]: New field. (platform-glibc-dynamic-linker, lookup-platform-by-system): New procedures. * gnu/platforms/arm.scm (armhf-linux, aarch64-linux): Add the glibc-dynamic-linker field. * gnu/platforms/hurd.scm (hurd): Ditto. * gnu/platforms/intel.scm (intel32-linux, intel64-linux, intel32-mingw, intel64-linux): Ditto. * gnu/platforms/mips.scm (mips64el-linux): Ditto. * gnu/platforms/powerpc.scm (powerpc-linux, powerpc64-linux): Ditto. * gnu/platforms/riscv.scm (riscv64-linux): Ditto. * gnu/platforms/s390.scm (riscv64-linux): Ditto. * gnu/packages/bootstrap.scm (glibc-dynamic-linker): Adapt it.
This commit is contained in:
parent
ec42d287b4
commit
4cf7d0f836
9 changed files with 85 additions and 41 deletions
|
@ -26,6 +26,7 @@
|
|||
(define-module (gnu packages bootstrap)
|
||||
#:use-module (guix licenses)
|
||||
#:use-module (gnu packages)
|
||||
#:use-module (gnu platform)
|
||||
#:use-module (guix packages)
|
||||
#:use-module (guix download)
|
||||
#:use-module (guix build-system)
|
||||
|
@ -314,33 +315,29 @@ or false to signal an error."
|
|||
(%current-system))))
|
||||
"Return the name of Glibc's dynamic linker for SYSTEM."
|
||||
;; See the 'SYSDEP_KNOWN_INTERPRETER_NAMES' cpp macro in libc.
|
||||
(cond ((string=? system "x86_64-linux") "/lib/ld-linux-x86-64.so.2")
|
||||
((string=? system "i686-linux") "/lib/ld-linux.so.2")
|
||||
((string=? system "armhf-linux") "/lib/ld-linux-armhf.so.3")
|
||||
((string=? system "mips64el-linux") "/lib/ld.so.1")
|
||||
((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 "powerpc-linux") "/lib/ld.so.1")
|
||||
((string=? system "powerpc64-linux") "/lib/ld64.so.1")
|
||||
((string=? system "powerpc64le-linux") "/lib/ld64.so.2")
|
||||
((string=? system "alpha-linux") "/lib/ld-linux.so.2")
|
||||
((string=? system "s390x-linux") "/lib/ld64.so.1")
|
||||
((string=? system "riscv64-linux") "/lib/ld-linux-riscv64-lp64d.so.1")
|
||||
(let ((platform (lookup-platform-by-system system)))
|
||||
(cond
|
||||
((platform? platform)
|
||||
(platform-glibc-dynamic-linker platform))
|
||||
|
||||
;; XXX: This one is used bare-bones, without a libc, so add a case
|
||||
;; here just so we can keep going.
|
||||
((string=? system "arm-elf") "no-ld.so")
|
||||
((string=? system "arm-eabi") "no-ld.so")
|
||||
((string=? system "xtensa-elf") "no-ld.so")
|
||||
((string=? system "avr") "no-ld.so")
|
||||
((string=? system "propeller-elf") "no-ld.so")
|
||||
((string=? system "i686-mingw") "no-ld.so")
|
||||
((string=? system "x86_64-mingw") "no-ld.so")
|
||||
((string=? system "vc4-elf") "no-ld.so")
|
||||
;; TODO: Define those as platforms.
|
||||
((string=? system "i686-gnu") "/lib/ld.so.1")
|
||||
((string=? system "powerpc64-linux") "/lib/ld64.so.1")
|
||||
((string=? system "alpha-linux") "/lib/ld-linux.so.2")
|
||||
|
||||
(else (error "dynamic linker name not known for this system"
|
||||
system))))
|
||||
;; XXX: This one is used bare-bones, without a libc, so add a case
|
||||
;; here just so we can keep going.
|
||||
((string=? system "arm-elf") "no-ld.so")
|
||||
((string=? system "arm-eabi") "no-ld.so")
|
||||
((string=? system "xtensa-elf") "no-ld.so")
|
||||
((string=? system "avr") "no-ld.so")
|
||||
((string=? system "propeller-elf") "no-ld.so")
|
||||
((string=? system "i686-mingw") "no-ld.so")
|
||||
((string=? system "x86_64-mingw") "no-ld.so")
|
||||
((string=? system "vc4-elf") "no-ld.so")
|
||||
|
||||
(else (error "dynamic linker name not known for this system"
|
||||
system)))))
|
||||
|
||||
|
||||
;;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue