Skip to content

Fix SSE4.1/AVX flags not applied on FreeBSD (amd64)#133

Open
Yaraslaut wants to merge 1 commit into
masterfrom
fix-freebsd-amd64-sse41
Open

Fix SSE4.1/AVX flags not applied on FreeBSD (amd64)#133
Yaraslaut wants to merge 1 commit into
masterfrom
fix-freebsd-amd64-sse41

Conversation

@Yaraslaut

Copy link
Copy Markdown
Member

The SIMD compile-flag block was guarded by a case-sensitive match on CMAKE_SYSTEM_PROCESSOR ("x86_64" or "AMD64"). FreeBSD (and other BSDs) report the processor as lowercase "amd64", so the block was skipped and -msse4.1 was never applied to convert.cpp. Because the x86 intrinsics in intrinsics.h are gated on x86_64 (always defined by clang on amd64), convert.cpp still compiled the SSE4.1 intrinsics, failing with:

always_inline function '_mm_cvtepu8_epi32' requires target feature
'sse4.1', but would be inlined into function 'cvtepu8_epi32' that is
compiled without support for 'sse4.1'

Normalize CMAKE_SYSTEM_PROCESSOR to lowercase before comparing, matching x86_64/amd64 across Linux, Windows, and the BSDs.

The SIMD compile-flag block was guarded by a case-sensitive match on
CMAKE_SYSTEM_PROCESSOR ("x86_64" or "AMD64"). FreeBSD (and other BSDs)
report the processor as lowercase "amd64", so the block was skipped and
-msse4.1 was never applied to convert.cpp. Because the x86 intrinsics in
intrinsics.h are gated on __x86_64__ (always defined by clang on amd64),
convert.cpp still compiled the SSE4.1 intrinsics, failing with:

  always_inline function '_mm_cvtepu8_epi32' requires target feature
  'sse4.1', but would be inlined into function 'cvtepu8_epi32' that is
  compiled without support for 'sse4.1'

Normalize CMAKE_SYSTEM_PROCESSOR to lowercase before comparing, matching
x86_64/amd64 across Linux, Windows, and the BSDs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant