This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] gdbserver: Add qnx target
- From: Aleksandar Ristovski <aristovski at qnx dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Wed, 17 Jun 2009 14:50:02 -0400
- Subject: Re: [patch] gdbserver: Add qnx target
- References: <h1b0mg$2j8$1@ger.gmane.org>
Aleksandar Ristovski wrote:
The patch is quite straight-forward. The only more invasive change is
the change to configure.ac and Makefile.in.
This is why I am attaching two patches and two change logs.
1) gdbserver-extra_srv_libs - ChangeLog
(Note: this patch is not complete, I could not regenerate configure
since I do not have autoconf version 2.59, I would appreciate if someone
could generate if for me).
* Makefile.in (gdbreplay): Add $(GDBSERVER_LIBS) to linking step.
* configure.ac (GDBSERVER_LIBS): Add $extra_srv_libs.
Correcting the patch for supporting target specific
libraries in configure/Makefile.
configure script generated using autoconf-2.59-r7
ChangeLog:
* configure.ac (GDBSERVER_LIBS): Add $extra_srv_libs.
* configure: Regenerated using autoconfg 2.59-r7.
* Makefile.in (gdbreplay): Add $(GDBSERVER_EXTRA_LIBS) to
linking step
for both gdbserver and gdbreplay.
Index: configure.ac
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/configure.ac,v
retrieving revision 1.25
diff -u -p -r1.25 configure.ac
--- configure.ac 22 Mar 2009 23:57:10 -0000 1.25
+++ configure.ac 17 Jun 2009 18:41:09 -0000
@@ -183,9 +183,12 @@ fi
GDBSERVER_DEPFILES="$srv_regobj $srv_tgtobj $srv_hostio_err_objs $srv_thread_depfiles"
GDBSERVER_LIBS="$srv_libs"
+# Target specific libraries common for both gdbserver and gdbreplay
+GDBSERVER_EXTRA_LIBS="$extra_srv_libs"
AC_SUBST(GDBSERVER_DEPFILES)
AC_SUBST(GDBSERVER_LIBS)
+AC_SUBST(GDBSERVER_EXTRA_LIBS)
AC_SUBST(USE_THREAD_DB)
AC_SUBST(srv_xmlbuiltin)
AC_SUBST(srv_xmlfiles)
Index: configure
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/configure,v
retrieving revision 1.38
diff -u -p -r1.38 configure
--- configure 22 Mar 2009 23:57:10 -0000 1.38
+++ configure 17 Jun 2009 18:41:10 -0000
@@ -310,7 +310,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CPP EGREP LIBOBJS PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI RDYNAMIC GDBSERVER_DEPFILES GDBSERVER_LIBS USE_THREAD_DB srv_xmlbuiltin srv_xmlfiles LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CPP EGREP LIBOBJS PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI RDYNAMIC GDBSERVER_DEPFILES GDBSERVER_LIBS GDBSERVER_EXTRA_LIBS USE_THREAD_DB srv_xmlbuiltin srv_xmlfiles LTLIBOBJS'
ac_subst_files=''
ac_pwd=`pwd`
@@ -721,13 +721,13 @@ echo X"$0" |
/^X\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
+ if test ! -r "$srcdir/$ac_unique_file"; then
srcdir=..
fi
else
ac_srcdir_defaulted=no
fi
-if test ! -r $srcdir/$ac_unique_file; then
+if test ! -r "$srcdir/$ac_unique_file"; then
if test "$ac_srcdir_defaulted" = yes; then
{ echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
{ (exit 1); exit 1; }; }
@@ -736,7 +736,7 @@ if test ! -r $srcdir/$ac_unique_file; th
{ (exit 1); exit 1; }; }
fi
fi
-(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+(cd $srcdir && test -r "./$ac_unique_file") 2>/dev/null ||
{ echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
{ (exit 1); exit 1; }; }
srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
@@ -4579,6 +4579,9 @@ fi
GDBSERVER_DEPFILES="$srv_regobj $srv_tgtobj $srv_hostio_err_objs $srv_thread_depfiles"
GDBSERVER_LIBS="$srv_libs"
+# Target specific libraries common for both gdbserver and gdbreplay
+GDBSERVER_EXTRA_LIBS="$extra_srv_libs"
+
@@ -5235,6 +5238,7 @@ s,@REPORT_BUGS_TEXI@,$REPORT_BUGS_TEXI,;
s,@RDYNAMIC@,$RDYNAMIC,;t t
s,@GDBSERVER_DEPFILES@,$GDBSERVER_DEPFILES,;t t
s,@GDBSERVER_LIBS@,$GDBSERVER_LIBS,;t t
+s,@GDBSERVER_EXTRA_LIBS@,$GDBSERVER_EXTRA_LIBS,;t t
s,@USE_THREAD_DB@,$USE_THREAD_DB,;t t
s,@srv_xmlbuiltin@,$srv_xmlbuiltin,;t t
s,@srv_xmlfiles@,$srv_xmlfiles,;t t
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/Makefile.in,v
retrieving revision 1.74
diff -u -p -r1.74 Makefile.in
--- Makefile.in 12 May 2009 22:25:00 -0000 1.74
+++ Makefile.in 17 Jun 2009 18:41:10 -0000
@@ -131,6 +131,7 @@ OBS = inferiors.o regcache.o remote-util
$(DEPFILES) $(LIBOBJS)
GDBREPLAY_OBS = gdbreplay.o version.o
GDBSERVER_LIBS = @GDBSERVER_LIBS@
+GDBSERVER_EXTRA_LIBS = @GDBSERVER_EXTRA_LIBS@
XM_CLIBS = @LIBS@
# XML files to compile in to gdbserver, if any.
@@ -176,12 +177,12 @@ clean-info:
gdbserver$(EXEEXT): $(OBS) ${ADD_DEPS} ${CDEPS}
rm -f gdbserver$(EXEEXT)
${CC-LD} $(INTERNAL_CFLAGS) $(INTERNAL_LDFLAGS) -o gdbserver$(EXEEXT) $(OBS) \
- $(GDBSERVER_LIBS) $(XM_CLIBS)
+ $(GDBSERVER_LIBS) $(GDBSERVER_EXTRA_LIBS) $(XM_CLIBS)
gdbreplay$(EXEEXT): $(GDBREPLAY_OBS)
rm -f gdbreplay$(EXEEXT)
${CC-LD} $(INTERNAL_CFLAGS) $(INTERNAL_LDFLAGS) -o gdbreplay$(EXEEXT) $(GDBREPLAY_OBS) \
- $(XM_CLIBS)
+ $(GDBSERVER_EXTRA_LIBS) $(XM_CLIBS)
# Put the proper machine-specific files first, so M-. on a machine
# specific routine gets the one for the correct machine.