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

fix: fix cross compile to ARM926EJ-S is Broken (closes #15281) #15333

Closed
wants to merge 1 commit into from

Conversation

CGQAQ
Copy link

@CGQAQ CGQAQ commented Apr 17, 2023

image

arm926ej_s arch should be ARMv5TEJ according to wikipedia, and in our company, we have this chip, the readelf below shows what is the native executable attributes should be look like:

75f7251fac33fdc61c674c867a98dc1

but when we use zig to crosscompile using zig cc -o x main.c --target=arm-linux-gnueabi -mcpu=arm926ej_s the result of readelf's Tag_CPU_arch is v5TE

I don't know this change is enough though, please let me know if I need change something else.

PS: i didn't test this myself because I cant compile zig_bootstrap due to ziglang/zig-bootstrap#148, this change is suggested by @nekopsykose in #15281 (comment)

closes #15281

@CGQAQ CGQAQ changed the title fix: fix cross compile to ARM926EJ-S is Broken (closes #15821) fix: fix cross compile to ARM926EJ-S is Broken (closes #15281) Apr 17, 2023
@CGQAQ CGQAQ force-pushed the fix-15281 branch 3 times, most recently from 106db00 to 570e04f Compare April 21, 2023 00:57
@Vexu
Copy link
Member

Vexu commented Apr 22, 2023

This file is generated from LLVM data so if this fix is correct then LLVM has a bug in it. Ideally update_cpu_features.zig would override this feature but that doesn't seem possible currently.

@andrewrk
Copy link
Member

andrewrk commented Jun 27, 2023

The next step to solving this problem is, as @Vexu noted,

  1. sending a patch to fix this upstream in LLVM and
  2. updating tools/update_cpu_features.zig to augment LLVM's incorrect data (we already have several such augmentations)

@CGQAQ: Unless you are doing (2) from this list above, there is no need to update this branch; you can leave the PR alone and someone will take care of it eventually.

@CGQAQ
Copy link
Author

CGQAQ commented Jun 27, 2023

oh! thanks

@andrewrk
Copy link
Member

Closing abandoned PR. The issue remains open.

@andrewrk andrewrk closed this Oct 19, 2023
@CGQAQ CGQAQ deleted the fix-15281 branch January 3, 2024 03:23
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.

cross compile to ARM926EJ-S is Broken
3 participants