This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] ARM FreeBSD fix bootstrap


On 05/01/16 21:03, Andreas Tobler wrote:
> On 05.01.16 11:32, Richard Earnshaw (lists) wrote:
>> On 23/12/15 19:28, Andreas Tobler wrote:
> 
>>> 2015-12-23  Andreas Tobler  <andreast@gcc.gnu.org>
>>>
>>>      * config/arm/freebsd.h: Rename SUBTARGET_OVERRIDE_OPTIONS to
>>>      SUBTARGET_OVERRIDE_INTERNAL_OPTIONS. Adjust to check
>>>      unaligned_access on the gcc_options set.
>>>      * config/arm/arm.c (arm_option_override_internal): Use
>>>      SUBTARGET_OVERRIDE_INTERNAL_OPTIONS.
>>>
>>>
>>
>> This is OK.
>>
>> One question, though, is whether you should explicitly override a user
>> request for unaligned accesses without at least warning that this is
>> being done.
> 
> 
> Like this?
> 
> config/arm/freebsd.h:
> 
> #define SUBTARGET_OVERRIDE_INTERNAL_OPTIONS        \
> do {                            \
>     if (opts_set->x_unaligned_access == 1)        \
>     warning (0, "target CPU does not support unaligned accesses");\
>     if (opts->x_unaligned_access)            \
>     opts->x_unaligned_access = 0;
> 

Something like that, but the problem is not that the CPU does not
support unaligned accesses, but that FreeBSD does not support CPUs doing
unaligned accesses.

Anyway, I'll pre-approve a patch adding a suitable warning here.

R.

> Thank you for the feedback.
> 
> Andreas   
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]