[PATCH] gdbserver: fix the standalone build

Pedro Alves palves@redhat.com
Thu Jun 27 17:42:00 GMT 2013


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



More information about the Gdb-patches mailing list