This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] build: add -Wl,-rpath=path to $gmplibs (issue 7124057)
- From: minux dot ma at gmail dot com
- To: bonzini at gnu dot org, dj at redhat dot com, neroden at gcc dot gnu dot org, aoliva at redhat dot com, ralf dot wildenhues at gmx dot de
- Cc: gcc-patches at gcc dot gnu dot org, iant at google dot com, reply at codereview-hr dot appspotmail dot com
- Date: Thu, 17 Jan 2013 19:11:12 +0000
- Subject: [PATCH] build: add -Wl,-rpath=path to $gmplibs (issue 7124057)
- Reply-to: minux dot ma at gmail dot com, bonzini at gnu dot org, dj at redhat dot com, neroden at gcc dot gnu dot org, aoliva at redhat dot com, ralf dot wildenhues at gmx dot de, gcc-patches at gcc dot gnu dot org, iant at google dot com, reply at codereview-hr dot appspotmail dot com
Reviewers: bonzini_gnu.org, dj_redhat.com, neroden_gcc.gnu.org,
aoliva_redhat.com, ralf.wildenhues_gmx.de,
Message:
some systems (notably NetBSD), doesn't place the path where libgmp,
libmpfr, libmpc resides into /etc/ld.so.conf, and instead rely on
the binary providing correct -rpath; this patch adds the required
-Wl,-rpath=path to $gmplibs so that when bootstrapping gcc,
the various language frontends (cc1, etc) could run in that case.
I assume all the linkers that gcc bootstraps with have support for
the -rpath flag.
Description:
2013-01-18 Shenghou Ma <minux.ma@gmail.com>
* configure.ac: add -Wl,-rpath=path to $gmplibs
* configure: Re-generate.
Please review this at https://codereview.appspot.com/7124057/
Affected files:
M configure
M configure.ac
Index: configure.ac
===================================================================
--- configure.ac (revision 195265)
+++ configure.ac (working copy)
@@ -1382,14 +1382,14 @@
if test "x$with_gmp" != x; then
- gmplibs="-L$with_gmp/lib $gmplibs"
+ gmplibs="-L$with_gmp/lib -Wl,-rpath=$with_gmp/lib $gmplibs"
gmpinc="-I$with_gmp/include $gmpinc"
fi
if test "x$with_gmp_include" != x; then
gmpinc="-I$with_gmp_include $gmpinc"
fi
if test "x$with_gmp_lib" != x; then
- gmplibs="-L$with_gmp_lib $gmplibs"
+ gmplibs="-L$with_gmp_lib -Wl,-rpath=$with_gmp_lib $gmplibs"
fi
if test "x$with_gmp$with_gmp_include$with_gmp_lib" = x && test -d
${srcdir}/gmp; then
gmplibs='-L$$r/$(HOST_SUBDIR)/gmp/'"$lt_cv_objdir $gmplibs"
Index: configure
===================================================================
--- configure (revision 195265)
+++ configure (working copy)
@@ -5409,14 +5409,14 @@
if test "x$with_gmp" != x; then
- gmplibs="-L$with_gmp/lib $gmplibs"
+ gmplibs="-L$with_gmp/lib -Wl,-rpath=$with_gmp/lib $gmplibs"
gmpinc="-I$with_gmp/include $gmpinc"
fi
if test "x$with_gmp_include" != x; then
gmpinc="-I$with_gmp_include $gmpinc"
fi
if test "x$with_gmp_lib" != x; then
- gmplibs="-L$with_gmp_lib $gmplibs"
+ gmplibs="-L$with_gmp_lib -Wl,-rpath=$with_gmp_lib $gmplibs"
fi
if test "x$with_gmp$with_gmp_include$with_gmp_lib" = x && test -d
${srcdir}/gmp; then
gmplibs='-L$$r/$(HOST_SUBDIR)/gmp/'"$lt_cv_objdir $gmplibs"