On 13/04/2020 21:40, Wilco Dijkstra wrote:
> Hi Duanbo,
> 
>> This is a simple fix for pr94577.
>> The option -mabi=ilp32 should not be used in large code model. Like x86, 
>> using -mx32 and -mcmodel=large together will result in an error message.
>> On aarch64, there is no error message for this option conflict.
>> A solution to this problem can be found in the attached patch.
>> Bootstrap and tested on aarch64 Linux platform. No new regression witnessed.
>> Any suggestion?  
> 
> Thanks for your patch, more than 4GB doesn't make any sense with ILP32 indeed.
> A few suggestions:
> 
> It would be good to also update the documentation for -mcmodel=large to state 
> it is
> incompatible with -fpic, -fPIC and -mabi=ilp32.
> 
> The patch adds a another switch statement on mcmodel that ignores the previous
> processing done (which may changes the selected mcmodel). It would be safer 
> and
> more concise to use one switch at the top level and in each case use an if 
> statement
> to handle the special cases.
> 
> A few minor nitpics:
> 
> +       PR  target/94577
> +       * gcc.target/aarch64/pr94577.c : New test
> 
> Just like comments, there should be a '.' at the end of changelog entries.
> 
> AFAICT the format isn't exactly specified, but the email header should be 
> like:
> 
> [PATCH][AArch64] PR94577: Add an error message in large code model for ilp32

No.  See https://gcc.gnu.org/contribute.html#patches.  Specifically the
section on email subject lines.

R.

> 
> Sometimes the PR number is also placed in brackets.
> 
> Cheers,
> Wilco
> 
> 

Reply via email to