I tried building a simple hello world program for our embedded platform, but when I execute the program I get an “Illegal instruction” exception. Looking into the dump file, it seems that musl is built to target the armv7 instruction set. Unfortunately our CPU is an ARM920T which only supports the armv4 instruction set.
Would I need to build ELLCC (or more specifically libellcc I guess) to target armv4 or is there some commandline option I can use instead?
If I have to build ELLCC from source, how do I build an armv4 version of the libraries?
If you have a recent copy of the sources from within the last few weeks, you can set up another library build pretty easily.
Go into the libecc/configure directory and copy one of the existing arm config files to one like “armv4-linux-engeabi”. Modify the file’s compiler “-march” option and library_paths, then go to the libecc directory and type “make armv4-linux-engeabi”.
I have never done this so I’m not sure how well clang/LLVM supports armv4, but it should work.
This reply was modified 9 years, 4 months ago by rich. Reason: Add tags