This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Make LIB_PATH configurable


While trying to build a cross-compiler to match the one in Hard Hat 2.0, 
I found I needed to be able to set the default library search path for ld.  

ld/README encourages us to override LIB_PATH in ld/Makefile.  Turns out
it's hard to override on the make commandline, at least in my
feeble attempts.  So I dug up an old patch from last year,
http://sources.redhat.com/ml/binutils/2001-04/msg00306.html
updated it for binutils-2.13, removed the cygwin-specific parts,
and added a new configure argument, --with-lib-dir.

This gives cross-compiler builders an easy way of setting a special
default library search path.

Comments?

(After applying, you'll need to run automake and autoconf, I think.)
- Dan

2001-04-25  Christopher Faylor <cgf@cygnus.com>

	* Makefile.in (LIB_PATH): Make configurable.
	(GENSCRIPTS): Set LIB_PATH in environment.
	* configure.in: Substitute LIB_PATH.

2002-08-20 Dan Kegel <dank@kegel.com>
	* updated cgf's patch to binutils-2.13, removed cygwin-specific part
	* added --with-lib-path argument to ld's configure to set LIB_PATH

--- configure.in.orig	Tue Aug 20 17:19:15 2002
+++ configure.in	Tue Aug 20 16:53:28 2002
@@ -13,6 +13,7 @@
 
 AM_PROG_LIBTOOL
 
+AC_ARG_WITH(lib-path, [--with-lib-path=dir1:dir2:dir3...],LIB_PATH=$withval)
 AC_ARG_ENABLE(targets,
 [  --enable-targets        alternative target configurations],
 [case "${enableval}" in
@@ -205,6 +206,7 @@
 
 EMULATION_LIBPATH=$all_libpath
 AC_SUBST(EMULATION_LIBPATH)
+AC_SUBST(LIB_PATH)
 
 if test x${enable_static} = xno; then
   TESTBFDLIB="--rpath ../bfd/.libs ../bfd/.libs/libbfd.so"
--- Makefile.am.orig	Tue Aug 20 17:19:43 2002
+++ Makefile.am	Tue Aug 20 17:16:40 2002
@@ -31,7 +31,7 @@
 # a cross-linker, in which case the default is empty.  See genscripts.sh.)
 # Otherwise, they are replaced with the ones given in LIB_PATH,
 # which may have the form: LIB_PATH=/lib:/usr/local/lib
-LIB_PATH =
+LIB_PATH = @LIB_PATH@
 
 BASEDIR = $(srcdir)/..
 BFDDIR = $(BASEDIR)/bfd
@@ -363,7 +363,7 @@
 
 # These all start with e so 'make clean' can find them.
 
-GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} "${exec_prefix}" @host@ @target@ @target_alias@ "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@"
+GENSCRIPTS = LIB_PATH='${LIB_PATH}' $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} "${exec_prefix}" @host@ @target@ @target_alias@ "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@"
 GEN_DEPENDS = $(srcdir)/genscripts.sh stringify.sed
 @TDIRS@
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]