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 4A801160861C; Wed, 26 Nov 2025 15:09:12 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 4A801160861C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1764158952; bh=Ml9hLWskR45tKg0fXuzsJ7hK83tSJd1TUW/P1IHL864=; h=Date:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=w/R8cK/fYQIRXmUFUymvxKZp86Wqbr40Sex8/wd+/lYCCkL6RxL66lg5og2+X/kzh chFhNs0xQB0xvRhlThi0AyP99vu0Xt5qsw4g9VQo9g9N8vvNwVPK7IEZdJckVTaM55 TMoMhrcfB6U0TlKXA2LSw3O5Py9YUaZfi7W4rXhU= Received: from send243.i.mail.ru (send243.i.mail.ru [95.163.59.82]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id D67D0160861C for ; Wed, 26 Nov 2025 15:09:10 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org D67D0160861C Received: by exim-smtp-6c58c594f5-zthdg with esmtpa (envelope-from ) id 1vOEKb-00000000EN2-1U2B; Wed, 26 Nov 2025 15:09:09 +0300 Content-Type: multipart/alternative; boundary="------------TWPmTgzCbgXs9pvRiH1GhOwc" Message-ID: Date: Wed, 26 Nov 2025 15:09:09 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org References: <0d0437d54ff1d6878afe5ec627c795b3b1c9bf8e.1763991490.git.skaplun@tarantool.org> In-Reply-To: <0d0437d54ff1d6878afe5ec627c795b3b1c9bf8e.1763991490.git.skaplun@tarantool.org> X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD966666887587E071AA10BD861000B9BAC0F3B4859AA01654700894C459B0CD1B9897C8540B9F469BC03ED270C30F246C5E0EAFCAA3C9497C6F487264F6E116FE9AD222422030090D9 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7EED5D2FAB4CEB1EDEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637FE9EFE935CD7C6AE8638F802B75D45FF914D58D5BE9E6BC1A93B80C6DEB9DEE97C6FB206A91F05B2BCC7C9F384AC15CC2E070BE324C7D3C4B527876F618D6444F6B57BC7E64490618DEB871D839B73339E8FC8737B5C22494854413538E1713FCC7F00164DA146DAFE8445B8C89999729449624AB7ADAF37F6B57BC7E64490611E7FA7ABCAF51C92176DF2183F8FC7C0A29E2F051442AF778941B15DA834481F9449624AB7ADAF37BA3038C0950A5D3613377AFFFEAFD269176DF2183F8FC7C093FFA1BBD54C76087B076A6E789B0E97A8DF7F3B2552694AD5FFEEA1DED7F25D49FD398EE364050F26055571C92BF10FE2071C6999E77799B3661434B16C20ACC84D3B47A649675FE827F84554CEF5019E625A9149C048EE9ECD01F8117BC8BEE2021AF6380DFAD18AA50765F790063735872C767BF85DA227C277FBC8AE2E8BB9CEE4F2B4A90F8475ECD9A6C639B01B4E70A05D1297E1BBCB5012B2E24CD356 X-C1DE0DAB: 0D63561A33F958A51D267A8352DCD2B05002B1117B3ED6962740549D00C10AAF406406D89DD9EB8A823CB91A9FED034534781492E4B8EEAD14747542773C033FBDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0AD73CAD6646DEDE1918E10F71CB4DF9F96AB70F9BE574AE9C625B6776AC983F447FC0B9F89525902EE6F57B2FD27647F25E66C117BDB76D6597EDFA11E7F574777E417312BB5FA50AC07754A26849855BB43F3612B0C82DB3FE87B38BBBB77B70CB8341EE9D5BE9A0AE5E1AE4469A5393CF0B819C3A3A919742827B3ED72E821298CD93680B12512CF4C41F94D744909CE2512F26BEC029E55448553D2254B8D95CD72808BE417F3B9E0E7457915DAA85F X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu53w8ahmwBjZKM/YPHZyZHvz5uv+WouB9+ObcCpyrx6l7KImUglyhkEat/+ysWwi0gdhEs0JGjl6ggRWTy1haxBpVdbIX1nthFXMZebaIdHP2ghjoIc/363UZI6Kf1ptIMVcWupAQoUeGvOM57EWdkBkY= X-Mailru-Sender: 811C44EDE0507D1FF7A5115BD94F83933460650933808EDF97B151A33FA7A9F88AF9F7D42CC69AF34AF49A3F83D0AA61645D15D82EE4B272BD6E4642A116CA93524AA66B5ACBE6721EF430B9A63E2A504198E0F3ECE9B5443453F38A29522196 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 2/3] macOS: Workaround for buggy XCode 15.0 - 15.2 linker. 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 Bronnikov via Tarantool-patches Reply-To: Sergey Bronnikov Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" This is a multi-part message in MIME format. --------------TWPmTgzCbgXs9pvRiH1GhOwc Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi, Sergey, thanks for the patch! LGTM with a minor comment. Sergey On 11/24/25 23:26, Sergey Kaplun wrote: > From: Mike Pall > > Thanks to Carlo Cabrera. > > (cherry picked from commit b2915e9ab55b999429b4d1931097064c4e17de53) > > The previous commit removes emitting the `.subsections_via_symbols` [1] > directive for macOS. Nevertheless, the aforementioned Xcode linker > versions produce incorrect code for the VM without this directive. > > As a fix for old versions of macOS, this patch adds emitting this I would add exact macOS versions, according to [1] it is: 15000000 1. https://stackoverflow.com/questions/19387043/how-can-i-reliably-detect-the-version-of-clang-at-preprocessing-time#comment137533353_19391724 > directive in the buildvm. > > [1]:https://reviews.llvm.org/D79926 > > Sergey Kaplun: > * added the description for the problem > > Part of tarantool/tarantool#11691 > --- > src/host/buildvm_asm.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/src/host/buildvm_asm.c b/src/host/buildvm_asm.c > index 43595b31..fc09d71a 100644 > --- a/src/host/buildvm_asm.c > +++ b/src/host/buildvm_asm.c > @@ -347,6 +347,10 @@ void emit_asm(BuildCtx *ctx) > fprintf(ctx->fp, "\t.ident \"%s\"\n", ctx->dasm_ident); > break; > case BUILD_machasm: > +#if defined(__apple_build_version__) && __apple_build_version__ >= 15000000 && __apple_build_version__ < 15000300 > + /* Workaround for XCode 15.0 - 15.2. */ __apple_build_version__ defines a macOS version. But macOS 15 includes XCode 16, see [2], not 15.x So there is an inconsistency in condition and comment. I would list macOS versions in a comment like this "Workaround for macOS 15, 15.1 and 15.2" to avoid misinterpretation due to non-strict inequality with 15000300. Also, I would include a link to [2] to the commit message. 2. https://developer.apple.com/documentation/macos-release-notes/macos-15-release-notes > + fprintf(ctx->fp, "\t.subsections_via_symbols\n"); > +#endif > fprintf(ctx->fp, > "\t.cstring\n" > "\t.ascii \"%s\\0\"\n", ctx->dasm_ident); --------------TWPmTgzCbgXs9pvRiH1GhOwc Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Hi, Sergey,

thanks for the patch! LGTM with a minor comment.

Sergey

On 11/24/25 23:26, Sergey Kaplun wrote:
From: Mike Pall <mike>

Thanks to Carlo Cabrera.

(cherry picked from commit b2915e9ab55b999429b4d1931097064c4e17de53)

The previous commit removes emitting the `.subsections_via_symbols` [1]
directive for macOS. Nevertheless, the aforementioned Xcode linker
versions produce incorrect code for the VM without this directive.

As a fix for old versions of macOS, this patch adds emitting this
I would add exact macOS versions, according to [1] it is: 15000000
1. https://stackoverflow.com/questions/19387043/how-can-i-reliably-detect-the-version-of-clang-at-preprocessing-time#comment137533353_19391724
directive in the buildvm.

[1]: https://reviews.llvm.org/D79926

Sergey Kaplun:
* added the description for the problem

Part of tarantool/tarantool#11691
---
 src/host/buildvm_asm.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/host/buildvm_asm.c b/src/host/buildvm_asm.c
index 43595b31..fc09d71a 100644
--- a/src/host/buildvm_asm.c
+++ b/src/host/buildvm_asm.c
@@ -347,6 +347,10 @@ void emit_asm(BuildCtx *ctx)
     fprintf(ctx->fp, "\t.ident \"%s\"\n", ctx->dasm_ident);
     break;
   case BUILD_machasm:
+#if defined(__apple_build_version__) && __apple_build_version__ >= 15000000 && __apple_build_version__ < 15000300
+    /* Workaround for XCode 15.0 - 15.2. */

__apple_build_version__ defines a macOS version. But macOS 15 includes XCode 16, see [2], not 15.x

So there is an inconsistency in condition and comment. I would list macOS versions in a comment like this

"Workaround for macOS 15, 15.1 and 15.2" to avoid misinterpretation due to non-strict inequality with 15000300.

Also, I would include a link to [2] to the commit message.

2. https://developer.apple.com/documentation/macos-release-notes/macos-15-release-notes

+    fprintf(ctx->fp, "\t.subsections_via_symbols\n");
+#endif
     fprintf(ctx->fp,
       "\t.cstring\n"
       "\t.ascii \"%s\\0\"\n", ctx->dasm_ident);
--------------TWPmTgzCbgXs9pvRiH1GhOwc--