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

Some initial hexagon-linux port work #21587

Merged
merged 7 commits into from
Oct 6, 2024
Merged

Conversation

alexrp
Copy link
Member

@alexrp alexrp commented Oct 4, 2024

After this, the next step is #21579.

This works around the fact that LLVM and LLD both have broken support for the
small data area, yet the feature is on by default for all Hexagon CPUs.

I want to eventually replace this hack with a flag in update_cpu_features.zig
for marking features that should always be off by default and not be accessible
to users. That way, the compiler will have full control over them.
In theory, this should work for v68+. In practice, it runs into an LLVM
assertion when using a `freeze` instruction on `f16` values, similar to the
issue we had for LoongArch.
@alexrp alexrp merged commit be5378b into ziglang:master Oct 6, 2024
10 checks passed
@alexrp alexrp deleted the hexagon-porting branch October 6, 2024 11:36
@androm3da
Copy link
Contributor

Thanks for this work, @alexrp !

Note that the only C library that is really useful for this work is our downstream fork of musl. We've tried occasionally to get this upstreamed but not had much success.

We're working on a nice system emulation platform w/linux that might be easier/better for the musl maintainers to evaluate/examine the patch series. But it's not quite 100% ready yet.

Of course: there's nothing stopping you from continuing this work, so please carry on and let me know if I can help.

@androm3da
Copy link
Contributor

Thanks for this work, @alexrp !

Note that the only C library that is really useful for this work is our downstream fork of musl. We've tried occasionally to get this upstreamed but not had much success.

Oh whoops I see you are well-informed here already #21588

@alexrp
Copy link
Member Author

alexrp commented Oct 9, 2024

Yep, I'm hoping we can integrate your fork as a patch on top of upstream until it gets upstreamed.

Zig does also support generating binaries that don't rely on libc at all and just use Linux syscalls directly, so that's what we'll focus on bringing up first.

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

Successfully merging this pull request may close these issues.

2 participants