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

Jeroen Hofstee jeroen at myspectrum.nl
Tue Jun 11 13:13:57 PDT 2013

Hello Tim

On 06/11/2013 12:22 AM, Tim Northover wrote:
> Hi Jeroen,
>> 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.
> I think that looks reasonable.
> Not quite sure about defaulting to StrongARM rather than ARM7TDMI, but
> that's probably a completely separate topic. Anyone who actually cares
> should be specifying it manually anyway and v4 is probably no worse a
> default than v4t.
I think you make a valid point. I checked the stock Ubuntu arm
gcc which defaults to armv5t. Furthermore, the intend of the
patch is to fix the case when armv4 is passed explicitly, not when
none is passed (and no -mcpu). A discussion about what a sane
default is seems indeed like a topic on its own. Not changing
it in this patch seems therefore like the best thing to do.

I will therefore update the patch to leave the default untouched,
and change the comment instead to:

// If all else failed, return the most base CPU with thumb
// interworking LLVM supports

Any comments?


More information about the cfe-commits mailing list