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 0CBFC1585641; Mon, 24 Nov 2025 23:27:12 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 0CBFC1585641 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1764016032; bh=OJL56loymzSUN5FDsER10O1EVyD2BloW/2qg1x34DBc=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=cmyLc4Smp72OiZZ/LRvFTSfeNo54LMv2WDbaVsuwH7PHrS24Tu5bj6P4TE0W9qAi2 ta/e7ZjRfMec6u3LQ7PdeDe60JiHUAjPuoPnMk0LZOVwQOwLz5A2XROr22/91Joe3t cegiIM4ByEdQq3ExTMoIdOThrxSdXuS/JEJzPNGI= Received: from send172.i.mail.ru (send172.i.mail.ru [95.163.59.11]) (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 2EF271565197 for ; Mon, 24 Nov 2025 23:26:41 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 2EF271565197 Received: by exim-smtp-7595f44dc-xg47j with esmtpa (envelope-from ) id 1vNd8x-0000000060Z-3krZ; Mon, 24 Nov 2025 23:26:40 +0300 To: Sergey Bronnikov Date: Mon, 24 Nov 2025 23:26:36 +0300 Message-ID: X-Mailer: git-send-email 2.51.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD98893113B6235BE9154332F971E2EBA00BBA55F3F28E139E7182A05F5380850409D02F14D7861C8A13DE06ABAFEAF67050D04906B08989A5FF61F8D57BFD8EB5C6CDF01CFFFA87C39 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE71D44F6E7EB16B5A3EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637AC83A81C8FD4AD23D82A6BABE6F325AC2E85FA5F3EDFCBAA7353EFBB55337566CE2939761849F14BAD801E45FF4D7345F1A366D59957DA449E3C9CFE54EB37F7389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C0FF650BF36608E5878941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B611E5B64A728E1589CC7F00164DA146DA6F5DAA56C3B73B237318B6A418E8EAB86D1867E19FE14079C09775C1D3CA48CF3D321E7403792E342EB15956EA79C166A417C69337E82CC275ECD9A6C639B01B78DA827A17800CE7742996B5449390BC731C566533BA786AA5CC5B56E945C8DA X-C1DE0DAB: 0D63561A33F958A5B06CAFB8A0EA72285002B1117B3ED69673350C2BEA3012655D145BB8EF0DE66B823CB91A9FED034534781492E4B8EEADABF80F987DAEDACBC79554A2A72441328621D336A7BC284946AD531847A6065A535571D14F44ED41 X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF79E59437EBFDFF73DCA924A604EB492EA5DE15894526A312259EFCEF00E77E680F85117B495E935B88B212B8CAA19D17210AC9B4BD3B8866BBB884ACC53841D4D532803CEAF71CD85F4332CA8FE04980913E6812662D5F2A5EAB5682573093F7837F15F2B5E4A70B33F2C28C22F508233FCF178C6DD14203 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu53w8ahmwBjZKM/YPHZyZHvz5uv+WouB9+ObcCpyrx6l7KImUglyhkEat/+ysWwi0gdhEs0JGjl6ggRWTy1haxBpVdbIX1nthFXMZebaIdHP2ghjoIc/363UZI6Kf1ptIMVcWupAQoUeGvlYg4csz5suk= X-DA7885C5: 8FDB21E7AECBB3C3F255D290C0D534F9F9CB6D1D9B3B24C804F8FE9EC2A453A6FB9EDA5858D2C8F05B1A4C17EAA7BC4BEF2421ABFA55128DAF83EF9164C44C7E X-Mailru-Sender: 689FA8AB762F7393DDD5FD59B456EAD2E9763C60120E9DC51A2A8EE136DAC80D94837FE2E6418746E49D44BB4BD9522A059A1ED8796F048DB274557F927329BE89D5A3BC2B10C37545BD1C3CC395C826B4A721A3011E896F X-Mras: Ok Subject: [Tarantool-patches] [PATCH luajit 1/3] macOS: Fix macOS 15 / Clang 16 build. 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" From: Mike Pall Note: The -Wl,-no_deduplicate workaround is NOT needed anymore. Thanks to fxcoudert, corsix, clason, baconpaul, mvf. (cherry picked from commit 2240d84464cc3dcb22fd976f1db162b36b5b52d5) When building LuaJIT in the non-Debug mode, the -O2 optimization flag is applied for both the compiler and the linker. Thus, the linker may apply various optimizations, such as code deduplication. Since macOS 15, the bundled Clang provided by Xcode tools may wrongly deduplicate the part of the LuaJIT VM. One workaround may be to provide a flag to the linker `-Wl,-no_deduplicate` [1], which helps to avoid wrong deduplication. The other option is to remove emitting `.subsections_via_symbols` [2] to avoid shrinking the object file by the labels. The second option is more robust, since there is no rationale why this directive was added in the past. [1]: https://rocm.docs.amd.com/projects/llvm-project/en/latest/LLVM/lld/html/MachO/ld64-vs-lld.html [2]: https://reviews.llvm.org/D79926 Sergey Kaplun: * added the description for the problem Part of tarantool/tarantool#11691 --- src/vm_arm64.dasc | 1 - src/vm_x64.dasc | 1 - src/vm_x86.dasc | 1 - 3 files changed, 3 deletions(-) diff --git a/src/vm_arm64.dasc b/src/vm_arm64.dasc index c5f0a7a7..6600e226 100644 --- a/src/vm_arm64.dasc +++ b/src/vm_arm64.dasc @@ -4076,7 +4076,6 @@ static void emit_asm_debug(BuildCtx *ctx) "LEFDEY:\n\n", fcsize); } #endif - fprintf(ctx->fp, ".subsections_via_symbols\n"); } break; #endif diff --git a/src/vm_x64.dasc b/src/vm_x64.dasc index d5296759..8b6781a6 100644 --- a/src/vm_x64.dasc +++ b/src/vm_x64.dasc @@ -4943,7 +4943,6 @@ static void emit_asm_debug(BuildCtx *ctx) "LEFDEY:\n\n", fcsize); } #endif - fprintf(ctx->fp, ".subsections_via_symbols\n"); } break; #endif diff --git a/src/vm_x86.dasc b/src/vm_x86.dasc index b043b830..7c11c78e 100644 --- a/src/vm_x86.dasc +++ b/src/vm_x86.dasc @@ -5853,7 +5853,6 @@ static void emit_asm_debug(BuildCtx *ctx) fprintf(ctx->fp, "L_%s$stub:\n\t.indirect_symbol _%s\n\t.ascii \"\\364\\364\\364\\364\\364\"\n", *xn, *xn); } #endif - fprintf(ctx->fp, ".subsections_via_symbols\n"); } break; #endif -- 2.51.2