Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arm64: force -mcpu to be valid #21117

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

clementperon
Copy link
Contributor

@clementperon clementperon commented Jun 20, 2024

Description

When building with a cross-toolchain some CXX_FLAGS could be set to a specific CPU.

This leads to a CPU not compatible with some specific functions compiles with ARCH v8.2+bf16

Error is :
cc1: error: switch '-mcpu=XXXX' conflicts with '-march=armv8.2-a+i8mm' switch

Motivation and Context

As these functions are dispatched at runtime and as there is no -mno-cpu, force the -mcpu to be valid by forcing it to a valid combination of -march and -mcpu

@snnn
Copy link
Member

snnn commented Jun 20, 2024

@clementperon
Copy link
Contributor Author

@snnn according to your article we should avoid -march and only use -mcpu.

What would you say about only keeping -mcpu in this patch ? This would also fix my issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants