From: "Poor Yorick" <org.gnu.gcc.help@pooryorick.com>
To: gcc-help@gnu.org
Subject: libgmp, libmpfr, RPATH, RUNPATH, LD_LIBRARY_PATH and gcc build options
Date: Mon, 07 Jan 2008 10:20:00 -0000 [thread overview]
Message-ID: <20080105224042.16253.qmail@station198.com> (raw)
This is a followup to my previous question about RPATH and RUNPATH in gcc
binaries:
http://gcc.gnu.org/ml/gcc-help/2008-01/msg00028.html
I built and installed gcc to an NFS mount and used it to build and install a
stack of software packages in the same area. LD_LIBRARY_PATH is not used in
the environment, and because they can't use DT_RPATH and DT_RUNPATH, gcc
binaries were the only programs which couldn't find the correct libgmp and
libmpfr. It seemed like the only good solution was to build gcc with static
libgmp and libmpfr, but if shared versions of those libraries exist, they get
used when building gcc, and there is no option to request the static
libraries. To work around this issue, I hid libgmp.so and libmpfr.so before
building gcc. This is an excerpt from my build script:
config_pre () {
#can't embed RUNPATH or RPATH into gcc binaries
# so make sure it builds with static gmp and mpfr
for i in 'libgmp.so*' 'libmpfr.so*'; do
find ../lib -iname "$i" | while read; do
mv "$REPLY" "$REPLY".hide
done
done
}
link_pre () {
#unhide libgmp and libmpfr
for i in 'libgmp.so*.hide' 'libmpfr.so*.hide'; do
find ../lib -iname "$i" | while read; do
mv "$REPLY" "${REPLY%.hide}"
done
done
}
Perhaps this will help someone who finds themselves in the same boat. How about adding some configure options like --with-static-gmp and --with-static-mpfr to gcc? Also, now that gcc binaries depend on external libraries, why not allow DT_RPATH and DT_RUNPATH into them?
--
Yorick
reply other threads:[~2008-01-05 22:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20080105224042.16253.qmail@station198.com \
--to=org.gnu.gcc.help@pooryorick.com \
--cc=gcc-help@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).