shinohai on Nostr: `CC=$MUSLDIR/bin/musl-gcc go build --ldflags '-linkmode external -extldflags ...
`CC=$MUSLDIR/bin/musl-gcc go build --ldflags '-linkmode external -extldflags "-static"' <THING>` usually gets me there with musl. iirc some folx are using Zig compiler for static go builds, have not yet looked into this.
Published at
2024-09-24 19:06:51Event JSON
{
"id": "0c8e5c6ba4148a29f70e97c42d78e6a9cdc666450bde018f0754cd28cee5a64b",
"pubkey": "4bc7982c4ee4078b2ada5340ae673f18d3b6a664b1f97e8d6799e6074cb5c39d",
"created_at": 1727204811,
"kind": 1,
"tags": [
[
"e",
"d7c081c7553fc18f1d6f42949d0342d58af60aaec4d9fdd61623861c814e9d29",
"",
"root"
],
[
"e",
"9620273c26110b75d7582ccf22b0db2d25caf9bcbcd29c4aaaf250c17b9e4dba",
"",
"reply"
],
[
"p",
"4bc7982c4ee4078b2ada5340ae673f18d3b6a664b1f97e8d6799e6074cb5c39d",
"",
"mention"
],
[
"p",
"4c800257a588a82849d049817c2bdaad984b25a45ad9f6dad66e47d3b47e3b2f"
]
],
"content": "`CC=$MUSLDIR/bin/musl-gcc go build --ldflags '-linkmode external -extldflags \"-static\"' \u003cTHING\u003e` usually gets me there with musl. iirc some folx are using Zig compiler for static go builds, have not yet looked into this.",
"sig": "3a4116bbeec97d0e74edc45cb704eb8505e4807e2815c29e45a13ffe674c5c1b04fa0f643bda881dee851663bac52ef1d15f4b476694fa5ec88b354d445af07a"
}