On Sat, Nov 04, 2006 at 04:58:42PM -0800, Brooks Moses wrote:
> Daniel Jacobowitz wrote:
> >On Sat, Nov 04, 2006 at 10:57:14AM -0800, Brooks Moses wrote:
> >>I've been setting up a Debian box to do builds on, and make bootstrap on 
> >>mainline is failing somewhere in the middle of Stage 1.  The problem 
> >>appears to be that it's not looking in the right places for libgmp.so.3 
> >>when it calls ./gcc/xgcc at the end of the stage.
> >
> >It's doing exactly what it ought to, though unintuitive.  If you tell a
> >-compiler to use L/usr/local/lib, you're responsible for also setting
> >up either an rpath or LD_LIBRARY_PATH to point at /usr/local/lib; doing
> >it by default causes all kinds of problems.
> 
> Ah, okay.  Thanks for the quick reply!
> 
> I guess I was assuming that since GMP is supposedly only a prerequisite 
> for building the compiler and not for using it, that it was being linked 
> in statically rather than dynamically.  But I guess that wouldn't apply 
> to xgcc, since it's only used in the build (right?).
> 

I have been using this patch to make sure that GMPLIBS is linked
statically so that I can install gcc binaries on machines without
updated GMPLIBS.


H.J.
----
--- gcc/Makefile.in.gmp 2006-05-19 06:23:09.000000000 -0700
+++ gcc/Makefile.in     2006-05-19 13:20:17.000000000 -0700
@@ -295,7 +295,7 @@ ZLIB = @zlibdir@ -lz
 ZLIBINC = @zlibinc@
 
 # How to find GMP
-GMPLIBS = @GMPLIBS@
+GMPLIBS = -Wl,-Bstatic @GMPLIBS@ -Wl,-Bdynamic
 GMPINC = @GMPINC@
 
 CPPLIB = ../libcpp/libcpp.a

Reply via email to