public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Michael Meissner <meissner@linux.vnet.ibm.com>
To: Gerald Pfeifer <gerald@pfeifer.com>
Cc: Michael Meissner <meissner@linux.vnet.ibm.com>,
	gcc-patches@gcc.gnu.org,
	       David Edelsohn <dje.gcc@gmail.com>
Subject: Re: [PATCH] New configuration options to enable additional executable/startfile/shared library prefixes
Date: Fri, 02 Nov 2012 18:01:00 -0000	[thread overview]
Message-ID: <20121102180040.GA2604@ibm-tiger.the-meissners.org> (raw)
In-Reply-To: <alpine.LNX.2.00.1211020017110.2266@tuna.site>

On Fri, Nov 02, 2012 at 12:22:07AM +0100, Gerald Pfeifer wrote:
> On Thu, 1 Nov 2012, Michael Meissner wrote:
> > 	* doc/install.texi (--with-extra-prefix=): Document new configure
> > 	switches.
> > 	(--with-extra-exec-prefix=): Likewise.
> > 	(--with-extra-startfile-prefix=): Likewise.
> > 	(--with-extra-rpath-prefix=): Likewise.
> 
> +On powerpc64-linux systems, the dynamic linker will be searched for in
> +the directories specified by the prefixed, that is used instead of the
>                                   ^^^^^^^^
> +standard system dynamic linker.
> 
> Is the use of "prefixed" correct her, or would that be "prefixes"?

You are right that doesn't make sense.  The paragraph should read:

On powerpc64-linux systems, the dynamic linker will be searched for in
the directories specified by the prefixes before falling back to the
standard system dynamic linker which is used if an alternate dynamic
linker could not be found.

> +In addition on powerpc64-linux systems, if the user used static
> 
> "the user used" comes across a bit oddly.  How about "requests"?
> 
> +linking, as well as the @option{-mcpu=} option, the linker will be
> 
> Do I understand this correctly that both must hold?  Perhaps say "plus"
> to avoid any ambiguity?
> 
> +for that particular machine.  If dynamic linking is used, these cpu
> +tuned libraries will not be searched, since the dynamic linker will
> +load the appropriate cpu tuned library, based on the system that is
> +executing the code.

Yes.  The paragraph should read:

In addition on powerpc64-linux systems, if the user used static
linking and the @option{-mcpu=} option at the same time, the linker
will be told to search in appropriate directories for libraries that
are built for that particular machine.  If dynamic linking is used,
these cpu tuned libraries will not be searched, since the dynamic
linker will load the appropriate cpu tuned library, based on the
system that is executing the code.

> CPU (uppercase) in two cases.
> 
> +@item --with-extra-rpath-prefix=@var{prefixes}
> +Specify additional directories for finding shared libraries when
> +the compiler is run.  Each prefix is separated by the standard path
> +sepator (usually colon, @option{:}).  By default no extra prefixes are
> +used.  If this option is used, each of the directories if they exist
> +will be specified to the linker via the @option{-rpath=} option.
> 
> "each of the directories if they exist" is a bit confusing ("each"
> versus "they").
> 
> Do you mean "each of the directories that exists on the build system
> will be..." or something like that?

What the compiler does is search for the directories to exist when the compiler
is run (not when it is built).  If they exist, the linker on powerpc64-linux
will be told via -rpath to add these paths so that when the program is run, the
right libraries are loaded.

For example, if I have AT 6.0 installed on my Sles 11SP1 system, it is
installed in:

	/opt/at6.0

Normally when you build the compiler using the host libraries, the linker gets
passed:

	-dynamic-linker /lib64/ld64.so.1

With the alternatate configuration support, the linker would get passed:

	-rpath=/home/meissner/fsf-install-ppc64/atdirs2/lib64
	-rpath=/opt/at6.0/lib64
	-dynamic-linker /opt/at6.0/lib64/ld64.so.1

where /home/meissner/fsf-install-ppc64/atdirs2/lib64 happens to be the install
directory for the compiler being built, so its libraries override the AT 6
libraries.

-- 
Michael Meissner, IBM
5 Technology Place Drive, M/S 2757, Westford, MA 01886-3141, USA
meissner@linux.vnet.ibm.com	fax +1 (978) 399-6899

  reply	other threads:[~2012-11-02 18:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-01 22:54 Michael Meissner
2012-11-01 23:22 ` Gerald Pfeifer
2012-11-02 18:01   ` Michael Meissner [this message]
2012-11-03 23:01 ` David Edelsohn
2012-11-05 17:27   ` Michael Meissner
2012-11-06 14:59     ` David Edelsohn
2012-12-05 19:47 ` Ping: " Michael Meissner

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=20121102180040.GA2604@ibm-tiger.the-meissners.org \
    --to=meissner@linux.vnet.ibm.com \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gerald@pfeifer.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).