Page 2 of 2

Re: GCC 4.5.0 and the cross-compiler tutorial

Posted: Mon Dec 13, 2010 10:46 pm
by Solar
protecyon wrote:It's a hack but to help GCC find the libraries you can create the LD_LIBRARY_PATH for example:
LD_LIBRARY_PATH=/mydir/gmp/lib:/mydir/mpc/lib:/mydir/mpfr/lib
LD_LIBRARY_PATH is bad (*). If you use it for anything else but patching libraries into a system for test / workaround purposes, chances are you are mis-using it.

Either
  • using the host system's GMP and MPFR, or
  • building GMP and MPFR in default directories (/usr/... or /opt/...), or
  • putting their sources into the GCC source tree and build them alongside everything else
works (unless you're playing dork like I did). Each option is preferrable to setting LD_LIBRARY_PATH.


(*): http://xahlee.org/UnixResource_dir/_/ldpath.html