This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] gdbserver: fix the standalone build
- From: Pedro Alves <palves at redhat dot com>
- To: Mircea Gherzan <mircea dot gherzan at intel dot com>
- Cc: yao at codesourcery dot com, tromey at redhat dot com, gdb-patches at sourceware dot org
- Date: Thu, 27 Jun 2013 18:38:16 +0100
- Subject: Re: [PATCH] gdbserver: fix the standalone build
- References: <1372342963-31611-1-git-send-email-mircea dot gherzan at intel dot com> <51CC52FD dot 1040502 at redhat dot com> <51CC68B7 dot 9060007 at intel dot com>
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