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]

PATCH: Remove dependency on libiberty from libbfd.so.


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


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