From: Andrew Cagney <ac131313@ges.redhat.com>
To: Michal Ludvig <mludvig@suse.cz>
Cc: gdb <gdb@sources.redhat.com>
Subject: Re: cross-target gdb compilation problems
Date: Mon, 01 Jul 2002 09:29:00 -0000 [thread overview]
Message-ID: <3D20834F.3000304@ges.redhat.com> (raw)
In-Reply-To: <3D2080A2.6080702@suse.cz>
> 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:
Until someone fixes these limitations in the solib code, adding the
include to the tm*-.h file (and dropping back to multi-arch partial) is
the accepted way of addressing this problem.
> [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?
Sigh, yes, someone needs to get down and finish of the solib stuff :-/
enjoy,
Andrew
next prev parent reply other threads:[~2002-07-01 16:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-01 9:17 Michal Ludvig
2002-07-01 9:29 ` Andrew Cagney [this message]
2002-07-01 14:16 ` Michal Ludvig
2002-07-01 14:52 ` Andrew Cagney
2002-07-01 10:52 ` Kevin Buettner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3D20834F.3000304@ges.redhat.com \
--to=ac131313@ges.redhat.com \
--cc=gdb@sources.redhat.com \
--cc=mludvig@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox