Bug 2066785

Summary: libtool -export-symbols-regex broken on Solaris against GNU ld
Product: [Fedora] Fedora Reporter: Jakub Jelinek <jakub>
Component: libtoolAssignee: Frédéric Bérat <fberat>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: fberat, fjanus, fweimer, ivazqueznet, jakub, karsten, kasal, mkulik, odubaj, panovotn, praiskup, rhbugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-04-08 08:03:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jakub Jelinek 2022-03-22 13:36:32 UTC
As mentioned in https://gcc.gnu.org/PR102426 , libtool -export-symbols-regex implementation on *-solaris* blindly assumes that Sun ld is used and uses -Wl,-M
option:
      if test "$GCC" = yes; then
        wlarc='${wl}'
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
          $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
      else
in libtool.m4.
But when GCC is configured to use GNU ld, that is wrong, for the
if test "$with_gnu_ld" = yes case it needs to use (if supports_anon_versioning)
-Wl,-version-script like e.g. on Linux.

Comment 1 Frédéric Bérat 2022-04-08 08:03:24 UTC
I forwarded this bug to the mailing list.
I looked at the different options for libtool, and it seems that bug-libtool is the one to be used (and the more likely to be checked by the new maintainer).

Although, I directly asked the community to get a bit of clarification and clean-up, as there seem to be at least 3 ways to submit bugs.

Thus:

https://lists.gnu.org/archive/html/bug-libtool/2022-04/msg00001.html


Note: Closing WONTFIX as this is not a Fedora bug, and it was only created for me to not forget to follow-up.