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

SSE detection is broken on arm64 macos #36

Open
gjasny opened this issue Nov 13, 2020 · 0 comments
Open

SSE detection is broken on arm64 macos #36

gjasny opened this issue Nov 13, 2020 · 0 comments

Comments

@gjasny
Copy link

gjasny commented Nov 13, 2020

Hello,

on arm64 macOS configure detects the following:

checking whether C compiler accepts -msse2... yes
checking whether C compiler accepts -mssse3... yes
checking whether C compiler accepts -msse4.1... yes
checking whether C compiler accepts -mavx... yes
checking whether C compiler accepts -mxop... yes

Looking into config.log shows the following:

configure:12899: checking whether C compiler accepts -mavx
configure:12918: gcc -c -g -O2 -O3  -mavx  conftest.c >&5
clang: warning: argument unused during compilation: '-mavx' [-Wunused-command-line-argument]
configure:12918: $? = 0
configure:12926: result: yes

The right fix would be to check the target cpu family and restrict the SSE/AVX checks to the Intel family.

A more hacky way would be to check for a working -Werror=unused-command-line-argument flag and pass it to the AX_CHECK_COMPILE_FLAG macro as extra parameter.

Thanks,
Gregor

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