Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Doug Evans <dje@google.com>, Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches <gdb-patches@sourceware.org>
Subject: Re: path to find libcc1.so?
Date: Sat, 13 Dec 2014 18:56:00 -0000	[thread overview]
Message-ID: <20141213185647.GA14208@host2.jankratochvil.net> (raw)
In-Reply-To: <83mw6sq941.fsf@gnu.org> <CADPb22SpZAozZmtq+QMwndmi2mZpD2QF221ZpLSszr0cS0+gEw@mail.gmail.com>

On Sat, 13 Dec 2014 01:22:38 +0100, Doug Evans wrote:
> I was reading the new "compile" code and a question occurred to me.
> Do we want to give the user a parameter to specify the path of libcc1.so?
> (say if it's in a non-standard location)
> Or is the plan to tell users to use existing mechanisms
> (LD_LIBRARY_PATH, et.al.)?

It is assumed + I use $LD_LIBRARY_PATH.

I find the GDB compile project is at much too early stage than to care about
this.  It needs some additional features (such as to use it by default for the
"print" command etc. etc.) to make it really practically useful, additionally
it will be useful IMO only since the C++ support which is a new project ahead.

But if we should care about it: I think libcc1.so can be arbitrary one, it
only provides RPC interface to the target compiler which it
fork()s+exec()utes.  Target compiler is already being search to match the
inferior arch (see GDB gdbarch's gnu_triplet_regexp).  There is gdb<->libcc1
version check (GCC_FE_VERSION_0) and libcc1<->gcc version check
(GCC_C_FE_VERSION_0) but so far there exists only one protocol version so
I also find a bit premature to deal with searching for matching libcc1 when
currently any one has to match.

I wanted to try to check how does it search+work with s390x cross target but
I failed to build gcc-5.0 for s390x, filed:
	s390x, ICE, unable to generate reloads, in curr_insn_transform, at lra-constraints.c
	https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64300


On Sat, 13 Dec 2014 08:53:02 +0100, Eli Zaretskii wrote:
> > Date: Fri, 12 Dec 2014 16:22:38 -0800
> > From: Doug Evans <dje@google.com>
> > Cc: gdb-patches <gdb-patches@sourceware.org>
> > 
> > I was reading the new "compile" code and a question occurred to me.
> > Do we want to give the user a parameter to specify the path of libcc1.so?
> 
> Shouldn't "gcc -print-file-name" know how to find it?

While 'gcc -print-file-name=libcc1.so' really works for me it brings
a chicken-and-egg problem.

Currently the search for a matching compiler (like x86_64-redhat-linux-gcc
vs. s390x-linux-gnu-gcc) is being done by libcc1.so which ... is backwards.


Jan


  parent reply	other threads:[~2014-12-13 18:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-13  0:22 Doug Evans
2014-12-13  7:53 ` Eli Zaretskii
2014-12-13 18:56 ` Jan Kratochvil [this message]
2014-12-13 19:57   ` Doug Evans
2014-12-13 20:16     ` Jan Kratochvil
2014-12-13 21:49       ` Doug Evans
2014-12-13 22:12         ` Doug Evans
2014-12-14 20:46         ` Jan Kratochvil

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=20141213185647.GA14208@host2.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=dje@google.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    /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