Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for aarch64 architecture #38

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions pink/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
CLEAN_FILES = # deliberately empty, so we can append below.
CXX=g++
LDFLAGS= -lpthread -lrt
CXXFLAGS= -g -std=c++11 -fno-builtin-memcmp -msse -msse4.2 -pipe -fPIC
CXX?=g++
LDFLAGS+= -lpthread -lrt
CXXFLAGS= -g -std=c++11 -fno-builtin-memcmp -pipe -fPIC
ARCH:=$(shell uname -p)
ifeq ($(ARCH), aarch64)
CXXFLAGS+=-march=armv8-a+crc+crypto -moutline-atomics
endif
ifeq ($(ARCH), x86_64)
CXXFLAGS+=-msse -msse4.2
endif
PROFILING_FLAGS=-pg
ARFLAGS = rs
OPT=
Expand Down
9 changes: 8 additions & 1 deletion pink/examples/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
CXX=g++
LDFLAGS= -lpthread -lrt -lprotobuf
CXXFLAGS=-O2 -std=c++11 -fno-builtin-memcmp -msse -msse4.2
CXXFLAGS=-O2 -std=c++11 -fno-builtin-memcmp
ARCH:=$(shell uname -p)
ifeq ($(ARCH), aarch64)
CXXFLAGS+=-march=armv8-a+crc+crypto -moutline-atomics
endif
ifeq ($(ARCH), x86_64)
CXXFLAGS+=-msse -msse4.2
endif

.PHONY: clean all

Expand Down
2 changes: 1 addition & 1 deletion pink/src/redis_conn.cc
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ WriteStatus RedisConn::SendReply() {
}
}
if (nwritten == -1) {
if (errno == EAGAIN) {
if (errno == EAGAIN || errno == EWOULDBLOCK) {
return kWriteHalf;
} else {
// Here we should close the connection
Expand Down