public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: JonY <10walls@gmail.com>
To: Richard Biener <richard.guenther@gmail.com>
Cc: Gcc Patch List <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Cygwin/MinGW: Do not version lto plugins
Date: Thu, 10 Sep 2020 00:26:39 +0000	[thread overview]
Message-ID: <a852cce4-fc6a-3d27-e4d2-df7b8be559a5@gmail.com> (raw)
In-Reply-To: <4771abc3-6274-e582-c6b0-0c5166e44b17@gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1875 bytes --]

On 9/9/20 7:32 AM, JonY wrote:
> On 9/9/20 7:21 AM, Richard Biener wrote:
>> On Wed, Sep 9, 2020 at 2:28 AM JonY via Gcc-patches
>> <gcc-patches@gcc.gnu.org> wrote:
>>>
>>> Hello,
>>>
>>> The lto plugis are tied to the built GCC anyway, so there isn't much
>>> point to versioning them.
>>
>> In fact the lto plugins are not tied to the built GCCs very much, instead
>> we try to ensure compatibility so that a single plugin can be used with
>> multiple GCC versions.
>>
> 
> I see, I was not aware of this.
> 
>>> * gcc/config.host: Remove version string
>>> * lto-plugin/Makefile.am: Use libtool -avoid-version
>>> * lto-plugin/Makefile.in: Regenerate
>>>
>>> This patch has been in use with Cygwin gcc for a long time and should be
>>> pushed upstream. Patch OK?
>>
>> The libtool docs are not very specific here but does this affect the
>> result for Linux ELF platforms at all?
> 
> With current builds:
> 
> /usr/libexec/gcc/x86_64-pc-linux-gnu/9.2.0/liblto_plugin.la
> /usr/libexec/gcc/x86_64-pc-linux-gnu/9.2.0/liblto_plugin.so
> /usr/libexec/gcc/x86_64-pc-linux-gnu/9.2.0/liblto_plugin.so.0
> /usr/libexec/gcc/x86_64-pc-linux-gnu/9.2.0/liblto_plugin.so.0.0.0
> 
> With -avoid-version it will only generate liblto_plugin.so, from
> gcc/config.host, it is already what is loaded.
> 
> I will do a native linux build to confirm this.
> 

I did a bootstrap build of gcc on Linux and it produced the following
after installing:

libexec/gcc/x86_64-pc-linux-gnu/11.0.0/liblto_plugin.la
libexec/gcc/x86_64-pc-linux-gnu/11.0.0/liblto_plugin.so

I tested with the following command:

echo 'main(){}' | strace -f -o gcc.log -- ./inst/bin/gcc -xc - -v
-fuse-linker-plugin -o aa.out

I can confirm liblto is still loaded correctly from the logs, likewise
renaming it away will cause an error.

Seems to be fine on Linux.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2020-09-10  0:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-09  0:26 JonY
2020-09-09  7:21 ` Richard Biener
2020-09-09  7:32   ` JonY
2020-09-10  0:26     ` JonY [this message]
2020-09-10  9:44       ` Richard Biener
2020-09-10 11:57         ` JonY
2020-09-21 11:33           ` Martin Liška
2020-09-21 11:37             ` Richard Biener
2020-09-21 11:41               ` Martin Liška
2020-09-21 11:38             ` Martin Liška
2020-09-21 13:09               ` JonY
2020-09-21 13:23                 ` 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=a852cce4-fc6a-3d27-e4d2-df7b8be559a5@gmail.com \
    --to=10walls@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=richard.guenther@gmail.com \
    /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).