From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AB27A3857C48; Thu, 7 Jan 2021 13:32:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AB27A3857C48 From: "marxin at gcc dot 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: bootstrap X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: marxin at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2021 13:32:26 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98414 --- Comment #10 from Martin Li=C5=A1ka --- (In reply to Martin Li=C5=A1ka from comment #9) > (In reply to Jakub Jelinek from comment #8) > > I don't. LIBUBSAN_SPEC comes from gcc.c, while the libstdc++ stuff com= es > > 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 ano= ther > > -lstdc++ copy (but one honoring -static-libstdc++). >=20 > Hm, and what about something like that: >=20 > 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 @@ >=20=20 > STAGE2_CFLAGS +=3D -fsanitize=3Dundefined -DUBSAN_BOOTSTRAP > STAGE3_CFLAGS +=3D -fsanitize=3Dundefined -DUBSAN_BOOTSTRAP > -POSTSTAGE1_LDFLAGS +=3D -fsanitize=3Dundefined -static-libubsan > -DUBSAN_BOOTSTRAP \ > +POSTSTAGE1_LDFLAGS +=3D -fsanitize=3Dundefined -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=3D../../gcc/testsuite/selftests ./cc1./cc1plus: : /usr/lib64/libstdc++.so.6/usr/lib64/libstdc++.so.6: : ver= sion `GLIBCXX_3.4.29' not found (required by ./cc1)version `GLIBCXX_3.4.29' not found (required by ./cc1plus) leaving to Nathan.=