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 99E636EC5C; Sun, 28 Feb 2021 21:18:18 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 99E636EC5C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1614536298; bh=Zb3+zgbeea4l0CxmiWtDwOD2jtrMu2qTJFtMGZfDp3s=; 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=gf+XrCUVX6W5EKvbJQrHwK4ymFvorpxjT6UmIKnF/TvOEoLfTfo2UjmHVssFPvQm0 vZFoDtyAuBD61ecHG/3jQlmTrID6cuQuTcLRqaGocW1BK5u5xgrrQNdSgTdzQF9xmS H4dYQXliriADx2Wwi1+JG1H5nuzV2oA45JG7Vzeo= Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (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 3E2446EC5C for ; Sun, 28 Feb 2021 21:18:17 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 3E2446EC5C Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1lGQdz-0007lT-Vl; Sun, 28 Feb 2021 21:18:16 +0300 Date: Sun, 28 Feb 2021 21:18:11 +0300 To: Sergey Kaplun Message-ID: <20210228181811.GG9042@tarantool.org> References: <7cd42be38d86c832ecd4ba0f3edd7ae83aead7ad.1612291495.git.imun@tarantool.org> <20210211192336.GC9361@root> <20210216152830.GL5448@tarantool.org> <20210218095643.GA6842@root> <20210220191835.GB9042@tarantool.org> <20210227104807.GB6842@root> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210227104807.GB6842@root> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.10.1 (2018-07-13) X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD9795828B892398B72AC588525E45B8D9948334200C4E13096182A05F5380850400BC93A6192EA80497528B40F1C035D42C5326099B78EE081089395586FFD9C07 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE749E89BD568380EECC2099A533E45F2D0395957E7521B51C2CFCAF695D4D8E9FCEA1F7E6F0F101C6778DA827A17800CE71BDE6A359BD5B800EA1F7E6F0F101C674E70A05D1297E1BBC6CDE5D1141D2B1CD7AD3EE2CF8F3F66EE63C8BBC52D659E3B8C0490DD6743669FA2833FD35BB23D9E625A9149C048EE33AC447995A7AD18618001F51B5FD3F9D2E47CDBA5A96583BD4B6F7A4D31EC0BC014FD901B82EE079FA2833FD35BB23D27C277FBC8AE2E8B55D5BE2F85BDEC5FA471835C12D1D977C4224003CC836476EC64975D915A344093EC92FD9297F6718AA50765F7900637BF1C901A33650803A7F4EDE966BC389F395957E7521B51C24C7702A67D5C33162DBA43225CD8A89F890A246B268E114E156CCFE7AF13BCA4B5C8C57E37DE458B4C7702A67D5C3316FA3894348FB808DB48C21F01D89DB561574AF45C6390F7469DAA53EE0834AAEE X-B7AD71C0: 502860A5C27E5D50661228F9A2C48A933DA88A7D86D98B915C0AF1600DCBC20B23094074FEE0A54D5C20E609EDC13177 X-C1DE0DAB: 0D63561A33F958A5C73E0036F35A39A05D42772C711BC48F10E6FB763EB329F1D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75448CF9D3A7B2C848410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3429538671E6527D3257D52D6DD3DABCB7135111E17930C9EAB18D65BCA80FB85BC382BA2854BC880D1D7E09C32AA3244CF37E662DD4B6BA4D7BD657EEBE8C7A71250262A5EE9971B0927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojlGyyJLC51G+iXxTkuyRAMg== X-Mailru-Sender: 689FA8AB762F73936BC43F508A06382212DE9026DD5176BE581A47B41A27582AA7C8D0F45F857DBFE9F1EFEE2F478337FB559BB5D741EB964C8C2C849690F8E70A04DAD6CC59E33667EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 2/5] build: replace GNU Make with CMake 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: Igor Munkin via Tarantool-patches Reply-To: Igor Munkin Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Sergey, On 27.02.21, Sergey Kaplun wrote: > Igor, > > LGTM, except a few nitpicks regarding to the commit message. Thanks, added your tag: | Reviewed-by: Sergey Kaplun > > > > > > > +if(CMAKE_LIBRARY_ARCHITECTURE) > > > > > > + AppendFlags(TARGET_C_FLAGS -DLUA_MULTILIB='"lib/${CMAKE_LIBRARY_ARCHITECTURE}"') > > > > > > +endif() > > > > > > > > > > What about `LUA_LMULTILIB`? > > > > > > > > > > Side note: should we provide `DESTDIR` or/and `MULTILIB` control variable > > > > > like it does in Makefile.original? > > > > > > > > DESTDIR is supported out of the box in CMake. MULTILIB is "autodetected" > > > > via CMake[1] (I hope, but never tried). Regardging LMULTILIB, I have no > > > > idea what its purpose is. Do you? > > > > > > To configure default CPATH, IINM, see luaconf.h for details. > > > > My fault, ask you in a different way: how do you suppose to use it? > > For example, if I want to separate directories with Lua libraries and C > libraries. May be it is the superfluous customization. If you think so, > please add the notice that this option is not implemented in CMake, and > users should use original Makefile. I added the notice and reworded the commit message the following way. Hope it covers all your nits regarding new build system NYIs. | build: replace GNU Make with CMake | | Within this patch the LuaJIT build system is partially ported from GNU | Make to CMake. These changes provide CMake build system for all | supported host architectures, but only for the following OS: GNU/Linux, | OSX, FreeBSD. For other platforms, environment tweaking and specific | builds (such as 'amalg', stripped binary and shared library, | cross-compiling support) use the old build system (see the recipe in the | previous commit). | | Several components of the new build system such as automatic version | detection, source files list generation and some recipes for | CMakeLists.txt are taken verbatim or adapted from LuaVela repository. | | Part of tarantool/tarantool#4862 > > > > > > > > > > | + AppendFlags(TARGET_SHARED_FLAGS -image_base 7fff04c4a000) > > > > > > Also I've found that this line produces warnings from linker like: > > > > > > || ld: warning: -seg1addr not 16384 byte aligned, rounding up > > > > > > So, I suggest the following solution for cmake and for the original > > > Makefile (just add 8Kb): > > > > There is the same value in the build system of the vanilla LuaJIT[2], so > > I leave everything intact. BTW, I see no warning on my Mac. > > This is why I mentioned Darwin version and add corresponding patch for > the old Makefile too. Anyway, the linker can handle this by itself, so > lets drop this as is. We can return to this with a new issue (inside our > or LuaJIT repo). You can start with creating an issue in LuaJIT queue, if the problem is reproduced with vanilla build system. > > > > > > > > > [1]: https://cmake.org/cmake/help/v3.1/variable/CMAKE_LIBRARY_ARCHITECTURE.html > > [2]: https://github.com/LuaJIT/LuaJIT/blob/v2.1/src/Makefile#L327 > -- > Best regards, > Sergey Kaplun -- Best regards, IM