Re: [PATCH] powerpc/boot: Build wrapper for an appropriate CPU

2022-05-15 Thread Michael Ellerman
On Wed, 30 Mar 2022 21:54:37 +1030, Joel Stanley wrote: > Currently the boot wrapper lacks a -mcpu option, so it will be built for > the toolchain's default cpu. This is a problem if the toolchain defaults > to a cpu with newer instructions. > > We could wire in TARGET_CPU but instead use the

Re: [PATCH] powerpc/boot: Build wrapper for an appropriate CPU

2022-04-07 Thread Segher Boessenkool
On Thu, Apr 07, 2022 at 03:43:20PM -0300, Murilo Opsfelder Araújo wrote: > On 4/6/22 04:08, Joel Stanley wrote: > >On Thu, 31 Mar 2022 at 23:46, Segher Boessenkool > > wrote: > >>On Thu, Mar 31, 2022 at 12:19:52PM -0300, Murilo Opsfelder Araújo wrote: > >>>My understanding is that the default cpu

Re: [PATCH] powerpc/boot: Build wrapper for an appropriate CPU

2022-04-07 Thread Murilo Opsfelder Araújo
On 4/6/22 04:08, Joel Stanley wrote: On Thu, 31 Mar 2022 at 23:46, Segher Boessenkool wrote: On Thu, Mar 31, 2022 at 12:19:52PM -0300, Murilo Opsfelder Araújo wrote: My understanding is that the default cpu type for -mcpu=powerpc64 can change. Different subtargets (Linux, AIX, Darwin, the

Re: [PATCH] powerpc/boot: Build wrapper for an appropriate CPU

2022-04-06 Thread Joel Stanley
On Thu, 31 Mar 2022 at 23:46, Segher Boessenkool wrote: > > On Thu, Mar 31, 2022 at 12:19:52PM -0300, Murilo Opsfelder Araújo wrote: > > My understanding is that the default cpu type for -mcpu=powerpc64 can > > change. > > Different subtargets (Linux, AIX, Darwin, the various BSDs, bare ELF, >

Re: [PATCH] powerpc/boot: Build wrapper for an appropriate CPU

2022-03-31 Thread Segher Boessenkool
On Thu, Mar 31, 2022 at 12:19:52PM -0300, Murilo Opsfelder Araújo wrote: > My understanding is that the default cpu type for -mcpu=powerpc64 can > change. Different subtargets (Linux, AIX, Darwin, the various BSDs, bare ELF, etc.) have different default CPUs. It also can be set at configure

Re: [PATCH] powerpc/boot: Build wrapper for an appropriate CPU

2022-03-31 Thread Segher Boessenkool
On Wed, Mar 30, 2022 at 11:05:19PM -0300, Murilo Opsfelder Araújo wrote: > I think it was a fortunate coincidence that the default cpu type of your > gcc is > compatible with your system. If the distro gcc moves its default to a > newer cpu > type than your system, this bug would happen again.

Re: [PATCH] powerpc/boot: Build wrapper for an appropriate CPU

2022-03-31 Thread Segher Boessenkool
On Wed, Mar 30, 2022 at 11:39:13AM +, Joel Stanley wrote: > Last one wins as far as -mcpu lines goes, from a quick test. This is true yes. It is true for GCC options in general. Segher

Re: [PATCH] powerpc/boot: Build wrapper for an appropriate CPU

2022-03-31 Thread Murilo Opsfelder Araújo
Hi, Joel. On 3/31/22 02:01, Joel Stanley wrote: On Thu, 31 Mar 2022 at 02:05, Murilo Opsfelder Araújo wrote: Hi, Joel. On 3/30/22 08:24, Joel Stanley wrote: Currently the boot wrapper lacks a -mcpu option, so it will be built for the toolchain's default cpu. This is a problem if the

Re: [PATCH] powerpc/boot: Build wrapper for an appropriate CPU

2022-03-30 Thread Joel Stanley
On Thu, 31 Mar 2022 at 02:05, Murilo Opsfelder Araújo wrote: > > Hi, Joel. > > On 3/30/22 08:24, Joel Stanley wrote: > > Currently the boot wrapper lacks a -mcpu option, so it will be built for > > the toolchain's default cpu. This is a problem if the toolchain defaults > > to a cpu with newer

Re: [PATCH] powerpc/boot: Build wrapper for an appropriate CPU

2022-03-30 Thread Murilo Opsfelder Araújo
Hi, Joel. On 3/30/22 08:24, Joel Stanley wrote: Currently the boot wrapper lacks a -mcpu option, so it will be built for the toolchain's default cpu. This is a problem if the toolchain defaults to a cpu with newer instructions. We could wire in TARGET_CPU but instead use the oldest supported

Re: [PATCH] powerpc/boot: Build wrapper for an appropriate CPU

2022-03-30 Thread Joel Stanley
On Wed, 30 Mar 2022 at 11:33, Christophe Leroy wrote: > > > > Le 30/03/2022 à 13:24, Joel Stanley a écrit : > > Currently the boot wrapper lacks a -mcpu option, so it will be built for > > the toolchain's default cpu. This is a problem if the toolchain defaults > > to a cpu with newer

Re: [PATCH] powerpc/boot: Build wrapper for an appropriate CPU

2022-03-30 Thread Christophe Leroy
Le 30/03/2022 à 13:24, Joel Stanley a écrit : > Currently the boot wrapper lacks a -mcpu option, so it will be built for > the toolchain's default cpu. This is a problem if the toolchain defaults > to a cpu with newer instructions. > > We could wire in TARGET_CPU but instead use the oldest

[PATCH] powerpc/boot: Build wrapper for an appropriate CPU

2022-03-30 Thread Joel Stanley
Currently the boot wrapper lacks a -mcpu option, so it will be built for the toolchain's default cpu. This is a problem if the toolchain defaults to a cpu with newer instructions. We could wire in TARGET_CPU but instead use the oldest supported option so the wrapper runs anywhere. The GCC