From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 66276 invoked by alias); 18 Mar 2019 04:02:31 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 66248 invoked by uid 89); 18 Mar 2019 04:02:30 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-13.6 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS,TRACKER_ID autolearn=ham version=3.3.1 spammy=uppercase, HX-Languages-Length:1754, FWIW X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 18 Mar 2019 04:02:28 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 757B513A5C; Mon, 18 Mar 2019 04:02:27 +0000 (UTC) Received: from localhost (unused-10-15-17-196.yyz.redhat.com [10.15.17.196]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4C38B17B0B; Mon, 18 Mar 2019 04:02:27 +0000 (UTC) From: Sergio Durigan Junior To: Sergei Trofimovich Cc: gdb-patches@sourceware.org, Tom Tromey Subject: Re: [PATCH v2] gdb: unconditionally define _initialize_string_view_selftests References: <20190317222004.0afa508d@sf> <20190317222731.11704-1-slyfox@gentoo.org> Date: Mon, 18 Mar 2019 04:02:00 -0000 In-Reply-To: <20190317222731.11704-1-slyfox@gentoo.org> (Sergei Trofimovich's message of "Sun, 17 Mar 2019 22:27:31 +0000") Message-ID: <87r2b4q17x.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2019-03/txt/msg00365.txt.bz2 On Sunday, March 17 2019, Sergei Trofimovich wrote: > From: Sergei Trofimovich > > The build failure was noticed by Helmut Jarausch in > https://bugs.gentoo.org/680232: > $ ./configure CXXFLAGS='-std=c++17 -Os' > ... > CXXLD gdb > ld: init.o: in function `initialize_all_files()': > init.c:(.text+0x113): undefined reference to `_initialize_string_view_selftests()' > > It happens because '_initialize_string_view_selftests()' is > conditionally defined based on C++ default. > > The change defines '_initialize_string_view_selftests()' > unconditionally and leaves implementation a no-op on c++17 > compilers. > --- > gdb/ChangeLog | 6 ++++++ > gdb/unittests/string_view-selftests.c | 6 ++++-- > 2 files changed, 10 insertions(+), 2 deletions(-) > > diff --git a/gdb/ChangeLog b/gdb/ChangeLog > index 862c89e821..7684d9be60 100644 > --- a/gdb/ChangeLog > +++ b/gdb/ChangeLog > @@ -1,3 +1,9 @@ > +2019-03-17 Sergei Trofimovich > + > + * unittests/string_view-selftests.c: define Uppercase "D" on "Define". > + _initialize_string_view_selftests unconditionally. This > + fixes build failure on CXXFLAGS="-std=c++17" setup. FWIW, a ChangeLog entry should mention *what* changed, not *why*. So something like: 2019-03-17 Sergei Trofimovich * unittests/string_view-selftests.c: Define _initialize_string_view_selftests unconditionally. is fine. Since Tom has already approved the patch, I went ahead and checked it in: 58785d9888c699770154ef1d42fcea7598e8d704 Thanks, -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible http://sergiodj.net/