Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Zig as a zero-dependency, drop-in C/C++ cross-compiler #26

Open
probonopd opened this issue May 7, 2022 · 4 comments
Open

Use Zig as a zero-dependency, drop-in C/C++ cross-compiler #26

probonopd opened this issue May 7, 2022 · 4 comments

Comments

@probonopd
Copy link
Owner

probonopd commented May 7, 2022

https://ziglang.org/

Use Zig as a zero-dependency, drop-in C/C++ compiler that supports cross-compilation out-of-the-box.

it seems to support musl libc.

Maybe with this, we won't need different Docker containers nor dog slow qemu anymore? And can add more architectures more easily?

Reference:
probonopd/go-appimage#207

@azubieta
Copy link

azubieta commented May 9, 2022

I used this toolchain at my fork https://musl.cc/

@xplshn
Copy link

xplshn commented Apr 15, 2024

I like Zig C a lot, but GCC is still a requirement for programs made in incorrect ways, some programs use non-standard things only provided by GCC, like the stack protector and other oddities which LLVM based compilers don't yet provide as a compatibility feature. However, I'd use Zig whenever possible, since it does ship with the Musl libraries by default, and in the download's page, the tar they provide contains everything to get started, and it is statically compiled...

Also, with a tool I made called PELF, I managed to fit Zig into a single file + some common libraries so that I can compile stuff, its actually very usable. Fun experiment.

@xplshn
Copy link

xplshn commented Apr 15, 2024

I used this toolchain at my fork https://musl.cc/

These are also very good, and they provide a uClibc-ng option: https://toolchains.bootlin.com/

uClibc is awesome.

@probonopd
Copy link
Owner Author

Yes, we are currently using musl libc for static-tools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants