guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#65486: [PATCH] syscalls: Add support for musl libc


From: Ludovic Courtès
Subject: bug#65486: [PATCH] syscalls: Add support for musl libc
Date: Sun, 17 Sep 2023 12:14:05 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

Hi,

Sören Tempel <soeren@soeren-tempel.net> skribis:

> From b1d478defc7f3e794974be2b9665cd4a58030569 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
> Date: Thu, 14 Sep 2023 12:35:38 +0000
> Subject: [PATCH] syscalls: Add support for musl libc
>
> This commit allows using Guix on a foreign distro which uses musl libc,
> for example, Alpine Linux. Usage of musl libc is detected via a new
> musl-libc? variable using the Guile %host-type.
>
> Using the new musl-libc? variable, we can now implement musl-specific
> quirks. The two compatibility problems I encountered in this regard are
> that musl dose not export a readdir64 and statfs64 symbol. On musl,
> these two functions are implemented as CPP macros that expand to
> readdir/statfs. To workaround that, a case-distinction was added.
>
> The existing linux? variable has been modified to return true if the
> %host-system contains "linux-" in order to ensure it is true for both
> linux-gnu as well as linux-musl host systems.
>
> The patch has been tested on Alpine Linux and is already used for the
> downstream Guix package shipped in Alpine Linux's package repository.
>
> * guix/build/syscalls.scm (musl-libc?): New variable.
> * guix/build/syscalls.scm (linux?): Truth value on any linux system.
> * guix/build/syscalls.scm (readdir-procedure): Support musl libc.
> * guix/build/syscalls.scm (statfs): Support musl libc.

This version LGTM.  Applied, thanks!

Ludo’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]