summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2022-09-13 10:55:03 -0700
committerAndres Freund <andres@anarazel.de>2022-09-16 08:46:36 -0700
commitd08a049db9b47c32f3e7b6985a3105cae0da3681 (patch)
treefda266faf54898bdfd124d635db0e55e610bfa0f
parenteacbe94ab1f46d94a8532f9b9ac83ccd98cc1287 (diff)
downloadpostgresql-d08a049db9b47c32f3e7b6985a3105cae0da3681.tar.gz
aix: xlc: Use -Wl,-b,expfull for old compiler versions
Unfortunately xlc 12.1 and earlier don't support -qvisibility. Therefore be7c15b194a doesn't suffice to make extension libraries work without the explicit mkldexport step removed in fe6a64a58ab. While 12.1 is EOL, there is some desire to leave buildfarm animals using it run a bit longer. But instead of adding back the complicated mkldexport step, we can use -Wl,-b,expfull to force all symbols to be exported. Reviewed-By: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/2490844.1663123546@sss.pgh.pa.us
-rwxr-xr-xconfigure5
-rw-r--r--configure.ac5
2 files changed, 10 insertions, 0 deletions
diff --git a/configure b/configure
index f325bd85b8..67ddeb87c8 100755
--- a/configure
+++ b/configure
@@ -7101,6 +7101,11 @@ if test x"$pgac_cv_prog_CXX_cxxflags__qvisibility_hidden" = x"yes"; then
fi
have_visibility_attribute=$pgac_cv_prog_CC_cflags__qvisibility_hidden
+ # Old xlc versions (<13.1) don't have support for -qvisibility. Use expfull to force
+ # all extension module symbols to be exported.
+ if test "$pgac_cv_prog_CC_cflags__qvisibility_hidden" != "yes"; then
+ CFLAGS_SL_MODULE="$CFLAGS_SL_MODULE -Wl,-b,expfull"
+ fi
fi
if test "$have_visibility_attribute" = "yes"; then
diff --git a/configure.ac b/configure.ac
index 7792ae5bad..6b1b30d07a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -592,6 +592,11 @@ elif test "$PORTNAME" = "aix"; then
PGAC_PROG_CC_VAR_OPT(CFLAGS_SL_MODULE, [-qvisibility=hidden])
PGAC_PROG_VARCXX_VARFLAGS_OPT(CXX, CXXFLAGS_SL_MODULE, [-qvisibility=hidden])
have_visibility_attribute=$pgac_cv_prog_CC_cflags__qvisibility_hidden
+ # Old xlc versions (<13.1) don't have support for -qvisibility. Use expfull to force
+ # all extension module symbols to be exported.
+ if test "$pgac_cv_prog_CC_cflags__qvisibility_hidden" != "yes"; then
+ CFLAGS_SL_MODULE="$CFLAGS_SL_MODULE -Wl,-b,expfull"
+ fi
fi
if test "$have_visibility_attribute" = "yes"; then