public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: "Martin Liška" <mliska@suse.cz>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>, Kito Cheng <kito.cheng@gmail.com>
Subject: Re: [PATCH] lto-plugin: Add path to libatomic for riscv64
Date: Tue, 5 Jul 2022 09:27:55 +0200	[thread overview]
Message-ID: <CAFiYyc0xV-go48mu_wTVyyw-k8519N+V2qNU_-W6=hJM+27P2g@mail.gmail.com> (raw)
In-Reply-To: <28312dee-4ef0-f72a-d59f-8d9d049dc937@suse.cz>

On Mon, Jul 4, 2022 at 3:09 PM Martin Liška <mliska@suse.cz> wrote:
>
> On 7/4/22 14:28, Richard Biener wrote:
> > ... but ... is libatomic properly built for the host?  libgo is a
> > target library.
>
> You're correct.
>
> Well, so the host library should be taken, which works for stage1 lto-plugin:
>
> [  668s] libtool: link: gcc -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_p
>
> while it fails in stage2:
>
> [ 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
>
> Where the system compiler takes the library from:
> /usr/lib/gcc/riscv64-linux-gnu/11/libatomic.so
>
> that points to system library location:
> ls -l /usr/lib/gcc/riscv64-linux-gnu/11/libatomic.so
> lrwxrwxrwx 1 root root 41 Mar 24 14:22 /usr/lib/gcc/riscv64-linux-gnu/11/libatomic.so -> ../../../riscv64-linux-gnu/libatomic.so.1
>
> So the question is how to fix that?

We'd need to add libatomic as host_module in Makefile.def and also
bootstrap that (since lto-plugin is bootstrapped), plus adding
the required dependency.  At least for the targets that need this.

Or give up and use better means of serialization or use a whitelist
for now (via lto-plugin configury) and leave
all not covered targets not thread-safe (see also the mingw bugreport).

Richard.

>
> Martin
>

  reply	other threads:[~2022-07-05  7:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-04 11:32 Martin Liška
2022-07-04 12:28 ` Richard Biener
2022-07-04 12:28   ` Richard Biener
2022-07-04 13:09     ` Martin Liška
2022-07-05  7:27       ` Richard Biener [this message]
2022-07-07 11:43         ` [PATCH] lto-plugin: use locking only for selected targets Martin Liška
2022-07-07 11:46           ` Richard Biener
2022-07-07 11:52             ` Rainer Orth
2022-07-07 13:18               ` Martin Liška
2022-07-07 13:18             ` Martin Liška

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFiYyc0xV-go48mu_wTVyyw-k8519N+V2qNU_-W6=hJM+27P2g@mail.gmail.com' \
    --to=richard.guenther@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=kito.cheng@gmail.com \
    --cc=mliska@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).