Skip to content

SSE detection is broken on arm64 macos #36

Description

@gjasny

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions