diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/interfaces/libpq/Makefile | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/interfaces/libpq/Makefile b/src/interfaces/libpq/Makefile index dcc693024f1..94c3c73e410 100644 --- a/src/interfaces/libpq/Makefile +++ b/src/interfaces/libpq/Makefile @@ -104,12 +104,20 @@ backend_src = $(top_srcdir)/src/backend # Check for functions that libpq must not call, currently just exit(). # (Ideally we'd reject abort() too, but there are various scenarios where -# build toolchains silently insert abort() calls, e.g. when profiling.) +# build toolchains insert abort() calls, e.g. to implement assert().) # If nm doesn't exist or doesn't work on shlibs, this test will do nothing, # which is fine. The exclusion of __cxa_atexit is necessary on OpenBSD, # which seems to insert references to that even in pure C code. +# Skip the test when profiling, as gcc may insert exit() calls for that. +# Also skip the test on platforms where libpq infrastructure may be provided +# by statically-linked libraries, as we can't expect them to honor this +# coding rule. libpq-refs-stamp: $(shlib) +ifneq ($(enable_coverage), yes) +ifeq (,$(filter aix solaris,$(PORTNAME))) ! nm -A -u $< 2>/dev/null | grep -v __cxa_atexit | grep exit +endif +endif touch $@ # Make dependencies on pg_config_paths.h visible in all builds. |