cross compiling with the C backend

> Could you give an example?
Different alignment issues, for example. LLVM handles alignment
explicitely by inserting dummy padding fields. Surely, the stuff can be
different for build platform and for target one.

Also, many platform-dependent stuff in POSIX-aware code (see example later).

I see.

> I didn't wrote the program :slight_smile: No, I just recompile a program that was
> already written for (or ported to) the PSP. It seems that "setjmp" is
> used in libpng. The program and the libraries it uses (libpng and
> zlib) should be correct
Unfortunately, this cannot be true in your case :frowning: For example,
longjmp/setjmp accepts struct jmp_buf as an argument, but the contents
of such struct is highly target dependent (since it used to save current
context, etc).

There are some places in POSIX standards containing wording of form
"struct 'foo' should contain field 'bar'" without specifying the precise
position of this field.

In general, you will need to configure a crosscompiler, or, at least,
hack llvm-gcc to use correct system headers for your target plaform (not
for the build!).

Well, I already use custom includes with these options: "-nostdlib
-nostdinc -Ipsptoolchain/psp/include
-Ipsptoolchain/lib/gcc/psp/4.1.0/include". But that seems not enough.
GCC has some target-specific behaviour compiled in?