package/elfutils: fix build with uclibc
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Thu, 18 Mar 2021 07:42:19 +0000 (08:42 +0100)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sat, 20 Mar 2021 21:23:57 +0000 (22:23 +0100)
Update first patch to fix a build failure with uclibc and elfutils in
version 0.183.0 which errors out if obstack is not found since
https://sourceware.org/git/?p=elfutils.git;a=commit;h=da855fc9cd415c288bfcb9de1f3d5eb329de0557

Indeed, obstack has been removed from uclibc-ng since version 1.0.21 and
https://github.com/wbx-github/uclibc-ng/commit/0bd6bfb2b643ea2b4b1440dfd917ba752f0c0d15

Fixes:
 - http://autobuild.buildroot.org/results/003ae73c7b48ad6b9837fb19ca197061d20eaf6d

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Reviewed-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/elfutils/0001-Add-a-enable-disable-progs-configure-option.patch

index e51f749cf619dca2dca8ad7944f3e77059e61099..bac9bc124579befb13446ef8f18014aab856c786 100644 (file)
@@ -20,6 +20,8 @@ Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
 Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
 [Rebased on 0.183]
 Signed-off-by: Peter Seiderer <ps.report@gmx.net>
+[Fabrice: don't error out if obstack is not found]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
 ---
  Makefile.am  | 6 +++++-
  configure.ac | 6 ++++++
@@ -60,6 +62,15 @@ index d345495..0dd4b1e 100644
  dnl zlib is mandatory.
  save_LIBS="$LIBS"
  LIBS=
+@@ -579,7 +585,7 @@ saved_LIBS="$LIBS"
+ AC_SEARCH_LIBS([_obstack_free], [obstack])
+ LIBS="$saved_LIBS"
+ case "$ac_cv_search__obstack_free" in
+-        no) AC_MSG_FAILURE([failed to find _obstack_free]) ;;
++        no) obstack_LIBS= ;;
+         -l*) obstack_LIBS="$ac_cv_search__obstack_free" ;;
+         *) obstack_LIBS= ;;
+ esac
 -- 
 2.30.1