On 13/07/17 11:26, Michael Collison wrote:
> Updated per Richard's comments and suggestions.
> 
> Okay for trunk?

OK.  Please can you write up an entry for the release notes (wwwdocs).

R.

> 
> 2017-07-10  Michael Collison  <michael.colli...@arm.com>
> 
>       * config/arm/arm.c (arm_option_override): Deprecate
>       use of -mstructure-size-boundary.
>       * config/arm/arm.opt: Deprecate -mstructure-size-boundary.
>       * doc/invoke.texi: Deprecate -mstructure-size-boundary.
> 
> -----Original Message-----
> From: Richard Earnshaw (lists) [mailto:richard.earns...@arm.com] 
> Sent: Thursday, July 6, 2017 3:17 AM
> To: Michael Collison <michael.colli...@arm.com>; GCC Patches 
> <gcc-patches@gcc.gnu.org>
> Cc: nd <n...@arm.com>
> Subject: Re: [Arm] Obsoleting Command line option -mstructure-size-boundary 
> in eabi configurations
> 
> On 06/07/17 06:46, Michael Collison wrote:
>> NetBSD/Arm requires that DEFAULT_STRUCTURE_SIZE_BOUNDARY (see 
>> config/arm/netbsd-elf.h for details). This patch disallows 
>> -mstructure-size-boundary on netbsd if the value is not equal to the 
>> DEFAULT_STRUCTURE_SIZE_BOUNDARY.
>>
>> Okay for trunk?
>>
>> 2017-07-05  Michael Collison  <michael.colli...@arm.com>
>>
>>      * config/arm/arm.c (arm_option_override): Disallow
>>      -mstructure-size-boundary on netbsd if value is not
>>      DEFAULT_STRUCTURE_SIZE_BOUNDARY.
>>
>>
> 
> Frankly, I'd rather we moved towards obsoleting this option entirely.
> The origins are from the days of the APCS (note, not AAPCS) when the default 
> was 32 when most of the world expected 8.
> 
> Now that the AAPCS is widely adopted, APCS is obsolete (NetBSD uses
> ATPCS) and NetBSD (the only port not based on AAPCS these days) defaults to 8 
> I can't see why anybody now would be interested in using a different value.
> 
> So let's just mark this option as deprecated (emit a warning if
> 
> global_options_set.x_arm_structure_size_boundary
> 
> is ever set by the user, regardless of value).  Then in GCC 9 we can perhaps 
> remove this code entirely.
> 
> Documentation and release notes will need corresponding updates as well.
> 
> R.
> 
>> pr1556.patch
>>
>>
>> diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 
>> bc1e607..911c272 100644
>> --- a/gcc/config/arm/arm.c
>> +++ b/gcc/config/arm/arm.c
>> @@ -3471,7 +3471,18 @@ arm_option_override (void)
>>      }
>>    else
>>      {
>> -      if (arm_structure_size_boundary != 8
>> +      /* Do not allow structure size boundary to be overridden for 
>> + netbsd.  */
>> +
>> +      if ((arm_abi == ARM_ABI_ATPCS)
>> +      && (arm_structure_size_boundary != DEFAULT_STRUCTURE_SIZE_BOUNDARY))
>> +    {
>> +      warning (0,
>> +               "option %<-mstructure-size-boundary%> is deprecated for 
>> netbsd; "
>> +               "defaulting to %d",
>> +               DEFAULT_STRUCTURE_SIZE_BOUNDARY);
>> +      arm_structure_size_boundary = DEFAULT_STRUCTURE_SIZE_BOUNDARY;
>> +    }
>> +      else if (arm_structure_size_boundary != 8
>>        && arm_structure_size_boundary != 32
>>        && !(ARM_DOUBLEWORD_ALIGN && arm_structure_size_boundary == 64))
>>      {
>>
> 
> 
> pr1556v2.patch
> 
> 
> diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
> index c6101ef..b5dbfeb 100644
> --- a/gcc/config/arm/arm.c
> +++ b/gcc/config/arm/arm.c
> @@ -3489,6 +3489,8 @@ arm_option_override (void)
>      }
>    else
>      {
> +      warning (0, "option %<-mstructure-size-boundary%> is deprecated");
> +
>        if (arm_structure_size_boundary != 8
>         && arm_structure_size_boundary != 32
>         && !(ARM_DOUBLEWORD_ALIGN && arm_structure_size_boundary == 64))
> diff --git a/gcc/config/arm/arm.opt b/gcc/config/arm/arm.opt
> index b6c707b..6060516 100644
> --- a/gcc/config/arm/arm.opt
> +++ b/gcc/config/arm/arm.opt
> @@ -192,7 +192,7 @@ Target RejectNegative Alias(mfloat-abi=, soft) 
> Undocumented
>  
>  mstructure-size-boundary=
>  Target RejectNegative Joined UInteger Var(arm_structure_size_boundary) 
> Init(DEFAULT_STRUCTURE_SIZE_BOUNDARY)
> -Specify the minimum bit alignment of structures.
> +Specify the minimum bit alignment of structures. (Deprecated).
>  
>  mthumb
>  Target Report RejectNegative Negative(marm) Mask(THUMB) Save
> diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
> index 3e5cee8..cfe5985 100644
> --- a/gcc/doc/invoke.texi
> +++ b/gcc/doc/invoke.texi
> @@ -15685,6 +15685,8 @@ incompatible.  Code compiled with one value cannot 
> necessarily expect to
>  work with code or libraries compiled with another value, if they exchange
>  information using structures or unions.
>  
> +This option is deprecated.
> +
>  @item -mabort-on-noreturn
>  @opindex mabort-on-noreturn
>  Generate a call to the function @code{abort} at the end of a
> 

Reply via email to