> -----Original Message-----
> From: Stephen Hemminger <[email protected]>
> Sent: Friday, December 8, 2023 6:41 AM
> To: Joyce Kong <[email protected]>
> Cc: [email protected]; Ruifeng Wang <[email protected]>;
> [email protected]; [email protected]; nd <[email protected]>;
> [email protected]
> Subject: Re: [PATCH v4 1/2] config: correct cpu instruction set for cross
> build
>
> On Tue, 5 Dec 2023 03:52:58 +0000
> Joyce Kong <[email protected]> wrote:
>
> > The platform value would be 'native' only when not cross build.
> > Move the operation about modifying cpu_instruction_set while platform
> > equals 'native' to the not cross build branch.
> >
> > Fixes: bf66003b51ec ("build: use platform for generic and native
> > builds")
> > Cc: [email protected]
> >
> > Signed-off-by: Joyce Kong <[email protected]>
> > Reviewed-by: Ruifeng Wang <[email protected]>
>
> Looks right, what is the impact on existing users doing current cross builds?
The original operation changes cpu_instruction_set to 'native' when both
'platform == native' and 'cpu_instruction_set == auto'.
There was no impact on the existing users for current cross build, as the cross
files set cpu field to a specific arch, such as 'armv8-a', and this didn't
trigger the modification for cpu_instruction_set.
However, if we want to use a common arch in cross files like 'auto', the
modification operation would override 'native' value to cpu_instruction_set and
b7676fcccab4 ("config: verify machine arch flag") would break the build as it
tries to test -march=native.
>
> Acked-by: Stephen Hemminger <[email protected]>