Replies: 4 comments 10 replies
-
It seems easy to just remove musl-toolchain, but we lose the ability to build pure static binaries on the host. This seems to have little to do with SPC_LIBC. Even if we no longer support musl-toolchain, we will need SPC_LIBC to distinguish musl-gcc from glibc-gcc, and it is conceivable that our dependence on gcc is more specific. It's like going back to the original bash-version branch, simple but can't do much. Since we now support these multiple features, and the Linux ecosystem does not seem to be unified for the time being, there is no big benefit for us to abandon SPC_LIBC-something that we hate but can only compromise. I won't be completely for or against this decision, but it's not worth it at this point. |
Beta Was this translation helpful? Give feedback.
-
We wouldn't need the environment variable anymore and all the checks it introduces. We'd just always build against the system libc - musl on alpine, glibc on rebian/rhel, macos framework on mac.
I'm fine with keeping it for now, but there's very little point to it, I feel like. All the projects using spc to build musl targeting binaries that I'm aware of use alpine docker on their own. We wouldn't lose any features there. I'll spin up a PR that we don't have to merge yet. It's just something to consider. |
Beta Was this translation helpful? Give feedback.
-
I will try crosstool-ng when I have time. Maybe this can fundamentally solve the problem of maintaining the cross toolchain. If we can easily build different proper toolchains, then the problem of maintaining toolchains is solved - we only need to continue to build toolchains that match our ideal environment. And it's also benefits the docker environment.
Individual who use SPC personally use SPC binary to build, and most of them do not use Docker. If all projects really use Docker, then the SPC binary and musl-toolchain should not have so many downloads. But in short, it's not easily advance the start of 3.0 because we have not been finding a solution or finishing full-investigation that can be used out of the box and does not rely on docker to build static binaries on gnu. Also we have a lot of issue that not closed. Rather than maintaining a Docker distribution, it is more far-sighted to maintain a long-term, cross-platform tool chain (if possible). |
Beta Was this translation helpful? Give feedback.
-
If you're looking at cross toolchains, you may want to have a look a Zig. It can cross compile to any architecture and libc. For example CC="zig cc -target x86_64-linux-gnu.2.17". I tried it but it had problems with some libraries so I stopped, because I want to advance the package repositories instead. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
@crazywhalecc It would decrease our maintenance burden to maintain two different build systems (alpine gcc + musl gcc) for the same result. Ubuntu/RHEL can use docker or podman with bin/spc-alpine-docker to build.
It would allow us to move away from the whole SPC_LIBC logic, we wouldn't need our gcc package anymore, we don't need the whole environment setting logic in Linuxbuilder and it would make usage with glibc easier, too.
Beta Was this translation helpful? Give feedback.
All reactions