-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Cross compile for armhf on Cortex-A5 results in illegal instruction #16585
Comments
it looks like you want gnueabihf (hard float). Lines 1582 to 1589 in 43b8304
|
That did help be get further but now see an illegal instruction error:
A look at the ELF from the host machine:
Any suggestions how to further troubleshoot the illegal instruction error? |
I was able to create the issue using the default program created by
My cpu is a Microchip SAMA5D3 (Cortex-A5). After capturing a core dump for this program and looking at it with GDB:
The zig code, the default program from
|
@aka-mj I am not sure if this is related. I see an illegal instruction exception on a freestanding sama5d3 project too. I build using zig build-exe -target arm-freestanding -mcpu=cortex_a5 sama5.zig My target is sama5d3-xplained.
|
@ldube, interesting. I did further troubleshooting on my issue here:
It seems for me the issue may be that |
@aka-mj if you're still able to reproduce this, can you please get the crash in GDB and do |
Just for the record. I build using this command: |
Zig Version
0.11.0-dev.4271+1aacfa718
Steps to Reproduce and Observed Behavior
I have the following build.zig, which specifies the target as arm-linux-gnueabi, as this is built for an embedded device.
I build via
zig build
.When examining the file on the host it looks like its built for the target.
But running on the target gives an error.
Looking at the file further on the host it appears the interpreter is from the host rather then the target.
I'm expecting the interpreter to be
/lib/ld-linux-armhf.so.3
, as I see on other C programs that are cross compiled. (as seen below)As I missing anything in cross compiling for my target platform?
Expected Behavior
Expected to be able to run program on the target (arm-linux-gnueabi).
The text was updated successfully, but these errors were encountered: