Re: [BUG?] macOS (Intel) build warnings: "ranlib: file … has no symbols" for aarch64 objects

Поиск
Список
Период
Сортировка
От Nathan Bossart
Тема Re: [BUG?] macOS (Intel) build warnings: "ranlib: file … has no symbols" for aarch64 objects
Дата
Msg-id afC_haf7bXWHb6e9@nathan
обсуждение
Ответ на Re: [BUG?] macOS (Intel) build warnings: "ranlib: file … has no symbols" for aarch64 objects  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [BUG?] macOS (Intel) build warnings: "ranlib: file … has no symbols" for aarch64 objects
Список pgsql-hackers
On Tue, Apr 28, 2026 at 09:29:41AM -0400, Tom Lane wrote:
> 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...

I've been trying to avoid doing that, but it's a far simpler solution, and
in theory it should fix the problem for all platforms, too.  So, it's
probably the way to go.

-- 
nathan

Вложения

В списке pgsql-hackers по дате отправления: