From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 49B2A3858D32 for ; Thu, 7 Jul 2022 08:20:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 49B2A3858D32 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 7A0841F9EA; Thu, 7 Jul 2022 08:20:54 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 5ECE113461; Thu, 7 Jul 2022 08:20:54 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id hu16FWaXxmKLcgAAMHmgww (envelope-from ); Thu, 07 Jul 2022 08:20:54 +0000 Message-ID: Date: Thu, 7 Jul 2022 10:20:54 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH][gdb/build] Handle deprecation of scm_install_gmp_memory_functions Content-Language: en-US To: Enze Li , gdb-patches@sourceware.org Cc: =?UTF-8?Q?Ludovic_Court=c3=a8s?= References: <20220707075809.GA16313@delia> From: Tom de Vries In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jul 2022 08:20:57 -0000 On 7/7/22 10:14, Enze Li wrote: > Hi Tom, > > Thanks for doing this. :) > Np :) > On Thu, 2022-07-07 at 09:58 +0200, Tom de Vries via Gdb-patches wrote: >> Hi, >> >> When building gdb with guile 3.0.8, we run into: >> ... >> gdb/guile/guile.c: In function \ >> 'void gdbscm_initialize(const extension_language_defn*)': >> > > <...> > >> >> Tested on x86_64-linux. >> >> Co-Authored-By: Tom de Vries > ^^^^^^^^^^^^^^ > This part confused me. Is it necessary to include such a line when the > author of the patch is the same person? > No, indeed it's not necessary in such a case. However, that is not the case here, because I'm not the (main) author: ... $ git show --pretty=fuller -s commit b47665709cabeb064cd57e1bf21b95d92c68be4e (HEAD -> fix -guile-build) Author: Ludovic Courtès AuthorDate: Thu Jul 7 08:20:28 2022 +0200 Commit: Tom de Vries CommitDate: Thu Jul 7 09:54:52 2022 +0200 [gdb/build] Handle deprecation of scm_install_gmp_memory_functions ... Thanks, - Tom > Thanks, > Enze > >> >> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28994 >> >> Any comments? >> >> Thanks, >> - Tom >> >> [gdb/build] Handle deprecation of scm_install_gmp_memory_functions >> >> --- >> gdb/guile/guile.c | 10 ++++++++++ >> 1 file changed, 10 insertions(+) >> >> diff --git a/gdb/guile/guile.c b/gdb/guile/guile.c >> index 14b191ded62..e5565b627d9 100644 >> --- a/gdb/guile/guile.c >> +++ b/gdb/guile/guile.c >> @@ -677,7 +677,17 @@ gdbscm_initialize (const struct >> extension_language_defn *extlang) >> "double free or corruption (out)" error. >> Work around the libguile bug by disabling the installation of >> the >> libgmp memory functions by guile initialization. */ >> + >> + /* The scm_install_gmp_memory_functions variable should be >> removed after >> + version 3.0, so limit usage to 3.0 and before. */ >> +#if SCM_MAJOR_VERSION < 3 || (SCM_MAJOR_VERSION == 3 && >> SCM_MINOR_VERSION == 0) >> + /* This variable is deprecated in Guile 3.0.8 and later but >> remains >> + available in the whole 3.0 series. */ >> +#pragma GCC diagnostic push >> +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" >> scm_install_gmp_memory_functions = 0; >> +#pragma GCC diagnostic pop >> +#endif >> >> /* scm_with_guile is the most portable way to initialize >> Guile. Plus >> we need to initialize the Guile support while in Guile mode >> (e.g., >