public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/102426] New: [12 regression] Fix for PR 49664 breaks Solaris bootstrap with gld
@ 2021-09-21 12:40 ro at gcc dot gnu.org
  2021-09-21 12:40 ` [Bug lto/102426] " ro at gcc dot gnu.org
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: ro at gcc dot gnu.org @ 2021-09-21 12:40 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102426

            Bug ID: 102426
           Summary: [12 regression] Fix for PR 49664 breaks Solaris
                    bootstrap with gld
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ro at gcc dot gnu.org
                CC: marxin at gcc dot gnu.org, pinskia at gcc dot gnu.org
  Target Milestone: ---
              Host: *-*-solaris2.11

By rev 48b3caffcacc99adf72ba1be189a7d9ebc4190be, master bootstrap is broken on 
Solaris when configured to use GNU ld:

The failure occurs trying to link lto-plugin.so:

libtool: link:
           /var/gcc/regression/master/11.4-gcc-gas-gld/build/./prev-gcc/xgcc
-B/var/gcc/regression/master/11.4-gcc-gas-gld/build/./prev-gcc/
-B/vol/gcc/i386-pc-solaris2.11/bin/ -B/vol/gcc/i386-pc-solaris2.11/bin/
-B/vol/gcc/i386-pc-solaris2.11/lib/ -isystem
/vol/gcc/i386-pc-solaris2.11/include -isystem
/vol/gcc/i386-pc-solaris2.11/sys-include   -fno-checking -shared -Wl,-z
-Wl,text -Wl,-M -Wl,.libs/liblto_plugin.so.exp -Wl,-h -Wl,liblto_plugin.so -o
.libs/liblto_plugin.so  .libs/lto-plugin.o    -static-libgcc -static-libstdc++
-static-libgcc ../libiberty/pic/libiberty.a
/vol/gcc/bin/gld-2.37:.libs/liblto_plugin.so.exp: file format not recognized;
treating as linker script
/vol/gcc/bin/gld-2.37:.libs/liblto_plugin.so.exp:1: syntax error
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:466: liblto_plugin.la] Error 1

liblto_plugin.so.exp contains

{ global:
onload;
local: *; };

AFAICT, the issue is caused by libtool assuming that gcc on Solaris always
uses the native linker, which is wrong: I regularly test both ld and gld
configurations and this is also documented in install.texi.

The invocation above stems from libtool.m4 after l.5035:

    solaris*)
      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
      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'

The question is how to deal with this: libtool is unmaintained for 2 1/2 years
now.

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2022-03-22 10:06 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-21 12:40 [Bug lto/102426] New: [12 regression] Fix for PR 49664 breaks Solaris bootstrap with gld ro at gcc dot gnu.org
2021-09-21 12:40 ` [Bug lto/102426] " ro at gcc dot gnu.org
2021-09-21 15:30 ` pinskia at gcc dot gnu.org
2021-09-21 17:38 ` pinskia at gcc dot gnu.org
2021-09-21 20:14 ` ro at CeBiTec dot Uni-Bielefeld.DE
2021-09-22  6:57 ` rguenth at gcc dot gnu.org
2021-10-27  9:05 ` pinskia at gcc dot gnu.org
2021-11-17  8:36 ` hubicka at gcc dot gnu.org
2021-11-17  8:44 ` pinskia at gcc dot gnu.org
2022-03-17 14:21 ` jakub at gcc dot gnu.org
2022-03-17 19:11 ` ro at CeBiTec dot Uni-Bielefeld.DE
2022-03-17 19:21 ` jakub at gcc dot gnu.org
2022-03-17 20:14 ` ro at CeBiTec dot Uni-Bielefeld.DE
2022-03-21 14:05 ` jakub at gcc dot gnu.org
2022-03-22  9:15 ` ro at CeBiTec dot Uni-Bielefeld.DE
2022-03-22 10:04 ` cvs-commit at gcc dot gnu.org
2022-03-22 10:06 ` jakub at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).