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.master
parent
ec42d287b4
commit
4cf7d0f836
|
@ -26,6 +26,7 @@
|
||||||
(define-module (gnu packages bootstrap)
|
(define-module (gnu packages bootstrap)
|
||||||
#:use-module (guix licenses)
|
#:use-module (guix licenses)
|
||||||
#:use-module (gnu packages)
|
#:use-module (gnu packages)
|
||||||
|
#:use-module (gnu platform)
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
#:use-module (guix download)
|
#:use-module (guix download)
|
||||||
#:use-module (guix build-system)
|
#:use-module (guix build-system)
|
||||||
|
@ -314,33 +315,29 @@ or false to signal an error."
|
||||||
(%current-system))))
|
(%current-system))))
|
||||||
"Return the name of Glibc's dynamic linker for SYSTEM."
|
"Return the name of Glibc's dynamic linker for SYSTEM."
|
||||||
;; See the 'SYSDEP_KNOWN_INTERPRETER_NAMES' cpp macro in libc.
|
;; See the 'SYSDEP_KNOWN_INTERPRETER_NAMES' cpp macro in libc.
|
||||||
(cond ((string=? system "x86_64-linux") "/lib/ld-linux-x86-64.so.2")
|
(let ((platform (lookup-platform-by-system system)))
|
||||||
((string=? system "i686-linux") "/lib/ld-linux.so.2")
|
(cond
|
||||||
((string=? system "armhf-linux") "/lib/ld-linux-armhf.so.3")
|
((platform? platform)
|
||||||
((string=? system "mips64el-linux") "/lib/ld.so.1")
|
(platform-glibc-dynamic-linker platform))
|
||||||
((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")
|
|
||||||
|
|
||||||
;; XXX: This one is used bare-bones, without a libc, so add a case
|
;; TODO: Define those as platforms.
|
||||||
;; here just so we can keep going.
|
((string=? system "i686-gnu") "/lib/ld.so.1")
|
||||||
((string=? system "arm-elf") "no-ld.so")
|
((string=? system "powerpc64-linux") "/lib/ld64.so.1")
|
||||||
((string=? system "arm-eabi") "no-ld.so")
|
((string=? system "alpha-linux") "/lib/ld-linux.so.2")
|
||||||
((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"
|
;; XXX: This one is used bare-bones, without a libc, so add a case
|
||||||
system))))
|
;; 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)))))
|
||||||
|
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
platform-target
|
platform-target
|
||||||
platform-system
|
platform-system
|
||||||
platform-linux-architecture
|
platform-linux-architecture
|
||||||
|
platform-glibc-dynamic-linker
|
||||||
|
|
||||||
platform-modules
|
platform-modules
|
||||||
platforms
|
platforms
|
||||||
|
@ -58,12 +59,17 @@
|
||||||
;;
|
;;
|
||||||
;; The 'linux-architecture' is only relevant if the kernel is Linux. In that
|
;; The 'linux-architecture' is only relevant if the kernel is Linux. In that
|
||||||
;; case, it corresponds to the ARCH variable used when building Linux.
|
;; case, it corresponds to the ARCH variable used when building Linux.
|
||||||
|
;;
|
||||||
|
;; The 'glibc-dynamic-linker' field is the name of Glibc's dynamic linker for
|
||||||
|
;; the corresponding system.
|
||||||
(define-record-type* <platform> platform make-platform
|
(define-record-type* <platform> platform make-platform
|
||||||
platform?
|
platform?
|
||||||
(target platform-target) ;"x86_64-linux-gnu"
|
(target platform-target)
|
||||||
(system platform-system) ;"x86_64-linux"
|
(system platform-system)
|
||||||
(linux-architecture platform-linux-architecture ;"x86"
|
(linux-architecture platform-linux-architecture
|
||||||
(default #f)))
|
(default #f))
|
||||||
|
(glibc-dynamic-linker platform-glibc-dynamic-linker))
|
||||||
|
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
;;; Platforms.
|
;;; Platforms.
|
||||||
|
|
|
@ -27,10 +27,12 @@
|
||||||
(platform
|
(platform
|
||||||
(target "arm-linux-gnueabihf")
|
(target "arm-linux-gnueabihf")
|
||||||
(system "armhf-linux")
|
(system "armhf-linux")
|
||||||
(linux-architecture "arm")))
|
(linux-architecture "arm")
|
||||||
|
(glibc-dynamic-linker "/lib/ld-linux-armhf.so.3")))
|
||||||
|
|
||||||
(define aarch64-linux
|
(define aarch64-linux
|
||||||
(platform
|
(platform
|
||||||
(target "aarch64-linux-gnu")
|
(target "aarch64-linux-gnu")
|
||||||
(system "aarch64-linux")
|
(system "aarch64-linux")
|
||||||
(linux-architecture "arm64")))
|
(linux-architecture "arm64")
|
||||||
|
(glibc-dynamic-linker "/lib/ld-linux-aarch64.so.1")))
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
|
;;; Copyright © 2021 Mathieu Othacehe <othacehe@gnu.org>
|
||||||
|
;;;
|
||||||
|
;;; This file is part of GNU Guix.
|
||||||
|
;;;
|
||||||
|
;;; GNU Guix is free software; you can redistribute it and/or modify it
|
||||||
|
;;; under the terms of the GNU General Public License as published by
|
||||||
|
;;; the Free Software Foundation; either version 3 of the License, or (at
|
||||||
|
;;; your option) any later version.
|
||||||
|
;;;
|
||||||
|
;;; GNU Guix is distributed in the hope that it will be useful, but
|
||||||
|
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
;;; GNU General Public License for more details.
|
||||||
|
;;;
|
||||||
|
;;; You should have received a copy of the GNU General Public License
|
||||||
|
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
(define-module (gnu platforms hurd)
|
||||||
|
#:use-module (gnu platform)
|
||||||
|
#:use-module (gnu packages linux)
|
||||||
|
#:use-module (guix records)
|
||||||
|
#:export (hurd))
|
||||||
|
|
||||||
|
(define hurd
|
||||||
|
(platform
|
||||||
|
(target "i586-pc-gnu")
|
||||||
|
(system "i586-gnu")
|
||||||
|
(glibc-dynamic-linker "/lib/ld.so.1")))
|
|
@ -26,4 +26,5 @@
|
||||||
(platform
|
(platform
|
||||||
(target "mips64el-linux-gnu")
|
(target "mips64el-linux-gnu")
|
||||||
(system "mips64el-linux")
|
(system "mips64el-linux")
|
||||||
(linux-architecture "mips")))
|
(linux-architecture "mips")
|
||||||
|
(glibc-dynamic-linker "/lib/ld.so.1")))
|
||||||
|
|
|
@ -27,10 +27,12 @@
|
||||||
(platform
|
(platform
|
||||||
(target "powerpc-linux-gnu")
|
(target "powerpc-linux-gnu")
|
||||||
(system "powerpc-linux")
|
(system "powerpc-linux")
|
||||||
(linux-architecture "powerpc")))
|
(linux-architecture "powerpc")
|
||||||
|
(glibc-dynamic-linker "/lib/ld.so.1")))
|
||||||
|
|
||||||
(define powerpc64le-linux
|
(define powerpc64le-linux
|
||||||
(platform
|
(platform
|
||||||
(target "powerpc64le-linux-gnu")
|
(target "powerpc64le-linux-gnu")
|
||||||
(system "powerpc64le-linux")
|
(system "powerpc64le-linux")
|
||||||
(linux-architecture "powerpc")))
|
(linux-architecture "powerpc")
|
||||||
|
(glibc-dynamic-linker "/lib/ld64.so.2")))
|
||||||
|
|
|
@ -26,4 +26,5 @@
|
||||||
(platform
|
(platform
|
||||||
(target "riscv64-linux-gnu")
|
(target "riscv64-linux-gnu")
|
||||||
(system "riscv64-linux")
|
(system "riscv64-linux")
|
||||||
(linux-architecture "riscv")))
|
(linux-architecture "riscv")
|
||||||
|
(glibc-dynamic-linker "/lib/ld-linux-riscv64-lp64d.so.1")))
|
||||||
|
|
|
@ -26,4 +26,5 @@
|
||||||
(platform
|
(platform
|
||||||
(target "s390x-linux-gnu")
|
(target "s390x-linux-gnu")
|
||||||
(system "s390x-linux")
|
(system "s390x-linux")
|
||||||
(linux-architecture "s390")))
|
(linux-architecture "s390")
|
||||||
|
(glibc-dynamic-linker "/lib/ld64.so.1")))
|
||||||
|
|
|
@ -29,25 +29,30 @@
|
||||||
(platform
|
(platform
|
||||||
(target "i686-linux-gnu")
|
(target "i686-linux-gnu")
|
||||||
(system "i686-linux")
|
(system "i686-linux")
|
||||||
(linux-architecture "i386")))
|
(linux-architecture "i386")
|
||||||
|
(glibc-dynamic-linker "/lib/ld-linux.so.2")))
|
||||||
|
|
||||||
(define x86_64-linux
|
(define x86_64-linux
|
||||||
(platform
|
(platform
|
||||||
(target "x86_64-linux-gnu")
|
(target "x86_64-linux-gnu")
|
||||||
(system "x86_64-linux")
|
(system "x86_64-linux")
|
||||||
(linux-architecture "x86_64")))
|
(linux-architecture "x86_64")
|
||||||
|
(glibc-dynamic-linker "/lib/ld-linux-x86-64.so.2")))
|
||||||
|
|
||||||
(define i686-mingw
|
(define i686-mingw
|
||||||
(platform
|
(platform
|
||||||
(target "i686-w64-mingw32")
|
(target "i686-w64-mingw32")
|
||||||
(system #f)))
|
(system #f)
|
||||||
|
(glibc-dynamic-linker #f)))
|
||||||
|
|
||||||
(define x86_64-mingw
|
(define x86_64-mingw
|
||||||
(platform
|
(platform
|
||||||
(target "x86_64-w64-mingw32")
|
(target "x86_64-w64-mingw32")
|
||||||
(system #f)))
|
(system #f)
|
||||||
|
(glibc-dynamic-linker #f)))
|
||||||
|
|
||||||
(define hurd
|
(define hurd
|
||||||
(platform
|
(platform
|
||||||
(target "i586-pc-gnu")
|
(target "i586-pc-gnu")
|
||||||
(system "i586-gnu")))
|
(system "i586-gnu")
|
||||||
|
(glibc-dynamic-linker "/lib/ld.so.1")))
|
||||||
|
|
Reference in New Issue