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

Add a tool to convert CFLAGS into CPU_FLAGS #24

Open
mgorny opened this issue Jan 1, 2024 · 1 comment
Open

Add a tool to convert CFLAGS into CPU_FLAGS #24

mgorny opened this issue Jan 1, 2024 · 1 comment

Comments

@mgorny
Copy link
Member

mgorny commented Jan 1, 2024

It has been suggested that we could have a tool that would take an -march= option and output the corresponding CPU_FLAGS_*. I'm thinking the cleanest approach would be to actually to defer to GCC to expand CFLAGS into a set of -m options, and map them onto CPU_FLAGS_*. However, we first need to check if all of the flags have corresponding -m options.

@mgorny
Copy link
Member Author

mgorny commented Jan 1, 2024

x86: only mmxext (not very important, as it's implied by SSE), and padlock are missing.

ppc: there's only -mvsx, we apparently also check for vsx2 + vsx3 based on architecture version.

arm: we have a bunch of ABI-related options that won't be available from -march, some of the flags are part of -march, need to investigate more.

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

No branches or pull requests

1 participant