This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, rs6000] Fix PR56010 and PR83743, -mcpu=native use wrong names
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Peter Bergner <bergner at vnet dot ibm dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Bill Schmidt <wschmidt at linux dot vnet dot ibm dot com>
- Date: Thu, 25 Jan 2018 14:18:52 -0600
- Subject: Re: [PATCH, rs6000] Fix PR56010 and PR83743, -mcpu=native use wrong names
- Authentication-results: sourceware.org; auth=none
- References: <9ac8d237-5bfc-07ba-fe8b-2f877626b67b@vnet.ibm.com>
Hi!
On Wed, Jan 24, 2018 at 03:49:26PM -0600, Peter Bergner wrote:
> The following patch fixes both PR56010 and PR83743. PR56010 is fixed by
> adding an extra altname field to the RS6000_CPU table which matches the
> cases where the Linux kernel's AT_PLATFORM name differs from the name GCC
> expects. If we match on the altname, then we return the canonical name.
Don't add this to rs6000-cpus.def; it belongs to the Linux support only.
You also need to translate multiple AT_PLATFORM names for a single -mcpu=,
not necessarily only two, so you probably want a separate translation table
to do just the translation (in driver-rs6000.c ?)
Did you check this against the kernel's arch/powerpc/kernel/cputable.c ?
Segher