tags 537744 + patch
tags 573905 + patch

Hi!

Dear maintainer,

Based upon the previous work, I've prepared an NMU for oprofile
(versioned as 0.9.6-1.1) and uploaded it to DELAYED/7. Please feel free
to tell me if I should delay it longer.


Best Regards,
  Alexander
diff -u oprofile-0.9.6/debian/changelog oprofile-0.9.6/debian/changelog
--- oprofile-0.9.6/debian/changelog
+++ oprofile-0.9.6/debian/changelog
@@ -1,3 +1,11 @@
+oprofile (0.9.6-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Add patch by Yukiharu YABUKI to staticaly link against libbfd
+   (Closes: #537744, #573905)
+
+ -- Alexander Reichle-Schmehl <toli...@debian.org>  Thu, 22 Apr 2010 15:43:12 +0200
+
 oprofile (0.9.6-1) unstable; urgency=low
 
   * New upstream release
diff -u oprofile-0.9.6/debian/patches/series oprofile-0.9.6/debian/patches/series
--- oprofile-0.9.6/debian/patches/series
+++ oprofile-0.9.6/debian/patches/series
@@ -3 +3 @@
-#static-libbfd.patch
+static-libbfd.patch
diff -u oprofile-0.9.6/debian/patches/static-libbfd.patch oprofile-0.9.6/debian/patches/static-libbfd.patch
--- oprofile-0.9.6/debian/patches/static-libbfd.patch
+++ oprofile-0.9.6/debian/patches/static-libbfd.patch
@@ -1,38 +1,55 @@
-Statically link against libbfd (Closes: #537744)
---- trunk.orig/m4/binutils.m4
-+++ trunk/m4/binutils.m4
-@@ -10,10 +10,10 @@
+--- oprofile-0.9.6.orig/configure.in	2009-11-24 22:25:17.000000000 +0700
++++ oprofile-0.9.6/configure.in	2010-03-18 17:09:12.000000000 +0700
+@@ -147,7 +147,7 @@
+ dnl finally restore the original libs setting
+ LIBS="$ORIG_SAVE_LIBS"
+ LIBERTY_LIBS="-liberty $DL_LIB $INTL_LIB"
+-BFD_LIBS="-lbfd -liberty $DL_LIB $INTL_LIB $Z_LIB"
++BFD_LIBS="$BFD_LIB -lz -liberty $DL_LIB $INTL_LIB"
+ POPT_LIBS="-lpopt"
+ AC_SUBST(LIBERTY_LIBS)
+ AC_SUBST(BFD_LIBS)
+--- oprofile-0.9.6.orig/m4/binutils.m4	2009-11-24 22:25:16.000000000 +0700
++++ oprofile-0.9.6/m4/binutils.m4	2010-03-18 19:16:32.000000000 +0700
+@@ -9,16 +9,21 @@
+ AC_CHECK_FUNCS(xmemdup)
  AC_CHECK_LIB(dl, dlopen, LIBS="$LIBS -ldl"; DL_LIB="-ldl", DL_LIB="")
  AC_CHECK_LIB(intl, main, LIBS="$LIBS -lintl"; INTL_LIB="-lintl", INTL_LIB="")
++AC_CHECK_LIB(z, compress, LIBS="$LIBS -lz"; Z_LIB="-lz", Z_LIB="")
  
 -AC_CHECK_LIB(bfd, bfd_openr, LIBS="-lbfd $LIBS"; Z_LIB="",
-+AC_CHECK_LIB(bfd, bfd_openr, LIBS="$LIBS /usr/lib/libbfd.a",
- 	[AC_CHECK_LIB(z, compress,
- dnl Use a different bfd function here so as not to use cached result from above
+-	[AC_CHECK_LIB(z, compress,
+-dnl Use a different bfd function here so as not to use cached result from above
 -		[AC_CHECK_LIB(bfd, bfd_fdopenr, LIBS="-lbfd -lz $LIBS"; Z_LIB="-lz",
-+		[AC_CHECK_LIB(bfd, bfd_fdopenr, LIBS="$LIBS /usr/lib/libbfd.a -lz",
- 			[AC_MSG_ERROR([bfd library not found])], -lz)
- 		],
- 		[AC_MSG_ERROR([libz library not found; required by libbfd])])
---- trunk.orig/libopagent/Makefile.am
-+++ trunk/libopagent/Makefile.am
+-			[AC_MSG_ERROR([bfd library not found])], -lz)
+-		],
+-		[AC_MSG_ERROR([libz library not found; required by libbfd])])
+-	]
+-)
++dnl binutils-multiarch does not have /usr/lib/libbfd.a.
++BFD_LIB=""
++lib=/usr/lib/libbfd-single.a
++ORIG_SAVE_LIBS="$LIBS"
++LIBS="$lib $LIBS"
++AC_CHECK_FUNCS(bfd_openr, BFD_LIB="$lib",
++	[LIBS="$ORIG_SAVE_LIBS"
++	lib=/usr/lib/libbfd.a
++	ORIG_SAVE_LIBS="$LIBS"
++	LIBS="$lib $LIBS"
++	AC_CHECK_FUNCS(bfd_close, BFD_LIB="$lib",
++		[AC_MSG_ERROR([libfd library not found])])
++	])
+ 
+ AC_LANG_PUSH(C)
+ # Determine if bfd_get_synthetic_symtab macro is available
+--- oprofile-0.9.6.orig/libopagent/Makefile.am	2009-11-24 22:25:18.000000000 +0700
++++ oprofile-0.9.6/libopagent/Makefile.am	2010-03-18 17:09:12.000000000 +0700
 @@ -11,7 +11,7 @@
  
  
  libopagent_la_CFLAGS = -fPIC -I ${top_srcdir}/libop -I ${top_srcdir}/libutil
 -libopagent_la_LIBADD = $(BFD_LIBS)
-+libopagent_la_LIBADD = $(LIBERTY_LIBS) $(BFD_LIBS)
++libopagent_la_LIBADD =
  
  # Do not increment the major version for this library except to
  # intentionally break backward ABI compatability.  Use the
---- trunk.orig/configure.in
-+++ trunk/configure.in
-@@ -147,7 +147,7 @@
- dnl finally restore the original libs setting
- LIBS="$ORIG_SAVE_LIBS"
- LIBERTY_LIBS="-liberty $DL_LIB $INTL_LIB"
--BFD_LIBS="-lbfd -liberty $DL_LIB $INTL_LIB $Z_LIB"
-+BFD_LIBS="/usr/lib/libbfd.a -lz -liberty $DL_LIB $INTL_LIB"
- POPT_LIBS="-lpopt"
- AC_SUBST(LIBERTY_LIBS)
- AC_SUBST(BFD_LIBS)

Reply via email to