aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/configure.ac
diff options
context:
space:
mode:
authorMircea Gherzan <mgherzan@sourceware.org>2013-06-28 12:29:15 +0000
committerMircea Gherzan <mgherzan@sourceware.org>2013-06-28 12:29:15 +0000
commit257b6bec774c0b9ec2c52494fc4898f472fcdbb8 (patch)
tree19881a927174538766ec624f9332c8df705cda1a /gdb/gdbserver/configure.ac
parentc3b6407fbe23dd386b8aee88a45fb3dd718fe2ea (diff)
downloadgdb-257b6bec774c0b9ec2c52494fc4898f472fcdbb8.zip
gdb-257b6bec774c0b9ec2c52494fc4898f472fcdbb8.tar.gz
gdb-257b6bec774c0b9ec2c52494fc4898f472fcdbb8.tar.bz2
gdbserver: fix the standalone build
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" 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com> gdbserver: * configure.ac (version_host, version_target): Set and AC_SUBST them. * configure: Rebuild. * Makefile.in (version_host, version_target): Get from configure. (version.c): Use $(version_host) and $(version_target). Change-Id: Id48240532ad3d624ec78867a6db5ebd4c09583ff Signed-off-by: Mircea Gherzan <mircea.gherzan@intel.com>
Diffstat (limited to 'gdb/gdbserver/configure.ac')
-rw-r--r--gdb/gdbserver/configure.ac8
1 files changed, 8 insertions, 0 deletions
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)