From: Patrick Herbst <paherbst@gmail.com>
To: gcc-help <gcc-help@gcc.gnu.org>
Subject: multiple installed versions of gcc -- automatically set rpath ??
Date: Thu, 28 May 2020 22:54:41 -0400 [thread overview]
Message-ID: <CACMdL5+OafUu_5G-OVB=E-T7ertMhapLe5sx+6rqByLD5KDm8A@mail.gmail.com> (raw)
I have the base gcc that came with my distro and i'd like to have the
option of using a newer version without replacing the older one.
I'd like to install the newer version in a different path, like /opt.
I run into a problem though when compiling with the newer version in
/opt, it links against the libstdc++ in /opt, but at runtime the
executable tries to link with the systems version in /usr/lib.
Is there a way to have the gcc in /opt automatically set the rpath
when linking so that executables can run against the /opt libstdc++?
next reply other threads:[~2020-05-29 2:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-29 2:54 Patrick Herbst [this message]
2020-05-29 3:07 ` Dan Kegel
2020-05-29 9:28 ` Patrick Bégou
2020-05-29 11:02 ` Thomas Doczkal
2020-05-29 11:22 ` Jonathan Wakely
2020-05-29 11:33 ` Jonathan Wakely
2020-05-29 17:23 ` Jonathan Wakely
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='CACMdL5+OafUu_5G-OVB=E-T7ertMhapLe5sx+6rqByLD5KDm8A@mail.gmail.com' \
--to=paherbst@gmail.com \
--cc=gcc-help@gcc.gnu.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).