From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 2DDE96F3C8; Mon, 3 Oct 2022 10:39:39 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 2DDE96F3C8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1664782779; bh=vEVeU+hcrrob9wQO60PwxDi8W3VlyXvwm2mlj2AgYaY=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=sc5JYsNZguN6Qrs42QTuddTWYdEpaSRtILOBiLtkzH39i25GGOisGLq1SPP6MtElR lO+ljloNzHcHJkvCbSkX+xPOYuoGDIAI4ybw6uiaMvRA2vt/rXUOkBfDVxbEQrE+S5 oREf35d+dA3nwt/9/ci/WopwEsG6qOflL/4kP0UA= Received: from smtp39.i.mail.ru (smtp39.i.mail.ru [94.100.177.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id C4EC96F3C8 for ; Mon, 3 Oct 2022 10:39:37 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org C4EC96F3C8 Received: by smtp39.i.mail.ru with esmtpa (envelope-from ) id 1ofG36-0006Fr-9L; Mon, 03 Oct 2022 10:39:37 +0300 Date: Mon, 3 Oct 2022 10:36:44 +0300 To: Maksim Kokryashkin Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD95BC634034C2E7965DA83E3C469031EC888AB18343AB3162C182A05F5380850401E9908C8924DB79EFF3C08DCE2BC5929AAD813CF1809E325C6FC5D258A661A92 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7195F30236A8D43B4EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006373318DFCEF5C6D9308638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8A893E5B91E4366853CFB082DBA5092BE117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC94BA36676CB21B6B389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC8ED96AA85C75E140D117882F4460429728AD0CFFFB425014E868A13BD56FB6657D81D268191BDAD3DC09775C1D3CA48CF8BF83A9D7442665EBA3038C0950A5D36C8A9BA7A39EFB766EC990983EF5C0329BA3038C0950A5D36D5E8D9A59859A8B6378990534548B4FE76E601842F6C81A1F004C906525384303E02D724532EE2C3F43C7A68FF6260569E8FC8737B5C224952D31B9D28593E51E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B682BBBAF5DF00056E089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-C1DE0DAB: 9604B64F49C60606AD91A466A1DEF99B296C473AB1E142185AC9E3593CE4B31AB1881A6453793CE9274300E5CE05BD4401A9E91200F654B0CBAED148C0C85B120E0E6A89656E61D3650D931C53AF1AD1DCE0442BA16BC8B19C2B6934AE262D3EE7EAB7254005DCED8DA55E71E02F9FC08E8E86DC7131B365E7726E8460B7C23C X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D349F4E6BC39AAD02BB64C7330030A4DFC2C84C64E1A849D0F547406C77D6FA20365AE7822C6EBF18A21D7E09C32AA3244C5E0C7D5BE5410145A3D04591F188BEF824AF4FAF06DA24FDFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojf/9mtrlthuQlqElSHvKIxw== X-Mailru-Sender: 11ABF2DAD5F2676891056722DE4A719E5F5AA522111097C5FF3C08DCE2BC5929825871508D9F3970DEDBA653FF35249392D99EB8CC7091A70E183A470755BFD208F19895AA18418972D6B4FCE48DF648AE208404248635DF X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 1/6] Cleanup and enable external unwinding for more platforms. X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Sergey Kaplun via Tarantool-patches Reply-To: Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi, Maksim! Thanks for the patch! LGTM, just a few nits and several small side notes below. On 26.09.22, Maksim Kokryashkin wrote: > (cherry picked from commit e131936133c58de4426c595db2341caf5a1665b5) > > This commit enables external unwiding on all platforms, that Typo: s/unwiding/unwinding/ > create unwind tables by default. Corresponding check is added > to the build routine. > > Also, GC64 mode is now enabled on MacOS by default. Maybe we should notice, that non-GC64 mode is now forbidden for MacOs? > > Maxim Kokryashkin: > * added the description for the patch > > Needed for tarantool/tarantool#6096 > Needed for tarantool/tarantool#7230 > --- > CMakeLists.txt | 3 + > cmake/SetTargetFlags.cmake | 22 ++- > doc/extensions.html | 22 +-- > src/Makefile.original | 11 +- > src/lj_arch.h | 27 ++-- > src/lj_err.c | 321 +++++++++++++++++++------------------ > 6 files changed, 213 insertions(+), 193 deletions(-) > > diff --git a/CMakeLists.txt b/CMakeLists.txt > index 8b49f9d7..c4f3ef62 100644 > --- a/CMakeLists.txt > +++ b/CMakeLists.txt > @@ -176,6 +176,9 @@ endif() > > # Enable GC64 mode for x64. > option(LUAJIT_ENABLE_GC64 "GC64 mode for x64" OFF) > +if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") > + set(LUAJIT_ENABLE_GC64 ON) > +endif() Side note: So, we shouldn't forget to remove it additional set in the Tarantool build system. Also, I see no fortified enabled in the LuaJIT original commit. Is this because this commit is later than enabling GC64 mode by default? > if(LUAJIT_ENABLE_GC64) > AppendFlags(TARGET_C_FLAGS -DLUAJIT_ENABLE_GC64) > endif() > diff --git a/cmake/SetTargetFlags.cmake b/cmake/SetTargetFlags.cmake > index b544d2ac..36896aff 100644 > --- a/cmake/SetTargetFlags.cmake > +++ b/cmake/SetTargetFlags.cmake > @@ -15,6 +15,22 @@ endif() > LuaJITTestArch(TESTARCH "${TARGET_C_FLAGS}") > LuaJITArch(LUAJIT_ARCH "${TESTARCH}") > > +string(FIND ${TARGET_C_FLAGS} "LJ_NO_UNWIND 1" UNWIND_POS) > +if(UNWIND_POS EQUAL -1) > + execute_process( > + COMMAND bash -c "exec 2>/dev/null; echo 'extern void b(void);int a(void){b();return 0;}' | ${CMAKE_C_COMPILER} -c -x c - -o tmpunwind.o && grep -qa -e eh_frame -e __unwind_info tmpunwind.o && echo E; rm -f tmpunwind.o" Side note: I'm OK with the same check as Mike did. Does `check_c_compiler_flag(-funwind-tables TESTUNWIND)` check the same thing, but in a more readable way? > + WORKING_DIRECTORY ${LUAJIT_SOURCE_DIR} > + OUTPUT_VARIABLE TESTUNWIND > + RESULT_VARIABLE TESTUNWIND_RC > + ) > + if(TESTUNWIND_RC EQUAL 0) > + string(FIND "${TESTUNWIND}" "E" UNW_TEST_POS) > + if(NOT UNW_TEST_POS EQUAL -1) > + AppendFlags(TARGET_C_FLAGS -DLUAJIT_UNWIND_EXTERNAL) > + endif() > + endif() > +endif() > + > # Target-specific compiler options. > # > # x86/x64 only: For GCC 4.2 or higher and if you don't intend to > @@ -25,12 +41,6 @@ if(LUAJIT_ARCH STREQUAL "x86") > endif() > > diff --git a/doc/extensions.html b/doc/extensions.html > index e0f136e2..777e9928 100644 > --- a/doc/extensions.html > +++ b/doc/extensions.html > diff --git a/src/Makefile.original b/src/Makefile.original > index dd1c6a76..c9609700 100644 > --- a/src/Makefile.original > +++ b/src/Makefile.original > diff --git a/src/lj_arch.h b/src/lj_arch.h > index 40129d9e..730be5bf 100644 > --- a/src/lj_arch.h > +++ b/src/lj_arch.h > diff --git a/src/lj_err.c b/src/lj_err.c > index c310daf6..298e5434 100644 > --- a/src/lj_err.c > +++ b/src/lj_err.c > -- Best regards, Sergey Kaplun