diff options
author | Andres Freund <andres@anarazel.de> | 2022-12-06 18:55:28 -0800 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2022-12-06 18:55:28 -0800 |
commit | 9db49fc5bfdc0126be03f4b8986013e59d93b91d (patch) | |
tree | 9b3a2ee004e98feec42933a5174f9159ca862788 /configure.ac | |
parent | 8018ffbf5895ee16a1fd7117c4526b47ac42332e (diff) | |
download | postgresql-9db49fc5bfdc0126be03f4b8986013e59d93b91d.tar.gz |
autoconf: Move export_dynamic determination to configure
Previously export_dynamic was set in src/makefiles/Makefile.$port. For solaris
this required exporting with_gnu_ld. The determination of with_gnu_ld would be
nontrivial to copy for meson PGXS compatibility. It's also nice to delete
libtool.m4.
This uses -Wl,--export-dynamic on all platforms, previously all platforms but
FreeBSD used -Wl,-E. The likelihood of a name conflict seems lower with the
longer spelling.
Discussion: https://postgr.es/m/20221005200710.luvw5evhwf6clig6@awork3.anarazel.de
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 61e6da6eb3..0df13e5439 100644 --- a/configure.ac +++ b/configure.ac @@ -1131,8 +1131,6 @@ LDFLAGS="$LDFLAGS $LIBDIRS" AC_ARG_VAR(LDFLAGS_EX, [extra linker flags for linking executables only]) AC_ARG_VAR(LDFLAGS_SL, [extra linker flags for linking shared libraries only]) -PGAC_PROG_LD -AC_SUBST(with_gnu_ld) PGAC_CHECK_STRIP AC_CHECK_TOOL(AR, ar, ar) if test "$PORTNAME" = "win32"; then @@ -2372,6 +2370,12 @@ else PGAC_PROG_CC_LDFLAGS_OPT([-Wl,--as-needed], $link_test_func) fi +# For linkers that understand --export-dynamic, add that to the LDFLAGS_EX_BE +# (backend specific ldflags). One some platforms this will always fail (e.g., +# windows), but on others it depends on the choice of linker (e.g., solaris). +PGAC_PROG_CC_LD_VARFLAGS_OPT(LDFLAGS_EX_BE, [-Wl,--export-dynamic], $link_test_func) +AC_SUBST(LDFLAGS_EX_BE) + # Create compiler version string if test x"$GCC" = x"yes" ; then cc_string=`${CC} --version | sed q` |