http://bugs.winehq.org/show_bug.cgi?id=33349
--- Comment #2 from André H. nerv@dawncrow.de 2013-04-13 10:20:40 CDT --- (In reply to comment #1)
Hello André,
as I told in earlier Wine/ARM bugs, Thumb-2 is the default for Win32 ARM PE binaries. Most ARM Linux distros (Debian, Ubuntu, Fedora?) use ARMv7-A + VFPv3-D16 + Thumb-2 profile (Cortex-A). So forcing Wine code to be compiled for ARM mode on these systems is not optimal.
For the compiler flags, yes "-mthumb" would be sufficient, no need for "-mthumb-interwork". My toolchains have Thumb-2 as default profile, so there would be no need for any CFLAGS override.
Building Wine as thumb code causes issues for "naked" functions with explicit ".arm" directive because the linker won't insert ARM-Thumb interworking veneers automatically. Raising "unimplemented API" exception currently fails because of that:
That's one of those things -mthumb-interwork is for and it doesn't increase the size of the binaries, so to be sure i'd rather use it. Further RtlCaptureContext needs to be ARM or Thumb-2 because of the instructions used, but as long as possible i also want to support older ARM chips at least for winelib. So i choose to use ARM assembler for such functions (same for relay logging, which actually only works with -marm)