Skip to content

Commit

Permalink
fix: make Dragonfly compatible with older systems (#1755)
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
romange authored Aug 29, 2023
1 parent 254c867 commit dbef4ca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,3 @@ include_directories(helio)

add_subdirectory(helio)
add_subdirectory(src)

include(cmake/Packing.cmake)
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,16 @@ HELIO_OPENSSL_USE_STATIC_LIBS = ON
HELIO_ENABLE_GIT_VERSION = ON
HELIO_WITH_UNWIND = OFF

# equivalent to: if $(uname_m) == x86_64 || $(uname_m) == amd64
ifneq (, $(filter $(BUILD_ARCH),x86_64 amd64))
HELIO_MARCH_OPT := -march=core2 -msse4.1 -mpopcnt -mtune=skylake
endif

HELIO_FLAGS = $(if $(HELIO_RELEASE),-release $(HELIO_RELEASE_FLAGS),) \
-DBoost_USE_STATIC_LIBS=$(HELIO_USE_STATIC_LIBS) \
-DOPENSSL_USE_STATIC_LIBS=$(HELIO_OPENSSL_USE_STATIC_LIBS) \
-DENABLE_GIT_VERSION=$(HELIO_ENABLE_GIT_VERSION) \
-DWITH_UNWIND=$(HELIO_WITH_UNWIND) \
-DWITH_UNWIND=$(HELIO_WITH_UNWIND) -DMARCH_OPT="$(HELIO_MARCH_OPT)"

.PHONY: default

Expand Down

0 comments on commit dbef4ca

Please sign in to comment.