Skip to content

Commit 1438bad

Browse files
authored
Fix #892: use -msse4 rather than -msse4.1 in Makefiles (#991)
There was an inconsistency in the Makefiles versus `tests/BUILD` and `tests/make.sh`, in that a couple of the Makewfiles used `-msse4.1` while the BUILD file and `tests/make.sh` used `-msse4`. In addition, it seems that `-msse4` subsumes `-msse4.1`, and so overall, it appears better to use `-msse4`. Fixes #892.
1 parent 6c33bda commit 1438bad

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

pybind_interface/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ endif
4141

4242
# The flags for the compilation of the simd-specific Pybind11 interfaces
4343
PYBINDFLAGS_BASIC = $(PYBINDFLAGS)
44-
PYBINDFLAGS_SSE = -msse4.1 $(PYBINDFLAGS)
44+
PYBINDFLAGS_SSE = -msse4 $(PYBINDFLAGS)
4545
PYBINDFLAGS_AVX2 = -mavx2 -mfma $(PYBINDFLAGS)
4646
PYBINDFLAGS_AVX512 = -mavx512f -mbmi2 $(PYBINDFLAGS)
4747

pybind_interface/sse/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ if(WIN32)
2121
# This prevents a conflict with /RTC1 in DEBUG builds.
2222
add_compile_options($<$<NOT:$<CONFIG:Debug>>:/O2>)
2323
else()
24-
add_compile_options(-msse4.1 -O3 -flto=auto)
24+
add_compile_options(-msse4 -O3 -flto=auto)
2525
endif()
2626

2727
if(APPLE)

tests/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ SSE_FILES =
2525
AVX2_FILES =
2626
AVX512_FILES =
2727
ifneq (,$(HAVE_SSE))
28-
SSE_FLAGS ?= -msse4.1
28+
SSE_FLAGS ?= -msse4
2929
SSE_FILES := $(wildcard *_sse_test.cc)
3030
endif
3131
ifneq (,$(HAVE_AVX2))

0 commit comments

Comments
 (0)