public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "marxin at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug bootstrap/98414] [11 Regression] UBSAN bootstrap is broken: ubsan/ubsan_type_hash_itanium.cpp:162: undefined reference to `__dynamic_cast' since r11-6083-gb7dfc2074c78415d451eb34d1608016c80b1c41a
Date: Thu, 07 Jan 2021 13:32:26 +0000	[thread overview]
Message-ID: <bug-98414-4-7VhsVBCSSz@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-98414-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #10 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Martin Liška from comment #9)
> (In reply to Jakub Jelinek from comment #8)
> > I don't.  LIBUBSAN_SPEC comes from gcc.c, while the libstdc++ stuff comes
> > from cp/g++spec.c and the ordering between the two is hard to achieve, plus
> > it is unclear if we shouldn't for -static-libubsan instead just add another
> > -lstdc++ copy (but one honoring -static-libstdc++).
> 
> Hm, and what about something like that:
> 
> diff --git a/config/bootstrap-ubsan.mk b/config/bootstrap-ubsan.mk
> index 1d85fe1c836..b2a474ae158 100644
> --- a/config/bootstrap-ubsan.mk
> +++ b/config/bootstrap-ubsan.mk
> @@ -2,7 +2,7 @@
>  
>  STAGE2_CFLAGS += -fsanitize=undefined -DUBSAN_BOOTSTRAP
>  STAGE3_CFLAGS += -fsanitize=undefined -DUBSAN_BOOTSTRAP
> -POSTSTAGE1_LDFLAGS += -fsanitize=undefined -static-libubsan
> -DUBSAN_BOOTSTRAP \
> +POSTSTAGE1_LDFLAGS += -fsanitize=undefined -static-libubsan -lstdc++
> -DUBSAN_BOOTSTRAP \
>  		      -B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/ \
>  		      -B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/ubsan/ \
>  		      -B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/ubsan/.libs

That's not going to work:

./xgcc -B./ -B/usr/local/x86_64-pc-linux-gnu/bin/ -isystem
/usr/local/x86_64-pc-linux-gnu/include -isystem
/usr/local/x86_64-pc-linux-gnu/sys-include
-L/home/mliska/Programming/gcc/objdir/gcc/../ld -xc++ -nostdinc /dev/null -S -o
/dev/null -fself-test=../../gcc/testsuite/selftests
./cc1./cc1plus: : /usr/lib64/libstdc++.so.6/usr/lib64/libstdc++.so.6: : version
`GLIBCXX_3.4.29' not found (required by ./cc1)version `GLIBCXX_3.4.29' not
found (required by ./cc1plus)

leaving to Nathan.

  parent reply	other threads:[~2021-01-07 13:32 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-21 15:22 [Bug bootstrap/98414] New: [11 Regression] UBSAN bootstrap is broken: ubsan/ubsan_type_hash_itanium.cpp:162: undefined reference to `__dynamic_cast' marxin at gcc dot gnu.org
2020-12-21 15:23 ` [Bug bootstrap/98414] " marxin at gcc dot gnu.org
2021-01-05  9:37 ` rguenth at gcc dot gnu.org
2021-01-05 10:37 ` marxin at gcc dot gnu.org
2021-01-05 12:40 ` [Bug bootstrap/98414] [11 Regression] UBSAN bootstrap is broken: ubsan/ubsan_type_hash_itanium.cpp:162: undefined reference to `__dynamic_cast' since r11-6083-gb7dfc2074c78415d451eb34d1608016c80b1c41a marxin at gcc dot gnu.org
2021-01-05 13:44 ` nathan at gcc dot gnu.org
2021-01-05 13:51 ` jakub at gcc dot gnu.org
2021-01-05 14:08 ` marxin at gcc dot gnu.org
2021-01-05 14:10 ` marxin at gcc dot gnu.org
2021-01-05 14:14 ` jakub at gcc dot gnu.org
2021-01-05 14:24 ` marxin at gcc dot gnu.org
2021-01-07 13:32 ` marxin at gcc dot gnu.org [this message]
2021-01-11  9:54 ` marxin at gcc dot gnu.org
2021-01-11  9:59 ` marxin at gcc dot gnu.org
2021-01-11 10:02 ` jakub at gcc dot gnu.org
2021-01-11 10:06 ` marxin at gcc dot gnu.org
2021-01-11 10:22 ` marxin at gcc dot gnu.org
2021-01-11 10:48 ` marxin at gcc dot gnu.org
2021-01-11 12:55 ` nathan at gcc dot gnu.org
2021-01-12 18:33 ` nathan at gcc dot gnu.org

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=bug-98414-4-7VhsVBCSSz@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).