mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2024-12-14 11:58:02 +00:00
fix(lua): use broadwell architecture when compiling lua for x86_64.
This commit is contained in:
parent
1c51a65d25
commit
b855b50fb7
2 changed files with 16 additions and 2 deletions
|
@ -12,10 +12,10 @@ index d42d14b7..75647e72 100644
|
|||
#define LUAI_MAXSTACK 15000
|
||||
#endif
|
||||
diff --git a/makefile b/makefile
|
||||
index d46e650c..52d8d57b 100644
|
||||
index d46e650c..e347e614 100644
|
||||
--- a/makefile
|
||||
+++ b/makefile
|
||||
@@ -66,9 +66,9 @@ LOCAL = $(TESTS) $(CWARNS)
|
||||
@@ -66,13 +66,21 @@ LOCAL = $(TESTS) $(CWARNS)
|
||||
|
||||
|
||||
# enable Linux goodies
|
||||
|
@ -25,5 +25,18 @@ index d46e650c..52d8d57b 100644
|
|||
-MYLIBS= -ldl -lreadline
|
||||
+MYLIBS= -ldl
|
||||
|
||||
+uname_m := $(shell uname -m)
|
||||
+ifeq ($(uname_m),x86_64)
|
||||
+OPTFLAGS= -march=broadwell
|
||||
+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
|
||||
|
|
|
@ -16,6 +16,7 @@ pwd
|
|||
|
||||
cd build-opt
|
||||
ninja dragonfly && ldd dragonfly
|
||||
./dragonfly --version
|
||||
mv dragonfly $NAME
|
||||
tar cvfz $NAME.unstripped.tar.gz $NAME ../LICENSE.md
|
||||
strip $NAME
|
||||
|
|
Loading…
Reference in a new issue