diff --git a/src/port/pg_cpu_x86.c b/src/port/pg_cpu_x86.c index 150b4a1d574..f22167da9af 100644 --- a/src/port/pg_cpu_x86.c +++ b/src/port/pg_cpu_x86.c @@ -263,5 +263,10 @@ x86_hypervisor_tsc_frequency_khz(void) return 0; } +#else /* defined(USE_SSE2) || defined(__i386__) */ -#endif /* defined(USE_SSE2) || defined(__i386__) */ +/* prevent linker complaints about empty module */ +extern int pg_cpu_x86_dummy_variable; +int pg_cpu_x86_dummy_variable = 0; + +#endif /* ! (USE_SSE2 || __i386__) */ diff --git a/src/port/pg_popcount_aarch64.c b/src/port/pg_popcount_aarch64.c index 3969a42523c..fc249bf8766 100644 --- a/src/port/pg_popcount_aarch64.c +++ b/src/port/pg_popcount_aarch64.c @@ -463,4 +463,10 @@ pg_popcount_masked_neon(const char *buf, int bytes, uint8 mask) return popcnt; } -#endif /* USE_NEON */ +#else /* USE_NEON */ + +/* prevent linker complaints about empty module */ +extern int pg_popcount_aarch64_dummy_variable; +int pg_popcount_aarch64_dummy_variable = 0; + +#endif /* ! USE_NEON */ diff --git a/src/port/pg_popcount_x86.c b/src/port/pg_popcount_x86.c index 91579e6b569..6df76c77c41 100644 --- a/src/port/pg_popcount_x86.c +++ b/src/port/pg_popcount_x86.c @@ -301,4 +301,10 @@ pg_popcount_masked_sse42(const char *buf, int bytes, uint8 mask) return popcnt; } -#endif /* HAVE_X86_64_POPCNTQ */ +#else /* HAVE_X86_64_POPCNTQ */ + +/* prevent linker complaints about empty module */ +extern int pg_popcount_x86_dummy_variable; +int pg_popcount_x86_dummy_variable = 0; + +#endif /* ! HAVE_X86_64_POPCNTQ */