diff options
| author | Mathieu Othacehe <othacehe@gnu.org> | 2022-05-07 17:02:51 +0200 |
|---|---|---|
| committer | Mathieu Othacehe <othacehe@gnu.org> | 2022-05-22 15:15:33 +0200 |
| commit | 4cf7d0f836d08fd41aab02e1f6793146ce3cad8d (patch) | |
| tree | 6f58878b47518666be8622545afd57b792f60bae /gnu/packages/bootstrap.scm | |
| parent | ec42d287b4558b4d1908e3e71dcf9358d5c6ae8c (diff) | |
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.
Diffstat (limited to 'gnu/packages/bootstrap.scm')
| -rw-r--r-- | gnu/packages/bootstrap.scm | 47 |
1 files changed, 22 insertions, 25 deletions
diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm index 8bd0c4eaf3a..5337617a533 100644 --- a/gnu/packages/bootstrap.scm +++ b/gnu/packages/bootstrap.scm | |||
| @@ -26,6 +26,7 @@ | |||
| 26 | (define-module (gnu packages bootstrap) | 26 | (define-module (gnu packages bootstrap) |
| 27 | #:use-module (guix licenses) | 27 | #:use-module (guix licenses) |
| 28 | #:use-module (gnu packages) | 28 | #:use-module (gnu packages) |
| 29 | #:use-module (gnu platform) | ||
| 29 | #:use-module (guix packages) | 30 | #:use-module (guix packages) |
| 30 | #:use-module (guix download) | 31 | #:use-module (guix download) |
| 31 | #:use-module (guix build-system) | 32 | #:use-module (guix build-system) |
| @@ -314,33 +315,29 @@ or false to signal an error." | |||
| 314 | (%current-system)))) | 315 | (%current-system)))) |
| 315 | "Return the name of Glibc's dynamic linker for SYSTEM." | 316 | "Return the name of Glibc's dynamic linker for SYSTEM." |
| 316 | ;; See the 'SYSDEP_KNOWN_INTERPRETER_NAMES' cpp macro in libc. | 317 | ;; See the 'SYSDEP_KNOWN_INTERPRETER_NAMES' cpp macro in libc. |
| 317 | (cond ((string=? system "x86_64-linux") "/lib/ld-linux-x86-64.so.2") | 318 | (let ((platform (lookup-platform-by-system system))) |
| 318 | ((string=? system "i686-linux") "/lib/ld-linux.so.2") | 319 | (cond |
| 319 | ((string=? system "armhf-linux") "/lib/ld-linux-armhf.so.3") | 320 | ((platform? platform) |
| 320 | ((string=? system "mips64el-linux") "/lib/ld.so.1") | 321 | (platform-glibc-dynamic-linker platform)) |
| 321 | ((string=? system "i586-gnu") "/lib/ld.so.1") | ||
| 322 | ((string=? system "i686-gnu") "/lib/ld.so.1") | ||
| 323 | ((string=? system "aarch64-linux") "/lib/ld-linux-aarch64.so.1") | ||
| 324 | ((string=? system "powerpc-linux") "/lib/ld.so.1") | ||
| 325 | ((string=? system "powerpc64-linux") "/lib/ld64.so.1") | ||
| 326 | ((string=? system "powerpc64le-linux") "/lib/ld64.so.2") | ||
| 327 | ((string=? system "alpha-linux") "/lib/ld-linux.so.2") | ||
| 328 | ((string=? system "s390x-linux") "/lib/ld64.so.1") | ||
| 329 | ((string=? system "riscv64-linux") "/lib/ld-linux-riscv64-lp64d.so.1") | ||
| 330 | 322 | ||
| 331 | ;; XXX: This one is used bare-bones, without a libc, so add a case | 323 | ;; TODO: Define those as platforms. |
| 332 | ;; here just so we can keep going. | 324 | ((string=? system "i686-gnu") "/lib/ld.so.1") |
| 333 | ((string=? system "arm-elf") "no-ld.so") | 325 | ((string=? system "powerpc64-linux") "/lib/ld64.so.1") |
| 334 | ((string=? system "arm-eabi") "no-ld.so") | 326 | ((string=? system "alpha-linux") "/lib/ld-linux.so.2") |
| 335 | ((string=? system "xtensa-elf") "no-ld.so") | ||
| 336 | ((string=? system "avr") "no-ld.so") | ||
| 337 | ((string=? system "propeller-elf") "no-ld.so") | ||
| 338 | ((string=? system "i686-mingw") "no-ld.so") | ||
| 339 | ((string=? system "x86_64-mingw") "no-ld.so") | ||
| 340 | ((string=? system "vc4-elf") "no-ld.so") | ||
| 341 | 327 | ||
| 342 | (else (error "dynamic linker name not known for this system" | 328 | ;; XXX: This one is used bare-bones, without a libc, so add a case |
| 343 | system)))) | 329 | ;; here just so we can keep going. |
| 330 | ((string=? system "arm-elf") "no-ld.so") | ||
| 331 | ((string=? system "arm-eabi") "no-ld.so") | ||
| 332 | ((string=? system "xtensa-elf") "no-ld.so") | ||
| 333 | ((string=? system "avr") "no-ld.so") | ||
| 334 | ((string=? system "propeller-elf") "no-ld.so") | ||
| 335 | ((string=? system "i686-mingw") "no-ld.so") | ||
| 336 | ((string=? system "x86_64-mingw") "no-ld.so") | ||
| 337 | ((string=? system "vc4-elf") "no-ld.so") | ||
| 338 | |||
| 339 | (else (error "dynamic linker name not known for this system" | ||
| 340 | system))))) | ||
| 344 | 341 | ||
| 345 | 342 | ||
| 346 | ;;; | 343 | ;;; |
