This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
cross-target gdb compilation problems
- From: Michal Ludvig <mludvig at suse dot cz>
- To: gdb <gdb at sources dot redhat dot com>
- Date: Mon, 01 Jul 2002 18:17:38 +0200
- Subject: cross-target gdb compilation problems
- Organization: SuSE CR
Hi all,
I'm trying to fix cross-target gdb compilation for x86-64 target
(testing on i386 host). The problem is, that it always fails with:
libgdb.a(solib.o): In function `clear_solib':
/ttt/64/gdb/gdb/solib.c:742: undefined reference to
`disable_breakpoints_in_shlibs'
libgdb.a(solib-svr4.o): In function `enable_break':
/ttt/64/gdb/gdb/solib-svr4.c:856: undefined reference to
`remove_solib_event_breakpoints'
/ttt/64/gdb/gdb/solib-svr4.c:983: undefined reference to
`create_solib_event_breakpoint'
collect2: ld returned 1 exit status
make: *** [gdb] Error 1
while linking gdb binary.
I realised, that many other targets define #include "solib.h" in their
config/*/tm-*.h files. However x86-64 is a pure multiarch target and
thus using TM file is not allowed.
When I add '#include "solib.h"' directly to breakpoints.c it compiles
and links just fine. Also it seems like most targets use it anyway. If
we would wrap all #defines in solib.h between #ifndef...#endif it would
remain backward compatible for targets that define their own macros. Or
am I wrong? Like this:
[solib.h]
+ #ifndef SOLIB_ADD
#define SOLIB_ADD(filename, from_tty, targ, readsyms) \
solib_add (filename, from_tty, targ, readsyms)
+ #endif
Or is there another way to solve my compilation problems?
Michal Ludvig
--
* SuSE CR, s.r.o * mludvig@suse.cz
* +420 2 9654 5373 * http://www.suse.cz