mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2024-12-14 11:58:02 +00:00
a1c3d8e33d
1. Relax processor requirements for Dragonfly. Fixes #124. 2. Introduce cmake option DF_USE_SSL to allow building DF without SSL support. Fixes #128. Signed-off-by: Roman Gershman <roman@dragonflydb.io>
42 lines
1.1 KiB
Diff
42 lines
1.1 KiB
Diff
diff --git a/luaconf.h b/luaconf.h
|
|
index d42d14b7..75647e72 100644
|
|
--- a/luaconf.h
|
|
+++ b/luaconf.h
|
|
@@ -731,7 +731,7 @@
|
|
** (It must fit into max(size_t)/32.)
|
|
*/
|
|
#if LUAI_IS32INT
|
|
-#define LUAI_MAXSTACK 1000000
|
|
+#define LUAI_MAXSTACK 4096
|
|
#else
|
|
#define LUAI_MAXSTACK 15000
|
|
#endif
|
|
diff --git a/makefile b/makefile
|
|
index d46e650c..e347e614 100644
|
|
--- a/makefile
|
|
+++ b/makefile
|
|
@@ -66,13 +66,21 @@ LOCAL = $(TESTS) $(CWARNS)
|
|
|
|
|
|
# enable Linux goodies
|
|
-MYCFLAGS= $(LOCAL) -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE
|
|
+MYCFLAGS= $(LOCAL) -std=c99 -g -O2 -DLUA_USE_LINUX
|
|
MYLDFLAGS= $(LOCAL) -Wl,-E
|
|
-MYLIBS= -ldl -lreadline
|
|
+MYLIBS= -ldl
|
|
|
|
+uname_m := $(shell uname -m)
|
|
+ifeq ($(uname_m),x86_64)
|
|
+OPTFLAGS= -march=sandybridge
|
|
+else ifeq ($(uname_m), aarch64)
|
|
+OPTFLAGS= -march=armv8.2-a+fp16+rcpc+dotprod+crypto
|
|
+else
|
|
+ $(error ERROR: unknown architecture $(uname_m))
|
|
+endif
|
|
|
|
CC= gcc
|
|
-CFLAGS= -Wall -O2 $(MYCFLAGS) -fno-stack-protector -fno-common -march=native
|
|
+CFLAGS= -Wall -O2 $(MYCFLAGS) -fno-stack-protector -fno-common $(OPTFLAGS)
|
|
AR= ar rc
|
|
RANLIB= ranlib
|
|
RM= rm -f
|