From ea9c2009115d7e00732f5ad316c10a171fc66a53 Mon Sep 17 00:00:00 2001 From: Nick Alcock Date: Mon, 27 Sep 2021 20:31:21 +0100 Subject: libctf: try several possibilities for linker versioning flags Checking for linker versioning by just grepping ld --help output for mentions of --version-script is inadequate now that Solaris 11.4 implements a --version-script with different semantics. Try linking a test program with a small wildcard-using version script with each supported set of flags in turn, to make sure that linker versioning is not only advertised but actually works. The Solaris "GNU-compatible" linker versioning is not quite GNU-compatible enough, but we can work around the differences by generating a new version script that removes the comments from the original (Solaris ld requires #-style comments), and making another version script for libctf-nonbfd in particular which doesn't mention any of the symbols that appear in libctf.la, to avoid Solaris ld introducing corresponding new NOTYPE symbols to match the version script. libctf/ChangeLog 2021-09-27 Nick Alcock PR libctf/27967 * configure.ac (VERSION_FLAGS): Replace with... (ac_cv_libctf_version_script): ... this multiple test. (VERSION_FLAGS_NOBFD): Substitute this too. * Makefile.am (libctf_nobfd_la_LDFLAGS): Use it. Split out... (libctf_ldflags_nover): ... non-versioning flags here. (libctf_la_LDFLAGS): Use it. * libctf.ver: Give every symbol not in libctf-nobfd a comment on the same line noting as much. --- libctf/ChangeLog | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'libctf/ChangeLog') diff --git a/libctf/ChangeLog b/libctf/ChangeLog index da361e4..03d8506 100644 --- a/libctf/ChangeLog +++ b/libctf/ChangeLog @@ -1,5 +1,17 @@ 2021-09-27 Nick Alcock + PR libctf/27967 + * configure.ac (VERSION_FLAGS): Replace with... + (ac_cv_libctf_version_script): ... this multiple test. + (VERSION_FLAGS_NOBFD): Substitute this too. + * Makefile.am (libctf_nobfd_la_LDFLAGS): Use it. Split out... + (libctf_ldflags_nover): ... non-versioning flags here. + (libctf_la_LDFLAGS): Use it. + * libctf.ver: Give every symbol not in libctf-nobfd a comment on + the same line noting as much. + +2021-09-27 Nick Alcock + PR libctf/27360 * Makefile.am (libctf_la_LIBADD): Link against libiberty before pulling in libbfd.la or pulling in libctf-nobfd.la. -- cgit v1.1