PATCH: Remove dependency on libiberty from libbfd.so.

H . J . Lu hjl@lucon.org
Thu Oct 18 20:21:00 GMT 2001


I don't want the dependency on libiberty in libbfd.so. Here is a hack
I come up with. It works with and without shared library enabled. Any
comments?


H.J.
---
2001-10-18  H.J. Lu <hjl@gnu.org>

	* Makefile.am (LIBIBERTY_OBJS): New.
	(OFILES): Add $(LIBIBERTY_OBJS).

--- Makefile.am.liberty	Thu Oct 18 19:44:50 2001
+++ Makefile.am	Thu Oct 18 20:13:17 2001
@@ -535,11 +535,21 @@ po/POTFILES.in:
 
 diststuff: info
 
+LIBIBERTY_OBJS = concat.lo objalloc.lo hashtab.lo hex.lo \
+		 safe-ctype.lo xexit.lo xmalloc.lo xstrerror.lo 
+
+# FIXME: I don't want the dependency on libiberty in libbfd.so.
+$(LIBIBERTY_OBJS):
+	echo "# Generated by Makefile - GNU libtool" > $@
+	name=`echo $@ | sed -e "s/.lo$$//"`; \
+	echo pic_object=../libiberty/pic/$$name.o >> $@; \
+	echo non_pic_object=../libiberty/$$name.o >> $@
+
 # Various kinds of .o files to put in libbfd.a:
 # BFD_BACKENDS	Routines the configured targets need.
 # BFD_MACHINES	Architecture-specific routines the configured targets need.
 # COREFILE	Core file routines for a native configuration
-OFILES = $(BFD_BACKENDS) $(BFD_MACHINES) @COREFILE@
+OFILES = $(BFD_BACKENDS) $(BFD_MACHINES) @COREFILE@ $(LIBIBERTY_OBJS)
 
 stamp-ofiles: Makefile
 	rm -f tofiles



More information about the Binutils mailing list