[PATCH] fix compilation with -march=armv4 / no -mcpu and gas

Jeroen Hofstee jeroen at myspectrum.nl
Sun Jun 9 09:10:04 PDT 2013


Hello,

When clang is invoked with -march=armv4 and no -mcpu is
specified, the arm7tdmi cpu was selected as reference.
That causes clang to emit bx lr instructions since its
architecture is armv4t. When gas is used for assembling the
-march=armv4 is passed on and hence fails with:

     "selected processor does not support ARM mode `bx lr'"

Attached patch makes the strongarm the reference cpu for
armv4 to resolve the problem. Also the default is updated,
since the armv4 is more basic then armv4t.

Regards,
Jeroen

-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_march_is_armv4_build.patch
Type: text/x-patch
Size: 2308 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130609/8bb8c109/attachment.bin>


More information about the cfe-commits mailing list