Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wHiVY-007Rk9-0H for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Apr 2026 13:29:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wHiVX-00HUle-0U for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Apr 2026 13:29:47 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wHiVW-00HUlU-2n for pgsql-hackers@lists.postgresql.org; Tue, 28 Apr 2026 13:29:46 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wHiVU-00000003C2h-1C0s for pgsql-hackers@lists.postgresql.org; Tue, 28 Apr 2026 13:29:45 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 63SDTfWj2871419; Tue, 28 Apr 2026 09:29:41 -0400 From: Tom Lane To: John Naylor cc: Nathan Bossart , Peter Eisentraut , Zhang Mingli , PostgreSQL Hackers Subject: =?UTF-8?Q?Re:_[BUG=3F]_macOS_(Intel)_build_warnings:_"ranlib:_fil?= =?UTF-8?Q?e_=E2=80=A6_has_no_symbols"_for_aarch64_objects?= In-reply-to: References: <229aaaf3-f529-44ed-8e50-00cb6909af21@Spark> <4df5af1a-8528-4f9f-9daf-ec069bd66f69@eisentraut.org> <1453046.1770218933@sss.pgh.pa.us> <1472307.1770229663@sss.pgh.pa.us> <2446899.1777256313@sss.pgh.pa.us> Comments: In-reply-to John Naylor message dated "Tue, 28 Apr 2026 13:18:22 +0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2871417.1777382981.1@sss.pgh.pa.us> Date: Tue, 28 Apr 2026 09:29:41 -0400 Message-ID: <2871418.1777382981@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk John Naylor writes: > It'd be a bit unfortunate for those symbols to bleed out into the > build system, so it seems best to minimize the need for that and do as > much as possible with just architecture. src/port/meson.build could do > instead > if host_cpu == 'x86' or host_cpu == 'x86_64' > pgport_sources += files( > 'pg_cpu_x86.c', > ...etc This level of refinement is about what I was imagining for the build systems. Otherwise, if we add any more platform sub-categories to those files, we'll have to complicate the build systems to match. I'm not sure if we need to care about suppressing these warnings to a greater degree than that. My impression is that it won't be an issue for macOS because of the uniformity of the underlying hardware. If we do care, a low-tech solution could be to have a dummy symbol declared in each file, along the lines of #if HAVE_X86_64_POPCNTQ // code for popcntq case #elif HAVE_FROBNITZ // code for frobnitz case ... #else /* prevent linker complaints about empty module */ extern int pg_cpu_x86_dummy_variable; int pg_cpu_x86_dummy_variable = 0; #endif Actually then we'd not need to change the build systems either... regards, tom lane