From patchwork Wed Sep 10 04:22:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Evans X-Patchwork-Id: 2720 Received: (qmail 11759 invoked by alias); 10 Sep 2014 04:23:17 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 11749 invoked by uid 89); 10 Sep 2014 04:23:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f52.google.com Received: from mail-pa0-f52.google.com (HELO mail-pa0-f52.google.com) (209.85.220.52) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 10 Sep 2014 04:23:11 +0000 Received: by mail-pa0-f52.google.com with SMTP id kq14so3785817pab.25 for ; Tue, 09 Sep 2014 21:23:09 -0700 (PDT) X-Received: by 10.66.160.233 with SMTP id xn9mr12032941pab.29.1410322989345; Tue, 09 Sep 2014 21:23:09 -0700 (PDT) Received: from seba.sebabeach.org.gmail.com (173-13-178-50-sfba.hfc.comcastbusiness.net. [173.13.178.50]) by mx.google.com with ESMTPSA id to4sm13018917pbc.39.2014.09.09.21.23.08 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Sep 2014 21:23:08 -0700 (PDT) From: Doug Evans To: gdb-patches@sourceware.org Subject: [PATCH][COMMITTED] Fix pr 17367 Date: Tue, 09 Sep 2014 21:22:27 -0700 Message-ID: MIME-Version: 1.0 X-IsSubscribed: yes Hi. This patch fixes PR 17367. https://sourceware.org/bugzilla/show_bug.cgi?id=17367 Guile 2.2 now compiles to ELF files, and I was noticing gdb complaining when starting up. Exception caught while booting Guile. Error in function "load-thunk-from-memory": not an ELF file ./gdb: warning: Could not complete Guile gdb module initialization from: /hack/gnu/sourceware/gdb-guile/b-sigchld-prep-git-guile-gc74/gdb/data-directory/guile/gdb/boot.scm. I traced this to the wrong guild program being used. guild should come from the specified guile distribution, but /bin/guild was being used instead (which is guile 2.0). Regression tested on amd64-linux with guile 2.0.11 and guile trunk. 2014-09-09 Doug Evans PR guile/17367 * acinclude.m4 (GDB_GUILE_PROGRAM_NAMES): Pass guile version as last parameter to pkg-config, not first. * configure.ac: Pass --with-guile provided pkg-config path to GDB_GUILE_PROGRAM_NAMES. * configure: Regenerate. diff --git a/gdb/acinclude.m4 b/gdb/acinclude.m4 index 2b46f73..3ff5155 100644 --- a/gdb/acinclude.m4 +++ b/gdb/acinclude.m4 @@ -478,14 +478,14 @@ dnl similar to Guile's 'GUILE_PROGS' macro.) AC_DEFUN([GDB_GUILE_PROGRAM_NAMES], [ AC_CACHE_CHECK([for the absolute file name of the 'guild' command], [ac_cv_guild_program_name], - [ac_cv_guild_program_name="`$1 $2 --variable guild`" + [ac_cv_guild_program_name="`$1 --variable guild $2`" # In Guile up to 2.0.11 included, guile-2.0.pc would not define # the 'guild' and 'bindir' variables. In that case, try to guess # what the program name is, at the risk of getting it wrong if # Guile was configured with '--program-suffix' or similar. if test "x$ac_cv_guild_program_name" = "x"; then - guile_exec_prefix="`$1 $2 --variable exec_prefix`" + guile_exec_prefix="`$1 --variable exec_prefix $2`" ac_cv_guild_program_name="$guile_exec_prefix/bin/guild" fi ]) diff --git a/gdb/configure.ac b/gdb/configure.ac index ab7b1c2..4f5fb7b 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -1143,8 +1143,9 @@ dnl It could be a shell script. It is invoked as: dnl pkg-config --exists $version dnl pkg-config --cflags $version dnl pkg-config --libs $version -dnl $version will be the default guile version (currently guile-2.0), -dnl but the program is free to ignore this. +dnl pkg-config --variable guild $version +dnl The script will be called with $version having each value in +dnl $try_guile_versions until --exists indicates success. AC_ARG_WITH(guile, AS_HELP_STRING([--with-guile@<:@=GUILE@:>@], [include guile support (auto/yes/no//)]), @@ -1196,7 +1197,14 @@ esac if test "${have_libguile}" != no; then dnl Get the name of the 'guild' program. - GDB_GUILE_PROGRAM_NAMES(["${pkg_config_prog_path}"], ["${guile_version}"]) + case "${with_guile}" in + [[\\/]]* | ?:[[\\/]]*) + GDB_GUILE_PROGRAM_NAMES(["${with_guile}"], ["${guile_version}"]) + ;; + *) + GDB_GUILE_PROGRAM_NAMES(["${pkg_config_prog_path}"], ["${guile_version}"]) + ;; + esac dnl Make sure guild can handle this host. GDB_TRY_GUILD([$srcdir/guile/lib/gdb/support.scm])