From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20731 invoked by alias); 28 Jun 2013 12:00:16 -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 20717 invoked by uid 89); 28 Jun 2013 12:00:16 -0000 X-Spam-SWARE-Status: No, score=-5.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD autolearn=ham version=3.3.1 Received: from mga01.intel.com (HELO mga01.intel.com) (192.55.52.88) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 28 Jun 2013 12:00:15 +0000 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 28 Jun 2013 05:00:12 -0700 X-ExtLoop1: 1 Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga002.fm.intel.com with ESMTP; 28 Jun 2013 05:00:11 -0700 Received: from ulslx001.iul.intel.com (ulslx001.iul.intel.com [172.28.207.63]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id r5SC09mZ007771; Fri, 28 Jun 2013 13:00:11 +0100 Received: from ulslx001.iul.intel.com (localhost [127.0.0.1]) by ulslx001.iul.intel.com with ESMTP id r5SC09iA001038; Fri, 28 Jun 2013 14:00:09 +0200 Received: (from mgherza1@localhost) by ulslx001.iul.intel.com with id r5SC0827001033; Fri, 28 Jun 2013 14:00:08 +0200 From: Mircea Gherzan To: yao@codesourcery.com, tromey@redhat.com, palves@redhat.com Cc: gdb-patches@sourceware.org, Mircea Gherzan Subject: [PATCH v3] gdbserver: fix the standalone build Date: Fri, 28 Jun 2013 12:05:00 -0000 Message-Id: <1372420771-942-1-git-send-email-mircea.gherzan@intel.com> X-SW-Source: 2013-06/txt/msg00873.txt.bz2 When directly invoking gdb/gdbserver/configure && make, the build will fail because the $(host_alias) is empty and thus create-version.sh does not get enough parameters. The output of gdbserver --version without this patch (built like above): [...] This gdbserver was configured as "" After applying this patch: [...] This gdbserver was configured as "x86_64-unknown-linux-gnu" Ok to commit? 2013-06-28 Mircea Gherzan gdbserver: * configure.ac (version_host): Add it. (version_host): Add it. * configure: Rebuild. * Makefile.in (version_host): Add it. (version_target): Add it. (version.c): Use $(version_host) and $(version_target). Signed-off-by: Mircea Gherzan --- gdb/gdbserver/Makefile.in | 4 +++- gdb/gdbserver/configure | 10 ++++++++++ gdb/gdbserver/configure.ac | 8 ++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in index e5ecdd3..9053cf8 100644 --- a/gdb/gdbserver/Makefile.in +++ b/gdb/gdbserver/Makefile.in @@ -20,6 +20,8 @@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ target_alias = @target_alias@ +version_host = @version_host@ +version_target = @version_target@ program_transform_name = @program_transform_name@ bindir = @bindir@ libdir = @libdir@ @@ -391,7 +393,7 @@ force: version.c: Makefile $(srcdir)/../common/version.in $(srcdir)/../../bfd/version.h $(srcdir)/../common/create-version.sh $(SHELL) $(srcdir)/../common/create-version.sh $(srcdir)/.. \ - $(host_alias) $(target_alias) version.c + $(version_host) $(version_target) version.c xml-builtin.c: stamp-xml; @true stamp-xml: $(XML_DIR)/feature_to_c.sh Makefile $(XML_FILES) diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure index b87fedb..0588c94 100755 --- a/gdb/gdbserver/configure +++ b/gdb/gdbserver/configure @@ -589,6 +589,8 @@ ac_includes_default="\ #endif" ac_subst_vars='LTLIBOBJS +version_target +version_host GNULIB_STDINT_H extra_libraries IPA_DEPFILES @@ -5926,6 +5928,14 @@ if test x"$STDINT_H" != x; then fi +# For --version, we want to the print --host/--target exactly +# as passed to configure. But if those were not specified, then +# print the canonical host/target. +version_host=${host_alias:-$host} +version_target=${target_alias:-$target} + + + ac_config_files="$ac_config_files Makefile" ac_config_commands="$ac_config_commands default" diff --git a/gdb/gdbserver/configure.ac b/gdb/gdbserver/configure.ac index b9928d7..c983d41 100644 --- a/gdb/gdbserver/configure.ac +++ b/gdb/gdbserver/configure.ac @@ -471,6 +471,14 @@ if test x"$STDINT_H" != x; then fi AC_SUBST(GNULIB_STDINT_H) +# For --version, we want to the print --host/--target exactly +# as passed to configure. But if those were not specified, then +# print the canonical host/target. +version_host=${host_alias:-$host} +version_target=${target_alias:-$target} +AC_SUBST(version_host) +AC_SUBST(version_target) + AC_OUTPUT(Makefile, [case x$CONFIG_HEADERS in xconfig.h:config.in) -- 1.7.12.4