aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/package/musl/package.az
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-05-20 04:13:10 +0900
committerOphestra <cat@gensokyo.uk>2026-05-20 04:13:10 +0900
commit2e710328a4a64f5803de317c936912cf2ccddddf (patch)
tree707d404175dc19927898aea047e8d421e0a4ecad /internal/rosa/package/musl/package.az
parent2e7b52d70184e301dbf7a43670c28facbb0206cd (diff)
internal/rosa/package: migrate musl
This removes some legacy cruft, causing 2 rebuilds per stage. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/package/musl/package.az')
-rw-r--r--internal/rosa/package/musl/package.az70
1 files changed, 70 insertions, 0 deletions
diff --git a/internal/rosa/package/musl/package.az b/internal/rosa/package/musl/package.az
new file mode 100644
index 00000000..893567e8
--- /dev/null
+++ b/internal/rosa/package/musl/package.az
@@ -0,0 +1,70 @@
+package musl-source {
+ description = "an implementation of the C standard library - source code";
+
+ version* = "1.2.6";
+ output = remoteTar {
+ url = "https://musl.libc.org/releases/musl-"+version+".tar.gz";
+ checksum = "WtWb_OV_XxLDAB5NerOL9loLlHVadV00MmGk65PPBU1evaolagoMHfvpZp_vxEzS";
+ compress = gzip;
+ };
+}
+
+package musl-headers {
+ description = "system installation of musl headers";
+
+ source = musl-source;
+
+ // expected to be writable in copies
+ chmod = true;
+
+ env = [
+ "LDFLAGS=" + earlyLDFLAGS,
+ ];
+
+ exec = make {
+ omitDefaults = true;
+ skipCheck = true;
+
+ make = [
+ "DESTDIR=/work",
+ "install-headers",
+ ];
+
+ install = "# headers installed during make";
+ };
+
+ inputs = [ coreutils ];
+}
+
+package musl {
+ description = "an implementation of the C standard library";
+ website = "https://musl.libc.org";
+ anitya = 11688;
+
+ source = musl-source;
+ patches = [ "ldso-rosa.patch" ];
+
+ // expected to be writable in copies
+ chmod = true;
+
+ env = [
+ "LDFLAGS=" + earlyLDFLAGS,
+ ];
+
+ exec = make {
+ omitDefaults = true;
+ skipCheck = true;
+
+ postInstall = `
+mkdir -p /work/system/bin
+COMPAT_LINKER_NAME="ld-musl-` + linuxArch + `.so.1"
+ln -vs ../lib/libc.so /work/system/bin/linker
+ln -vs ../lib/libc.so /work/system/bin/ldd
+ln -vs libc.so "/work/system/lib/${COMPAT_LINKER_NAME}"
+rm -v "/work/lib/${COMPAT_LINKER_NAME}"
+rmdir -v /work/lib
+`;
+ };
+
+ inputs = [ coreutils ];
+}