From: Richard Biener <rguenther@suse.de>
To: Caroline Tice <cmtice@google.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
Eric Christopher <echristo@google.com>,
Luis Lozano <llozano@google.com>
Subject: Re: [PATCH] PR other/91396 Fix static link error with -fvtable-verify
Date: Tue, 13 Aug 2019 08:31:00 -0000 [thread overview]
Message-ID: <alpine.LSU.2.20.1908130957010.11741@zhemvz.fhfr.qr> (raw)
In-Reply-To: <CABtf2+S4Tuc=G__EC5-yyF6Drt-SFherjaanOuCYYv8SWv=09Q@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1876 bytes --]
On Mon, 12 Aug 2019, Caroline Tice wrote:
> Hi,
>
> This patch is to fix a bug where linking with -fvtable-verify and
> -static causes the linker to complain about multiple definitions of
> things in the vtv_end*.o files (once from the .o file and once from
> libvtv.a). (See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91396).
> The fix is for the GNU_USER_TARGET_ENDFILE_SPEC to only include the
> vtv_end*.o files if we're not doing static linking (and we are using
> -fvtable-verify flags).
>
> Tested this fix by verifying that the test case in the bug compiles
> both with and without -static, and that there were no new regressions
> in the libvtv testsuite. I'm in the process of doing a full bootstrap
> build with this change. Assuming the bootstrap passes, is this ok to
> commit?
OK.
Thanks,
Richard.
> Index: gcc/config/gnu-user.h
> ===================================================================
> --- gcc/config/gnu-user.h (revision 274317)
> +++ gcc/config/gnu-user.h (working copy)
> @@ -73,9 +73,9 @@
> GNU userspace "finalizer" file, `crtn.o'. */
>
> #define GNU_USER_TARGET_ENDFILE_SPEC \
> - "%{fvtable-verify=none:%s; \
> + "%{!static:%{fvtable-verify=none:%s; \
> fvtable-verify=preinit:vtv_end_preinit.o%s; \
> - fvtable-verify=std:vtv_end.o%s} \
> + fvtable-verify=std:vtv_end.o%s}} \
> %{static:crtend.o%s; \
> shared|static-pie|" PIE_SPEC ":crtendS.o%s; \
> :crtend.o%s} " \
>
> ChangeLog entry:
>
> 2019-08-12 Caroline Tice <cmtice@google.com>
>
> PR other/91396
> * config/gnu-user.h (GNU_USER_TARGET_ENDFILE_SPEC): Only add the
> vtv_end.o or vtv_end_preinit.o files if !static.
>
--
Richard Biener <rguenther@suse.de>
SUSE Linux GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany;
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah; HRB 21284 (AG Nürnberg)
prev parent reply other threads:[~2019-08-13 7:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-12 19:34 Caroline Tice via gcc-patches
2019-08-12 23:04 ` Caroline Tice via gcc-patches
2019-08-13 8:31 ` Richard Biener [this message]
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=alpine.LSU.2.20.1908130957010.11741@zhemvz.fhfr.qr \
--to=rguenther@suse.de \
--cc=cmtice@google.com \
--cc=echristo@google.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=llozano@google.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).