version = "1.2.6" revision = 1 metadata = meta( description = "Small, standards-conformant implementation of libc", license = "MIT", ) source = tarball_source( url = f"https://musl.libc.org/releases/musl-{version}.tar.gz", sha256 = "?", strip_components = 1, ) host_deps = ["binutils", "gcc-bootstrap"] def configure(ctx): ctx.run([ ctx.source_dir / "configure", "--target=" + options.target_triple, "--prefix=" + ctx.prefix, "--syslibdir=/lib", ], env = { "CC": options.target_triple + "-gcc", "CFLAGS": options.cflags, "LDFLAGS": options.ldflags, }) _, build, install = autotools()