From a9d1955a17f61a74ca27eb32f2318fb18082a7f6 Mon Sep 17 00:00:00 2001 From: Bin Lu Date: Mon, 22 Oct 2018 11:12:56 +0800 Subject: [PATCH] enable build on Arm64. Signed-off-by: Bin Lu --- ci/build_container/build_recipes/luajit.sh | 4 ++-- ci/prebuilt/BUILD | 4 ++-- source/exe/signal_action.cc | 4 ++++ source/extensions/filters/common/lua/lua.h | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ci/build_container/build_recipes/luajit.sh b/ci/build_container/build_recipes/luajit.sh index e05d6c8880f5..f40bb78058a9 100644 --- a/ci/build_container/build_recipes/luajit.sh +++ b/ci/build_container/build_recipes/luajit.sh @@ -2,8 +2,8 @@ set -e -VERSION=2.0.5 -SHA256=8bb29d84f06eb23c7ea4aa4794dbb248ede9fcb23b6989cbef81dc79352afc97 +VERSION=2.1.0-beta3 +SHA256=409f7fe570d3c16558e594421c47bdd130238323c9d6fd6c83dedd2aaeb082a8 curl https://github.com/LuaJIT/LuaJIT/archive/v"$VERSION".tar.gz -sLo LuaJIT-"$VERSION".tar.gz \ && echo "$SHA256" LuaJIT-"$VERSION".tar.gz | sha256sum --check diff --git a/ci/prebuilt/BUILD b/ci/prebuilt/BUILD index 8997736ea30a..23e1f5c0f394 100644 --- a/ci/prebuilt/BUILD +++ b/ci/prebuilt/BUILD @@ -43,9 +43,9 @@ cc_library( ":windows_x86_64": ["thirdparty_build/lib/luajit.lib"], "//conditions:default": ["thirdparty_build/lib/libluajit-5.1.a"], }), - hdrs = glob(["thirdparty_build/include/luajit-2.0/*"]), + hdrs = glob(["thirdparty_build/include/luajit-2.1/*"]), includes = ["thirdparty_build/include"], - # TODO(mattklein123): We should strip luajit-2.0 here for consumers. However, if we do that + # TODO(mattklein123): We should strip luajit-2.1 here for consumers. However, if we do that # the headers get included using -I vs. -isystem which then causes old-style-cast warnings. ) diff --git a/source/exe/signal_action.cc b/source/exe/signal_action.cc index bcd297e14144..793d719643c3 100644 --- a/source/exe/signal_action.cc +++ b/source/exe/signal_action.cc @@ -20,6 +20,10 @@ void SignalAction::sigHandler(int sig, siginfo_t* info, void* context) { error_pc = reinterpret_cast(ucontext->uc_mcontext->__ss.__rip); #elif defined(__powerpc__) error_pc = reinterpret_cast(ucontext->uc_mcontext.regs->nip); +#elif defined(__aarch64__) + error_pc = reinterpret_cast(ucontext->uc_mcontext.pc); +#elif defined(__arm__) + error_pc = reinterpret_cast(ucontext->uc_mcontext.arm_pc); #else #warning "Please enable and test PC retrieval code for your arch in signal_action.cc" // x86 Classic: reinterpret_cast(ucontext->uc_mcontext.gregs[REG_EIP]); diff --git a/source/extensions/filters/common/lua/lua.h b/source/extensions/filters/common/lua/lua.h index a12ba7132b9c..784579f73c1c 100644 --- a/source/extensions/filters/common/lua/lua.h +++ b/source/extensions/filters/common/lua/lua.h @@ -11,7 +11,7 @@ #include "common/common/c_smart_ptr.h" #include "common/common/logger.h" -#include "luajit-2.0/lua.hpp" +#include "luajit-2.1/lua.hpp" namespace Envoy { namespace Extensions {