Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Aaron Gaudio <agaudio@eng.mc.xerox.com>
Cc: gdb <gdb@sources.redhat.com>
Subject: Re: Configuring linker flags while cross-compiling gdb
Date: Mon, 13 Jun 2005 15:30:00 -0000	[thread overview]
Message-ID: <20050613153007.GA7054@nevyn.them.org> (raw)
In-Reply-To: <1118676366.27729.73.camel@rockhopper>

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.

> So, now I'm trying to figure out if there is a way to pass these by way
> of option or environment variable to the top-level configure in a way
> that they will cascade to the subdirectory configures and/or Makefiles.
> Perusing the scripts in question, the top-level configure and
> Makefile.in use a variable called "LDFLAGS_FOR_TARGET", and that seems
> like the place to add a -R option or -W,l,--rpath-link to take care of
> the rpath, however the gdb/configure and gdb/Makefile.in don't reference
> this variable at all...

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.

-- 
Daniel Jacobowitz
CodeSourcery, LLC


  reply	other threads:[~2005-06-13 15:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-13 15:27 Aaron Gaudio
2005-06-13 15:30 ` Daniel Jacobowitz [this message]
2005-06-13 19:07   ` Aaron Gaudio
2005-06-13 19:40     ` Aaron Gaudio
2005-06-13 19:42     ` Daniel Jacobowitz
2005-06-14  7:20 UDOGAN

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=20050613153007.GA7054@nevyn.them.org \
    --to=drow@false.org \
    --cc=agaudio@eng.mc.xerox.com \
    --cc=gdb@sources.redhat.com \
    /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