From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6888 invoked by alias); 27 Jun 2013 17:38:27 -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 6874 invoked by uid 89); 27 Jun 2013 17:38:26 -0000 X-Spam-SWARE-Status: No, score=-8.1 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 27 Jun 2013 17:38:25 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r5RHcIPS008082 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 27 Jun 2013 13:38:19 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r5RHcHXQ026744; Thu, 27 Jun 2013 13:38:17 -0400 Message-ID: <51CC7888.1060301@redhat.com> Date: Thu, 27 Jun 2013 17:42:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6 MIME-Version: 1.0 To: Mircea Gherzan CC: yao@codesourcery.com, tromey@redhat.com, gdb-patches@sourceware.org Subject: Re: [PATCH] gdbserver: fix the standalone build References: <1372342963-31611-1-git-send-email-mircea.gherzan@intel.com> <51CC52FD.1040502@redhat.com> <51CC68B7.9060007@intel.com> In-Reply-To: <51CC68B7.9060007@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-SW-Source: 2013-06/txt/msg00831.txt.bz2 On 06/27/2013 05:30 PM, Mircea Gherzan wrote: > On 27.06.2013 16:58, Pedro Alves wrote: >> On 06/27/2013 03:22 PM, Mircea Gherzan wrote: >>> When direcltly 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. >> >> Wasn't this fixed by this patch? > > No, because in the standalone case both host_alias and target_alias are > empty. The patch below only handles an empty target_alias. Ah. "The variables ‘build_alias’, ‘host_alias’, and ‘target_alias’ are always exactly the arguments of --build, --host, and --target; in particular, they are left empty if the user did not use them, even if the corresponding AC_CANONICAL macro was run. > > -host_alias = @host_alias@ > +host_alias = @host@ > target_alias = @target_alias@ and "host" is the canonical form, gotcha. But instead of that, then, which I'd call a hack, we should instead do: host_alias = @host_alias@ target_alias = @target_alias@ +host = @host@ +target = @target@ 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 + $(host) $(target) version.c In GDB, GDBserver, and elsewhere necessary. -- Pedro Alves