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

add arm-features.h from glibc source #12346

Merged
merged 1 commit into from
Nov 25, 2022
Merged

Conversation

sv99
Copy link
Contributor

@sv99 sv99 commented Aug 6, 2022

Problems with -target arm-linux-gnueabi

zig build-exe hello.c -target arm-linux-gnueabi --library c --verbose-cc --name hello-zig

...
In file included from /usr/local/Cellar/zig/0.9.1_1/lib/zig/libc/glibc/sysdeps/unix/sysv/linux/arm/sysdep.h:25:
In file included from /usr/local/Cellar/zig/0.9.1_1/lib/zig/libc/glibc/sysdeps/unix/arm/sysdep.h:19:
/usr/local/Cellar/zig/0.9.1_1/lib/zig/libc/glibc/sysdeps/arm/sysdep.h:25:11: fatal error: 'arm-features.h' file not found
...

Add file arm-features.h from the glibc source.

@sv99
Copy link
Contributor Author

sv99 commented Aug 6, 2022

May be close #3287

@matu3ba
Copy link
Contributor

matu3ba commented Sep 14, 2022

missing 1. test coverage (see test/standalone), 2. CI qemu fixup, and (but very unsure) 3. brief clarification/ensuring that this does not mess up the glibc update routine.

@sv99
Copy link
Contributor Author

sv99 commented Sep 14, 2022

This is simple header file - what need test?

fatal error: 'arm-features.h' file not found
# include <arm-features.h>

Workaround - manually add this header file. After this - build success.

@matu3ba
Copy link
Contributor

matu3ba commented Sep 14, 2022

what need test

arm gnu crosscompiling + running needs tests in CI. Sorry, I have not been explicit from the beginning. See #3174

@billzez
Copy link
Contributor

billzez commented Sep 19, 2022

I can verify that this works and builds working executables. Going back through older releases of zig, I could not find a version that includes a glibc that can build 32-bit arm binaries.

@jedisct1 jedisct1 merged commit d9a754e into ziglang:master Nov 25, 2022
@jedisct1
Copy link
Contributor

Thank you!

Not sure why that file had been forgotten, but its addition indeed allows zig cc to finally support that target.

Thanks!

@matu3ba
Copy link
Contributor

matu3ba commented Nov 25, 2022

@jedisct1

This is missing CI coverage:

"Is there more to this than just merging #12346?"
"Perhaps not, but it is my duty to test & verify patches from first-time contributors. I also need to run the test suite for armv8-linux-gnueabihf and find out if the tests then pass and if so, enable more CI test coverage."

@jedisct1
Copy link
Contributor

arm-linux is still Tier 2 "These targets are known to work, but may not be automatically tested".

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.

None yet

4 participants