Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* cross-target gdb compilation problems
@ 2002-07-01  9:17 Michal Ludvig
  2002-07-01  9:29 ` Andrew Cagney
  2002-07-01 10:52 ` Kevin Buettner
  0 siblings, 2 replies; 5+ messages in thread
From: Michal Ludvig @ 2002-07-01  9:17 UTC (permalink / raw)
  To: gdb

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-07-01 21:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-01  9:17 cross-target gdb compilation problems Michal Ludvig
2002-07-01  9:29 ` Andrew Cagney
2002-07-01 14:16   ` Michal Ludvig
2002-07-01 14:52     ` Andrew Cagney
2002-07-01 10:52 ` Kevin Buettner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox