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: [GCC-6.4][ARM][PATCH] enable FL_LPAE flag for armv7ve cores


On Wed, Nov 8, 2017 at 2:03 AM, Kyrill  Tkachov
<kyrylo.tkachov@foss.arm.com> wrote:
> Hi Andre,
>
> On 08/11/17 05:12, Andre McCurdy wrote:
>>
>> The following commit added the FL_LPAE flag to FL_FOR_ARCH7VE, but
>> neglected to also add it to the armv7ve compatible cores defined in
>> arm-cores.def.
>>
>> https://github.com/gcc-mirror/gcc/commit/af2d9b9e58e8be576c53d94f30c48c68146b0c98
>>
>> The result is that gcc 6.4 now refuses to allow -march=armv7ve and
>> -mcpu=XXX to be used together, even when -mcpu is set to an armv7ve
>> compatible core:
>>
>>   arm-linux-gnueabi-gcc -march=armv7ve -mcpu=cortex-a7 -Werror ...
>>   error: switch -mcpu=cortex-a7 conflicts with -march=armv7ve switch
>> [-Werror]
>>
>> This is a regression relative to gcc 6.3.
>>
>> Fix by defining flags for armv7ve compatible cores directly from
>> FL_FOR_ARCH7VE, rather than re-creating the armv7ve flags
>> independently by combining FL_FOR_ARCH7A with the armv7ve specific
>> FL_THUMB_DIV and FL_ARM_DIV flags.
>>
>
> Thank you for the patch. The change looks reasonable to me.
> The way CPUs are defined internally was changed for GCC 7
> so later branches won't have this problem.
>
> How has this patch been tested?

I've tested to confirm that the error when running the above test
command (ie combining -march=armv7ve and -mcpu=cortex-a7) goes away
and I used the patched gcc to build glibc. I didn't try to run any
test suite, etc.

I didn't try to confirm that code which uses LPAE can now be
successfully built when only -mcpu=XXX is specified.

> This should be ready for committing with a proper
> ChangeLog entry [1].

I'll send a v2 patch with a ChangeLog entry.

> Thanks,
> Kyrill
>
> [1] https://gcc.gnu.org/codingconventions.html#ChangeLogs or have a look in
> the ChangeLog files in the gcc/ directory for examples
>


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