r189175 - Add gcc ARM flags -munaligned-access / -mno-unaligned-access

Reid Kleckner rnk at google.com
Tue Aug 27 10:21:44 PDT 2013


On Tue, Aug 27, 2013 at 1:11 AM, Renato Golin <renato.golin at linaro.org>wrote:

> On 26 August 2013 21:06, Reid Kleckner <rnk at google.com> wrote:
>
>> On Sat, Aug 24, 2013 at 7:44 AM, Renato Golin <renato.golin at linaro.org>wrote:
>>
>>> Since the default value for unaligned accesses / strict alignment
>>> depends on the tripple, both the enable and disable flags are added.
>>> If both are set, the no-unaligned-access is used.
>>>
>>
>> Isn't the usual pattern that the last one wins?
>>
>
> Hi Reid,
>
> This is a good point, but in this specific case, it's a bit of a grey area.
>
> Basically, what "no-unaligned-access" is saying is that exceptions will be
> caught if there is any unaligned access, while "unaligned-access" is less
> strict, only meaning that "AFAIK, no exceptions will be caught". So, if
> someone building the command line option knows that exceptions will be
> caught, we should err in the side of safety, and not rely on build systems
> to get that right.
>
> That said, I agree it's a bit too much, and build systems should be able
> to change the compilation parameters without re-writing the whole argument
> list. But I'm not sure how safe that is.
>
> I don't have that strong an opinion to keep things as they are, but I also
> wouldn't change unless there is a good reason (or consensus) to do so.
>

IMO we should match gcc's behavior here.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130827/65a465f0/attachment.html>


More information about the cfe-commits mailing list