From 59129e1bf2700cc2c51009a9ce393782d81178ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jaramago=20Fern=C3=A1ndez?= Date: Tue, 19 Jan 2021 19:26:43 +0000 Subject: [PATCH] Fixes #3252: Added jemalloc compilation option '--with-lg-page' for CentOS ARM building --- deps/Makefile | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/deps/Makefile b/deps/Makefile index 1ee2ca9a9b..f5755cb155 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -1,19 +1,33 @@ UNAME_S := $(shell uname -s) +UNAME_MS := $(word 2, $(shell uname -ms)) + +ifneq (,$(wildcard /etc/system-release)) + CENTOSVER := $(shell rpm --eval %rhel) +else + CENTOSVER := Unknown +endif + +IS_ARM = $(if $(findstring aarch64, $(arch)),true,false) +IS_CENTOS = $(if $(findstring Unknown, $(CENTOSVER)),false,true) PROXYDEBUG := $(shell echo $(PROXYDEBUG)) ifeq ($(PROXYDEBUG),1) MYCFLAGS=-O0 MYJEOPT=--enable-xmalloc --enable-prof --enable-fill --enable-debug + +ifeq ($(and $(IS_ARM),$(IS_CENTOS)),true) + MYJEOPT+=--with-lg-page=16 +endif + else MYCFLAGS=-O2 MYJEOPT=--enable-xmalloc --enable-prof + +ifeq ($(and $(IS_ARM),$(IS_CENTOS)),true) + MYJEOPT+=--with-lg-page=16 endif -ifneq (,$(wildcard /etc/system-release)) - CENTOSVER := $(shell rpm --eval %rhel) -else - CENTOSVER := Unknown endif PROXYSQLCLICKHOUSE := $(shell echo $(PROXYSQLCLICKHOUSE))