mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
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
This commit is contained in:
@ -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`
|
||||
|
Reference in New Issue
Block a user