From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20980 invoked by alias); 10 Jun 2014 20:26:56 -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 20968 invoked by uid 89); 10 Jun 2014 20:26:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_00,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: mtaout26.012.net.il Received: from mtaout26.012.net.il (HELO mtaout26.012.net.il) (80.179.55.182) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 10 Jun 2014 20:26:52 +0000 Received: from conversion-daemon.mtaout26.012.net.il by mtaout26.012.net.il (HyperSendmail v2007.08) id <0N6Y00000ZAPIN00@mtaout26.012.net.il> for gdb-patches@sourceware.org; Tue, 10 Jun 2014 23:23:18 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout26.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N6Y00IUVZATY260@mtaout26.012.net.il>; Tue, 10 Jun 2014 23:23:17 +0300 (IDT) Date: Tue, 10 Jun 2014 20:26:00 -0000 From: Eli Zaretskii Subject: Re: Building the current snapshot on Windows with Guile In-reply-to: To: Doug Evans Cc: ludo@gnu.org, gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83vbs8zf1w.fsf@gnu.org> References: <83y4x614y6.fsf@gnu.org> X-IsSubscribed: yes X-SW-Source: 2014-06/txt/msg00431.txt.bz2 > Date: Tue, 10 Jun 2014 12:55:09 -0700 > From: Doug Evans > Cc: "gdb-patches@sourceware.org" > > On Mon, Jun 9, 2014 at 8:24 AM, Eli Zaretskii wrote: > > I succeeded in building a MinGW GDB with Guile. Here are some issues > > I uncovered while doing that: > > > > 1. configure doesn't find Guile because the test program fails. This > > happens because the configure script uses "pkg-config --libs" to > > find the linker switches required to link a program with libguile. > > But this is only sufficient for dynamic linking; for linking > > statically, one need to invoke "pkg-config --libs --static" > > instead. The result of not using --static is that not all of the > > prerequisite -lFOO switches are passed to the linker, and a static > > link fails. As luck would have it, my libguile is a static > > library. > > > > I hacked around this by manually editing gdb/configure to use > > --static, but I wonder what would be a proper solution. Always use > > --static and risk some extra linker switches? > > I guess we'll need a configure option for this. > Some may want a dynamically linked libguile. > [maybe we could add a hack to configure to see whether the --static > arg to pkg-config is necessary] We could, for example, try without --static, then with it, if the 1st attempt fails. > There's also the issue of whether to print the messages when loading > user scheme files. > If (*1) we suppressed these messages, we wouldn't want to do a blanket > suppression of user-loaded files. Why not? I think Python does that silently, doesn't it? > (*1): As Ludo suggested, we could compile these files during a gdb > build, but that doesn't work in a cross-compilation scenario (without > requiring more complexity in the build, which would be nice to avoid). > Are these files guaranteed to be equivalent across configurations (I'm > guessing not), and if not does guile provide a cross-compiler for them > (I'm guessing not - could be wrong of course)? There's some dependence on architecture, which I don't think I understand enough about (but Ludovic certainly does). > > --- gdb/top.c~0 2014-06-08 04:48:23 +0300 > > +++ gdb/top.c 2014-06-09 18:40:31 +0300 > > @@ -1188,6 +1188,15 @@ This GDB was configured as follows:\n\ > > --with-python=%s%s\n\ > > "), WITH_PYTHON_PATH, PYTHON_PATH_RELOCATABLE ? " (relocatable)" : ""); > > #endif > > +#if HAVE_GUILE > > + fprintf_filtered (stream, _("\ > > + --with-guile\n\ > > +")); > > +#else > > + fprintf_filtered (stream, _("\ > > + --without-guile\n\ > > +")); > > +#endif > > #ifdef RELOC_SRCDIR > > fprintf_filtered (stream, _("\ > > --with-relocated-sources=%s\n\ > > > > Is --without-python printed if python is not configured in? No, we just omit the --without-python. But --without-python has an argument, whereas --with-guile normally won't. Also, we display --without-FOO for other features, like --without-lzma. I don't think the minor difference wrt Python matters here, and it's not without a reason.