This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
On Mon, 2005-06-13 at 11:30 -0400, Daniel Jacobowitz wrote:
> On Mon, Jun 13, 2005 at 11:26:06AM -0400, Aaron Gaudio wrote:
> > Continuing with my adventure from last week, I am now trying to cross-
> > comile gdb to run on i386-pc-solaris2.10 and build on sparc-sun-
> > solaris2.10.
> >
> > I used the following configure line:
> >
> > $ bash_cv_have_mbstate_t=yes ./configure --build sparc-sun-solaris2.8 --
> > host i386-pc-solaris2.10
> >
> > This seems to get the correct compilers to use. However, when trying to
> > link, it is missing the correct rpath-link (where I have the x86 sysroot
> > to link system libraries), and it is also not linking in a required
> > library, libsocket (I get undefined symbols that manually adding -
> > lsocket to the link command fixes).
>
> These both sound like problems with your cross compiler, not problems
> with GDB.
In the case of libsocket, it is not a cross-compiler problem; you always
have to add -lsocket to the link libs when using things like socket(),
or linking libraries that do (such as X11 libs). The problem is that
when building a native gdb on solaris (with --target=i386-pc-
solaris2.10), configure detects that -lsocket is required and adds it to
the appopriate Makefile macros, but does not when building for x86
Solaris....
>
> No, that's for target libraries. Gdb is a host program. The fact taht
> build != host is irrelevant here; your "target" is i386-pc-solaris2.10,
> and so is your "host". LDFLAGS is the correct place to add flags for
> the host.
>
I've tried this, but it didn't seem to change anything. Part of the
confusion is that the sub-level configures don't get called until you
run a top-level make, and not all environment variables set (such as
LDFLAGS) at configure time get cascaded to the sub-level configure, and
furthermore I'm not sure the sub-level Makefile is handling merging
LDFLAGS from the environment and from the makefile (since I just want to
tell it to add "-lsocket", not manually figure out every single library
that needs to be linked).
Any further help is much appreciated.
--
Aaron Gaudio agaudio @ eng.mc.xerox.com 585-422-6876
While life is yours, live joyously;
None can escape Death's searching eye:
When once this frame of ours they burn,
How shall it e'er again return?
Attachment:
signature.asc
Description: This is a digitally signed message part
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |