public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/106156] New: [13 Regression] libtool fails to link liblto_plugin.la on riscv64-linux-gnu
@ 2022-07-01  4:26 doko at gcc dot gnu.org
  2022-07-01  7:06 ` [Bug bootstrap/106156] " rguenth at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: doko at gcc dot gnu.org @ 2022-07-01  4:26 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 106156
           Summary: [13 Regression] libtool fails to link liblto_plugin.la
                    on riscv64-linux-gnu
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
          Assignee: unassigned at gcc dot gnu.org
          Reporter: doko at gcc dot gnu.org
  Target Milestone: ---

seen with trunk 20220630 on riscv64-linux-gnu, using binutils trunk/2.39. Not
seen in the same environment building GCC 11 and 12:

/bin/bash ./libtool --tag=CC --tag=disable-static  --mode=link
/<<PKGBUILDDIR>>/build/./prev-gcc
/xgcc -B/<<PKGBUILDDIR>>/build/./prev-gcc/
-B/usr/lib/gcc-snapshot/riscv64-linux-gnu/bin/ -B/usr
/lib/gcc-snapshot/riscv64-linux-gnu/bin/
-B/usr/lib/gcc-snapshot/riscv64-linux-gnu/lib/ -isystem
 /usr/lib/gcc-snapshot/riscv64-linux-gnu/include -isystem
/usr/lib/gcc-snapshot/riscv64-linux-gn
u/sys-include   -fno-checking -Wall  -g -O2 -fno-checking -gtoggle   -module
-avoid-version -bin
dir /usr/lib/gcc-snapshot/libexec/gcc/riscv64-linux-gnu/13
-export-symbols-regex onload    -Xcom
piler '-static-libstdc++' -Xcompiler '-static-libgcc' '-Wl,-z,relro' -o
liblto_plugin.la -rpath 
/usr/lib/gcc-snapshot/libexec/gcc/riscv64-linux-gnu/13 lto-plugin.lo 
-Wc,../libiberty/pic/libib
erty.a 
libtool: link: riscv64-linux-gnu-nm  .libs/lto-plugin.o   |  | /bin/sed 's/.*
//' | sort | uniq 
> .libs/liblto_plugin.exp
./libtool: eval: line 1118: syntax error near unexpected token `|'
./libtool: eval: line 1118: `riscv64-linux-gnu-nm  .libs/lto-plugin.o   |  |
/bin/sed 's/.* //' 
| sort | uniq > .libs/liblto_plugin.exp'
make[6]: *** [Makefile:471: liblto_plugin.la] Error 2
make[6]: Leaving directory '/<<PKGBUILDDIR>>/build/lto-plugin'
make[5]: *** [Makefile:382: all] Error 2
make[5]: Leaving directory '/<<PKGBUILDDIR>>/build/lto-plugin'
make[4]: *** [Makefile:15935: all-stage2-lto-plugin] Error 2

GCC is configured with

Configured with: -v
         --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++
         --prefix=/usr/lib/gcc-snapshot
         --with-gcc-major-version-only
         --program-prefix=
         --enable-shared
         --enable-linker-build-id
         --disable-nls
         --enable-clocale=gnu
         --enable-libstdcxx-debug
         --enable-libstdcxx-time=yes
         --with-default-libstdcxx-abi=new
         --enable-gnu-unique-object
         --disable-libitm
         --disable-libquadmath
         --disable-libquadmath-support
         --enable-plugin
         --with-system-zlib
         --enable-libphobos-checking=release
         --with-target-system-zlib=auto
         --enable-objc-gc=auto
         --enable-multiarch
         --disable-werror
         --disable-multilib
         --with-arch=rv64gc
         --with-abi=lp64d
         --enable-checking=yes
         --build=riscv64-linux-gnu
         --host=riscv64-linux-gnu
         --target=riscv64-linux-gnu

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

* [Bug bootstrap/106156] [13 Regression] libtool fails to link liblto_plugin.la on riscv64-linux-gnu
  2022-07-01  4:26 [Bug bootstrap/106156] New: [13 Regression] libtool fails to link liblto_plugin.la on riscv64-linux-gnu doko at gcc dot gnu.org
@ 2022-07-01  7:06 ` rguenth at gcc dot gnu.org
  2022-07-01  7:28 ` marxin at gcc dot gnu.org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-07-01  7:06 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marxin at gcc dot gnu.org
   Target Milestone|---                         |13.0

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
probably caused by the -pthread change

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

* [Bug bootstrap/106156] [13 Regression] libtool fails to link liblto_plugin.la on riscv64-linux-gnu
  2022-07-01  4:26 [Bug bootstrap/106156] New: [13 Regression] libtool fails to link liblto_plugin.la on riscv64-linux-gnu doko at gcc dot gnu.org
  2022-07-01  7:06 ` [Bug bootstrap/106156] " rguenth at gcc dot gnu.org
@ 2022-07-01  7:28 ` marxin at gcc dot gnu.org
  2022-07-04 10:24 ` marxin at gcc dot gnu.org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-07-01  7:28 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2022-07-01
           Assignee|unassigned at gcc dot gnu.org      |marxin at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Yep, I've also noticed that and hope it gets fixed with
g:51debf7f857dddfb4dd2493867d2648041e7d8de.

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

* [Bug bootstrap/106156] [13 Regression] libtool fails to link liblto_plugin.la on riscv64-linux-gnu
  2022-07-01  4:26 [Bug bootstrap/106156] New: [13 Regression] libtool fails to link liblto_plugin.la on riscv64-linux-gnu doko at gcc dot gnu.org
  2022-07-01  7:06 ` [Bug bootstrap/106156] " rguenth at gcc dot gnu.org
  2022-07-01  7:28 ` marxin at gcc dot gnu.org
@ 2022-07-04 10:24 ` marxin at gcc dot gnu.org
  2022-07-04 10:31 ` pinskia at gcc dot gnu.org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-07-04 10:24 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kito at gcc dot gnu.org,
                   |                            |wilson at gcc dot gnu.org

--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
All right, so now I see:

[ 7129s] libtool: link: 
/home/abuild/rpmbuild/BUILD/gcc-13.0.0+git194120/obj-riscv64-suse-linux/./prev-gcc/xgcc
-B/home/abuild/rpmbuild/BUILD/gcc-13.0.0+git194120/obj-riscv64-suse-linux/./prev-gcc/
-B/usr/riscv64-suse-linux/bin/ -B/usr/riscv64-suse-linux/bin/
-B/usr/riscv64-suse-linux/lib/ -isystem /usr/riscv64-suse-linux/include
-isystem /usr/riscv64-suse-linux/sys-include   -fno-checking -shared  -fPIC
-DPIC  .libs/lto-plugin.o    -pthread -static-libgcc
-Wl,--version-script=../../lto-plugin/lto-plugin.map -static-libstdc++
-static-libgcc ../libiberty/pic/libiberty.a   -pthread -Wl,-soname
-Wl,liblto_plugin.so -o .libs/liblto_plugin.so
[ 7129s] /usr/riscv64-suse-linux/bin/ld: cannot find -latomic: No such file or
directory
[ 7129s] collect2: error: ld returned 1 exit status
[ 7129s] make[4]: *** [Makefile:472: liblto_plugin.la] Error 1

which is strange because libatomic package is installed in the build root.

Can please riscv64 folks chime in?

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

* [Bug bootstrap/106156] [13 Regression] libtool fails to link liblto_plugin.la on riscv64-linux-gnu
  2022-07-01  4:26 [Bug bootstrap/106156] New: [13 Regression] libtool fails to link liblto_plugin.la on riscv64-linux-gnu doko at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2022-07-04 10:24 ` marxin at gcc dot gnu.org
@ 2022-07-04 10:31 ` pinskia at gcc dot gnu.org
  2022-07-04 11:03 ` marxin at gcc dot gnu.org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-07-04 10:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Oh yes, libatomic is needed to compile atomics for riscv. If we are stage2+
then libatomic target library needs to be in library search path and the lto
plugin needs to be dependent on libatomic in the top level makefile too.

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

* [Bug bootstrap/106156] [13 Regression] libtool fails to link liblto_plugin.la on riscv64-linux-gnu
  2022-07-01  4:26 [Bug bootstrap/106156] New: [13 Regression] libtool fails to link liblto_plugin.la on riscv64-linux-gnu doko at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2022-07-04 10:31 ` pinskia at gcc dot gnu.org
@ 2022-07-04 11:03 ` marxin at gcc dot gnu.org
  2022-07-04 11:32 ` marxin at gcc dot gnu.org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-07-04 11:03 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |palmer at gcc dot gnu.org

--- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> ---
You are correct:

gcc/config/riscv/linux.h

contains:

/* Because RISC-V only has word-sized atomics, it requries libatomic where
   others do not.  So link libatomic by default, as needed.  */
#undef LIB_SPEC
#ifdef LD_AS_NEEDED_OPTION
#define LIB_SPEC GNU_USER_TARGET_LIB_SPEC \
  " %{pthread:" LD_AS_NEEDED_OPTION " -latomic " LD_NO_AS_NEEDED_OPTION "}"
#else
#define LIB_SPEC GNU_USER_TARGET_LIB_SPEC " -latomic "
#endif

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

* [Bug bootstrap/106156] [13 Regression] libtool fails to link liblto_plugin.la on riscv64-linux-gnu
  2022-07-01  4:26 [Bug bootstrap/106156] New: [13 Regression] libtool fails to link liblto_plugin.la on riscv64-linux-gnu doko at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2022-07-04 11:03 ` marxin at gcc dot gnu.org
@ 2022-07-04 11:32 ` marxin at gcc dot gnu.org
  2022-07-08 11:21 ` marxin at gcc dot gnu.org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-07-04 11:32 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch

--- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> ---
Patch candidate:
https://gcc.gnu.org/pipermail/gcc-patches/2022-July/597759.html

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

* [Bug bootstrap/106156] [13 Regression] libtool fails to link liblto_plugin.la on riscv64-linux-gnu
  2022-07-01  4:26 [Bug bootstrap/106156] New: [13 Regression] libtool fails to link liblto_plugin.la on riscv64-linux-gnu doko at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2022-07-04 11:32 ` marxin at gcc dot gnu.org
@ 2022-07-08 11:21 ` marxin at gcc dot gnu.org
  2022-07-13  7:35 ` doko at gcc dot gnu.org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-07-08 11:21 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #7 from Martin Liška <marxin at gcc dot gnu.org> ---
Should be fixed now as well.

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

* [Bug bootstrap/106156] [13 Regression] libtool fails to link liblto_plugin.la on riscv64-linux-gnu
  2022-07-01  4:26 [Bug bootstrap/106156] New: [13 Regression] libtool fails to link liblto_plugin.la on riscv64-linux-gnu doko at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2022-07-08 11:21 ` marxin at gcc dot gnu.org
@ 2022-07-13  7:35 ` doko at gcc dot gnu.org
  2022-07-13  7:40 ` marxin at gcc dot gnu.org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: doko at gcc dot gnu.org @ 2022-07-13  7:35 UTC (permalink / raw)
  To: gcc-bugs

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

Matthias Klose <doko at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|FIXED                       |---
             Status|RESOLVED                    |NEW

--- Comment #8 from Matthias Klose <doko at gcc dot gnu.org> ---
I still see this failing with trunk 20220711,
complete build log at
https://buildd.debian.org/status/fetch.php?pkg=gcc-snapshot&arch=riscv64&ver=1%3A20220711-1&stamp=1657550111&raw=1

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

* [Bug bootstrap/106156] [13 Regression] libtool fails to link liblto_plugin.la on riscv64-linux-gnu
  2022-07-01  4:26 [Bug bootstrap/106156] New: [13 Regression] libtool fails to link liblto_plugin.la on riscv64-linux-gnu doko at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2022-07-13  7:35 ` doko at gcc dot gnu.org
@ 2022-07-13  7:40 ` marxin at gcc dot gnu.org
  2022-07-14 11:27 ` cvs-commit at gcc dot gnu.org
  2022-07-14 11:28 ` marxin at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-07-13  7:40 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

--- Comment #9 from Martin Liška <marxin at gcc dot gnu.org> ---
Sorry for the breakage, I've got a patch candidate.

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

* [Bug bootstrap/106156] [13 Regression] libtool fails to link liblto_plugin.la on riscv64-linux-gnu
  2022-07-01  4:26 [Bug bootstrap/106156] New: [13 Regression] libtool fails to link liblto_plugin.la on riscv64-linux-gnu doko at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2022-07-13  7:40 ` marxin at gcc dot gnu.org
@ 2022-07-14 11:27 ` cvs-commit at gcc dot gnu.org
  2022-07-14 11:28 ` marxin at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-07-14 11:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Liska <marxin@gcc.gnu.org>:

https://gcc.gnu.org/g:29f40a8047fa9b6ccde2174ca126b78a535e1a61

commit r13-1696-g29f40a8047fa9b6ccde2174ca126b78a535e1a61
Author: Martin Liska <mliska@suse.cz>
Date:   Thu Jul 14 09:51:33 2022 +0200

    lto-plugin: use -pthread only for detected targets

    Use -pthread only if we are going to use pthread functionality.

            PR bootstrap/106156

    lto-plugin/ChangeLog:

            * Makefile.am: Use ac_lto_plugin_extra_ldflags for AM_LDFLAGS.
            * configure.ac: Use AC_SUBST(ac_lto_plugin_extra_ldflags).
            * Makefile.in: Regenerate.
            * configure: Regenerate.

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

* [Bug bootstrap/106156] [13 Regression] libtool fails to link liblto_plugin.la on riscv64-linux-gnu
  2022-07-01  4:26 [Bug bootstrap/106156] New: [13 Regression] libtool fails to link liblto_plugin.la on riscv64-linux-gnu doko at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2022-07-14 11:27 ` cvs-commit at gcc dot gnu.org
@ 2022-07-14 11:28 ` marxin at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-07-14 11:28 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #11 from Martin Liška <marxin at gcc dot gnu.org> ---
Should be fixed now.

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

end of thread, other threads:[~2022-07-14 11:28 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-01  4:26 [Bug bootstrap/106156] New: [13 Regression] libtool fails to link liblto_plugin.la on riscv64-linux-gnu doko at gcc dot gnu.org
2022-07-01  7:06 ` [Bug bootstrap/106156] " rguenth at gcc dot gnu.org
2022-07-01  7:28 ` marxin at gcc dot gnu.org
2022-07-04 10:24 ` marxin at gcc dot gnu.org
2022-07-04 10:31 ` pinskia at gcc dot gnu.org
2022-07-04 11:03 ` marxin at gcc dot gnu.org
2022-07-04 11:32 ` marxin at gcc dot gnu.org
2022-07-08 11:21 ` marxin at gcc dot gnu.org
2022-07-13  7:35 ` doko at gcc dot gnu.org
2022-07-13  7:40 ` marxin at gcc dot gnu.org
2022-07-14 11:27 ` cvs-commit at gcc dot gnu.org
2022-07-14 11:28 ` marxin 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).