Skip to content

Commit dbef4ca

Browse files
authored
fix: make Dragonfly compatible with older systems (#1755)
Change the Makefile to configure the compile to produce code compatible with core2 architecture for x86_64 systems. Plus specify precise CPU extensions that we use in the code. Partly addresses #1519 Before the change we relied on default helio logic that configured the build to run on sandybridge for x86_64. This PR overrides x86_64 settings to much older core2 processor. Also, we remove an unneeded cmake include. Signed-off-by: Roman Gershman <[email protected]>
1 parent 254c867 commit dbef4ca

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,3 @@ include_directories(helio)
3636

3737
add_subdirectory(helio)
3838
add_subdirectory(src)
39-
40-
include(cmake/Packing.cmake)

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,16 @@ HELIO_OPENSSL_USE_STATIC_LIBS = ON
88
HELIO_ENABLE_GIT_VERSION = ON
99
HELIO_WITH_UNWIND = OFF
1010

11+
# equivalent to: if $(uname_m) == x86_64 || $(uname_m) == amd64
12+
ifneq (, $(filter $(BUILD_ARCH),x86_64 amd64))
13+
HELIO_MARCH_OPT := -march=core2 -msse4.1 -mpopcnt -mtune=skylake
14+
endif
15+
1116
HELIO_FLAGS = $(if $(HELIO_RELEASE),-release $(HELIO_RELEASE_FLAGS),) \
1217
-DBoost_USE_STATIC_LIBS=$(HELIO_USE_STATIC_LIBS) \
1318
-DOPENSSL_USE_STATIC_LIBS=$(HELIO_OPENSSL_USE_STATIC_LIBS) \
1419
-DENABLE_GIT_VERSION=$(HELIO_ENABLE_GIT_VERSION) \
15-
-DWITH_UNWIND=$(HELIO_WITH_UNWIND) \
20+
-DWITH_UNWIND=$(HELIO_WITH_UNWIND) -DMARCH_OPT="$(HELIO_MARCH_OPT)"
1621

1722
.PHONY: default
1823

0 commit comments

Comments
 (0)