Skip to content

Commit

Permalink
config: fix CPU instruction set for cross-build
Browse files Browse the repository at this point in the history
[ upstream commit d74543f8ad30db164c08ec69910b05d6811b1b89 ]

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: bf66003 ("build: use platform for generic and native builds")

Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Tested-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
  • Loading branch information
JoyceKong-Arm authored and kevintraynor committed Mar 8, 2024
1 parent f49c39d commit 6640c76
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions config/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,14 @@ else
cpu_instruction_set = 'generic'
endif
endif
if platform == 'native'
if cpu_instruction_set == 'auto'
cpu_instruction_set = 'native'
endif
endif
endif

if platform == 'native'
if cpu_instruction_set == 'auto'
cpu_instruction_set = 'native'
endif
elif platform == 'generic'
if platform == 'generic'
if cpu_instruction_set == 'auto'
cpu_instruction_set = 'generic'
endif
Expand Down

0 comments on commit 6640c76

Please sign in to comment.