100-portability.patch 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924
  1. --- a/configure.ac
  2. +++ b/configure.ac
  3. @@ -20,6 +20,7 @@ dnl You should have received a copy of
  4. dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
  5. AC_INIT([elfutils],[0.191],[https://sourceware.org/bugzilla],[elfutils],[http://elfutils.org/])
  6. +AC_CONFIG_MACRO_DIRS([m4])
  7. dnl Workaround for older autoconf < 2.64
  8. m4_ifndef([AC_PACKAGE_URL],
  9. [AC_DEFINE([PACKAGE_URL], ["http://elfutils.org/"],
  10. @@ -43,16 +44,17 @@ elif test "x$program_prefix" = "x"; then
  11. fi
  12. AC_CONFIG_AUX_DIR([config])
  13. -AC_CONFIG_FILES([config/Makefile])
  14. +AC_CONFIG_FILES([config/Makefile libgnu/Makefile])
  15. AC_COPYRIGHT([Copyright (C) 1996-2024 The elfutils developers.])
  16. -AC_PREREQ(2.63) dnl Minimum Autoconf version required.
  17. +AC_PREREQ(2.64) dnl Minimum Autoconf version required.
  18. dnl We use GNU make extensions; automake 1.10 defaults to -Wportability.
  19. AM_INIT_AUTOMAKE([gnits 1.11 -Wno-portability dist-bzip2 no-dist-gzip parallel-tests])
  20. AM_MAINTAINER_MODE
  21. AM_SILENT_RULES([yes])
  22. +AC_USE_SYSTEM_EXTENSIONS()
  23. AC_CONFIG_SRCDIR([libelf/libelf.h])
  24. AC_CONFIG_FILES([Makefile])
  25. @@ -89,12 +91,14 @@ AS_IF([test "$use_locks" = yes],
  26. AH_TEMPLATE([USE_LOCKS], [Defined if libraries should be thread-safe.])
  27. m4_version_prereq([2.70], [AC_PROG_CC], [AC_PROG_CC_C99])
  28. +gl_EARLY
  29. +gl_INIT
  30. AC_PROG_CXX
  31. -AC_PROG_RANLIB
  32. AC_PROG_YACC
  33. AC_PROG_LEX([noyywrap])
  34. # Only available since automake 1.12
  35. m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
  36. +LT_INIT()
  37. AC_CHECK_TOOL([READELF], [readelf])
  38. AC_CHECK_TOOL([NM], [nm])
  39. @@ -195,7 +199,6 @@ AC_CACHE_CHECK([whether the compiler gen
  40. AC_LINK_IFELSE([AC_LANG_PROGRAM()],[ac_cv_buildid=yes; $READELF -n conftest$EXEEXT | grep -q NT_GNU_BUILD_ID || ac_cv_buildid=no],AC_MSG_FAILURE([unexpected compile failure]))])
  41. if test "$ac_cv_buildid" = "no"; then
  42. AC_MSG_WARN([compiler doesn't generate build-id by default])
  43. - LDFLAGS="$LDFLAGS -Wl,--build-id"
  44. fi
  45. ZRELRO_LDFLAGS="-Wl,-z,relro"
  46. @@ -635,36 +638,6 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([])],
  47. CFLAGS="$old_CFLAGS"])
  48. AS_IF([test "x$ac_cv_fno_addrsig" = "xyes"], CFLAGS="$CFLAGS -fno-addrsig")
  49. -saved_LIBS="$LIBS"
  50. -AC_SEARCH_LIBS([argp_parse], [argp])
  51. -LIBS="$saved_LIBS"
  52. -case "$ac_cv_search_argp_parse" in
  53. - no) AC_MSG_FAILURE([failed to find argp_parse]) ;;
  54. - -l*) argp_LDADD="$ac_cv_search_argp_parse" ;;
  55. - *) argp_LDADD= ;;
  56. -esac
  57. -AC_SUBST([argp_LDADD])
  58. -
  59. -saved_LIBS="$LIBS"
  60. -AC_SEARCH_LIBS([fts_close], [fts])
  61. -LIBS="$saved_LIBS"
  62. -case "$ac_cv_search_fts_close" in
  63. - no) AC_MSG_FAILURE([failed to find fts_close]) ;;
  64. - -l*) fts_LIBS="$ac_cv_search_fts_close" ;;
  65. - *) fts_LIBS= ;;
  66. -esac
  67. -AC_SUBST([fts_LIBS])
  68. -
  69. -saved_LIBS="$LIBS"
  70. -AC_SEARCH_LIBS([_obstack_free], [obstack])
  71. -LIBS="$saved_LIBS"
  72. -case "$ac_cv_search__obstack_free" in
  73. - no) AC_MSG_FAILURE([failed to find _obstack_free]) ;;
  74. - -l*) obstack_LIBS="$ac_cv_search__obstack_free" ;;
  75. - *) obstack_LIBS= ;;
  76. -esac
  77. -AC_SUBST([obstack_LIBS])
  78. -
  79. dnl The directories with content.
  80. dnl Documentation.
  81. --- a/libelf/elf_update.c
  82. +++ b/libelf/elf_update.c
  83. @@ -37,6 +37,33 @@
  84. #include "libelfP.h"
  85. +#include "elf_fill.c"
  86. +
  87. +#ifdef __APPLE__
  88. +static int posix_fallocate(int fd, off_t offset, off_t len)
  89. +{
  90. + off_t c_test;
  91. + int ret;
  92. + if (!__builtin_saddll_overflow(offset, len, &c_test)) {
  93. + fstore_t store = {F_ALLOCATECONTIG, F_PEOFPOSMODE, 0, offset + len, 0};
  94. + // Try to get a continuous chunk of disk space
  95. + ret = fcntl(fd, F_PREALLOCATE, &store);
  96. + if (ret < 0) {
  97. + // OK, perhaps we are too fragmented, allocate non-continuous
  98. + store.fst_flags = F_ALLOCATEALL;
  99. + ret = fcntl(fd, F_PREALLOCATE, &store);
  100. + if (ret < 0) {
  101. + return ret;
  102. + }
  103. + }
  104. + ret = ftruncate(fd, offset + len);
  105. + } else {
  106. + // offset+len would overflow.
  107. + ret = -1;
  108. + }
  109. + return ret;
  110. +}
  111. +#endif
  112. static int64_t
  113. write_file (Elf *elf, int64_t size, int change_bo, size_t shnum)
  114. --- a/lib/eu-config.h
  115. +++ b/lib/eu-config.h
  116. @@ -59,14 +59,18 @@
  117. # define once(once_control, init_routine) init_routine()
  118. #endif /* USE_LOCKS */
  119. -#include <libintl.h>
  120. +#include <gettext.h>
  121. /* gettext helper macros. */
  122. #define N_(Str) Str
  123. #define _(Str) dgettext ("elfutils", Str)
  124. /* Compiler-specific definitions. */
  125. +#ifdef __APPLE__
  126. +#define strong_alias(name, aliasname)
  127. +#else
  128. #define strong_alias(name, aliasname) \
  129. extern __typeof (name) aliasname __attribute__ ((alias (#name)));
  130. +#endif
  131. #ifdef __i386__
  132. # define internal_function __attribute__ ((regparm (3), stdcall))
  133. @@ -77,12 +81,7 @@
  134. #define internal_strong_alias(name, aliasname) \
  135. extern __typeof (name) aliasname __attribute__ ((alias (#name))) internal_function;
  136. -#ifdef HAVE_VISIBILITY
  137. -#define attribute_hidden \
  138. - __attribute__ ((visibility ("hidden")))
  139. -#else
  140. #define attribute_hidden /* empty */
  141. -#endif
  142. #ifdef HAVE_GCC_STRUCT
  143. #define attribute_packed \
  144. @@ -166,7 +165,7 @@ asm (".section predict_data, \"aw\"; .pr
  145. #endif
  146. /* Avoid PLT entries. */
  147. -#ifdef PIC
  148. +#if defined(PIC) && !defined(__APPLE__)
  149. # define INTUSE(name) _INTUSE(name)
  150. # define _INTUSE(name) __##name##_internal
  151. # define INTDEF(name) _INTDEF(name)
  152. --- a/config/eu.am
  153. +++ b/config/eu.am
  154. @@ -31,7 +31,7 @@
  155. ##
  156. DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DLOCALEDIR='"${localedir}"'
  157. -AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I..
  158. +AM_CPPFLAGS = -I$(top_builddir)/libgnu -I$(top_srcdir)/libgnu -I. -I$(srcdir) -I$(top_srcdir)/lib -I..
  159. # Drop the 'u' flag that automake adds by default. It is incompatible
  160. # with deterministic archives.
  161. --- a/libelf/Makefile.am
  162. +++ b/libelf/Makefile.am
  163. @@ -34,9 +34,7 @@ endif
  164. VERSION = 1
  165. -lib_LIBRARIES = libelf.a
  166. -noinst_LIBRARIES = libelf_pic.a
  167. -noinst_DATA = $(noinst_LIBRARIES:_pic.a=.so)
  168. +lib_LTLIBRARIES = libelf.la
  169. include_HEADERS = libelf.h gelf.h nlist.h
  170. noinst_HEADERS = abstract.h common.h exttypes.h gelf_xlate.h libelfP.h \
  171. @@ -51,7 +49,8 @@ endif
  172. pkginclude_HEADERS = elf-knowledge.h
  173. -libelf_a_SOURCES = elf_version.c elf_hash.c elf_error.c elf_fill.c \
  174. +libelf_la_LIBADD = ../libgnu/libgnu.la ../lib/libeu.la -lz $(zstd_LIBS) -lpthread
  175. +libelf_la_SOURCES = elf_version.c elf_hash.c elf_error.c \
  176. elf_begin.c elf_next.c elf_rand.c elf_end.c elf_kind.c \
  177. gelf_getclass.c elf_getbase.c elf_getident.c \
  178. elf32_fsize.c elf64_fsize.c gelf_fsize.c \
  179. @@ -102,37 +101,9 @@ libelf_a_SOURCES = elf_version.c elf_has
  180. elf32_getchdr.c elf64_getchdr.c gelf_getchdr.c \
  181. elf_compress.c elf_compress_gnu.c
  182. -libelf_pic_a_SOURCES =
  183. -am_libelf_pic_a_OBJECTS = $(libelf_a_SOURCES:.c=.os)
  184. -
  185. -libelf_so_DEPS = ../lib/libeu.a
  186. -libelf_so_LDLIBS = $(libelf_so_DEPS) -lz $(zstd_LIBS)
  187. -if USE_LOCKS
  188. -libelf_so_LDLIBS += -lpthread
  189. -endif
  190. -
  191. -libelf_so_LIBS = libelf_pic.a
  192. -libelf.so: $(srcdir)/libelf.map $(libelf_so_LIBS) $(libelf_so_DEPS)
  193. - $(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ \
  194. - -Wl,--soname,$@.$(VERSION) \
  195. - -Wl,--version-script,$< \
  196. - $(NO_UNDEFINED) \
  197. - -Wl,--whole-archive $(libelf_so_LIBS) -Wl,--no-whole-archive \
  198. - $(libelf_so_LDLIBS)
  199. - @$(textrel_check)
  200. - $(AM_V_at)ln -fs $@ $@.$(VERSION)
  201. -
  202. -install: install-am libelf.so
  203. +install: install-am
  204. $(mkinstalldirs) $(DESTDIR)$(libdir)
  205. - $(INSTALL_PROGRAM) libelf.so $(DESTDIR)$(libdir)/libelf-$(PACKAGE_VERSION).so
  206. - ln -fs libelf-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)/libelf.so.$(VERSION)
  207. - ln -fs libelf.so.$(VERSION) $(DESTDIR)$(libdir)/libelf.so
  208. uninstall: uninstall-am
  209. - rm -f $(DESTDIR)$(libdir)/libelf-$(PACKAGE_VERSION).so
  210. - rm -f $(DESTDIR)$(libdir)/libelf.so.$(VERSION)
  211. - rm -f $(DESTDIR)$(libdir)/libelf.so
  212. EXTRA_DIST = libelf.map
  213. -
  214. -CLEANFILES += $(am_libelf_pic_a_OBJECTS) libelf.so libelf.so.$(VERSION)
  215. --- a/backends/i386_auxv.c
  216. +++ b/backends/i386_auxv.c
  217. @@ -48,5 +48,4 @@ EBLHOOK(auxv_info) (GElf_Xword a_type, c
  218. return 1;
  219. }
  220. -__typeof (i386_auxv_info) x86_64_auxv_info
  221. - __attribute__ ((alias ("i386_auxv_info")));
  222. +auxv_info_alias(x86_64)
  223. --- a/backends/ppc_regs.c
  224. +++ b/backends/ppc_regs.c
  225. @@ -204,5 +204,11 @@ ppc_register_info (Ebl *ebl __attribute_
  226. return namelen;
  227. }
  228. -__typeof (ppc_register_info)
  229. - ppc64_register_info __attribute__ ((alias ("ppc_register_info")));
  230. +ssize_t
  231. +ppc64_register_info (Ebl *ebl,
  232. + int regno, char *name, size_t namelen,
  233. + const char **prefix, const char **setname,
  234. + int *bits, int *type)
  235. +{
  236. + return ppc_register_info(ebl, regno, name, namelen, prefix, setname, bits, type);
  237. +}
  238. --- a/backends/libebl_CPU.h
  239. +++ b/backends/libebl_CPU.h
  240. @@ -97,4 +97,10 @@ dwarf_is_pointer (int tag)
  241. case DW_TAG_reference_type: \
  242. case DW_TAG_rvalue_reference_type
  243. +#define auxv_info_alias(arch) \
  244. + int EBLHOOK_1(arch ## _, auxv_info) (GElf_Xword a_type, const char **name, const char **format) \
  245. + { \
  246. + return EBLHOOK(auxv_info)(a_type, name, format); \
  247. + }
  248. +
  249. #endif /* libebl_CPU.h */
  250. --- a/backends/ppc_auxv.c
  251. +++ b/backends/ppc_auxv.c
  252. @@ -51,5 +51,4 @@ EBLHOOK(auxv_info) (GElf_Xword a_type, c
  253. return 1;
  254. }
  255. -__typeof (ppc_auxv_info) ppc64_auxv_info
  256. - __attribute__ ((alias ("ppc_auxv_info")));
  257. +auxv_info_alias(ppc64)
  258. --- a/backends/ppc_cfi.c
  259. +++ b/backends/ppc_cfi.c
  260. @@ -72,6 +72,7 @@ ppc_abi_cfi (Ebl *ebl __attribute__ ((un
  261. return 0;
  262. }
  263. -__typeof (ppc_abi_cfi)
  264. - ppc64_abi_cfi
  265. - __attribute__ ((alias ("ppc_abi_cfi")));
  266. +int ppc64_abi_cfi(Ebl *ebl, Dwarf_CIE *abi_info)
  267. +{
  268. + return ppc_abi_cfi(ebl, abi_info);
  269. +}
  270. --- a/backends/ppc_initreg.c
  271. +++ b/backends/ppc_initreg.c
  272. @@ -68,9 +68,10 @@ ppc_dwarf_to_regno (Ebl *ebl __attribute
  273. abort ();
  274. }
  275. -__typeof (ppc_dwarf_to_regno)
  276. - ppc64_dwarf_to_regno
  277. - __attribute__ ((alias ("ppc_dwarf_to_regno")));
  278. +bool ppc64_dwarf_to_regno (Ebl *ebl, unsigned *regno)
  279. +{
  280. + return ppc_dwarf_to_regno(ebl, regno);
  281. +}
  282. bool
  283. ppc_set_initial_registers_tid (pid_t tid __attribute__ ((unused)),
  284. @@ -127,6 +128,7 @@ ppc_set_initial_registers_tid (pid_t tid
  285. #endif /* __powerpc__ */
  286. }
  287. -__typeof (ppc_set_initial_registers_tid)
  288. - ppc64_set_initial_registers_tid
  289. - __attribute__ ((alias ("ppc_set_initial_registers_tid")));
  290. +bool ppc64_set_initial_registers_tid(pid_t tid, ebl_tid_registers_t *setfunc, void *arg)
  291. +{
  292. + return ppc_set_initial_registers_tid(tid, setfunc, arg);
  293. +}
  294. --- a/backends/ppc_attrs.c
  295. +++ b/backends/ppc_attrs.c
  296. @@ -81,6 +81,9 @@ ppc_check_object_attribute (Ebl *ebl __a
  297. return false;
  298. }
  299. -__typeof (ppc_check_object_attribute)
  300. - ppc64_check_object_attribute
  301. - __attribute__ ((alias ("ppc_check_object_attribute")));
  302. +bool ppc64_check_object_attribute(Ebl *ebl,
  303. + const char *vendor, int tag, uint64_t value,
  304. + const char **tag_name, const char **value_name)
  305. +{
  306. + return ppc_check_object_attribute(ebl, vendor, tag, value, tag_name, value_name);
  307. +}
  308. --- a/libdwfl/libdwflP.h
  309. +++ b/libdwfl/libdwflP.h
  310. @@ -31,6 +31,8 @@
  311. #include <libdwfl.h>
  312. #include <libebl.h>
  313. +#include <libeu.h>
  314. +#include <libgen.h>
  315. #include <assert.h>
  316. #include <dirent.h>
  317. #include <errno.h>
  318. --- /dev/null
  319. +++ b/lib/stdio_ext.h
  320. @@ -0,0 +1,6 @@
  321. +#include <stdio.h>
  322. +#ifndef __APPLE__
  323. +#include_next <stdio_ext.h>
  324. +#else
  325. +#define __fsetlocking(...) 0
  326. +#endif
  327. --- a/libdw/libdwP.h
  328. +++ b/libdw/libdwP.h
  329. @@ -32,8 +32,10 @@
  330. #include <stdbool.h>
  331. #include <pthread.h>
  332. +#include <libeu.h>
  333. #include <libdw.h>
  334. #include <dwarf.h>
  335. +#include <libgen.h>
  336. /* Known location expressions already decoded. */
  337. --- a/libdw/Makefile.am
  338. +++ b/libdw/Makefile.am
  339. @@ -34,14 +34,12 @@ endif
  340. AM_CPPFLAGS += -I$(srcdir)/../libebl -I$(srcdir)/../libelf -I$(srcdir)/../libdwelf -pthread
  341. VERSION = 1
  342. -lib_LIBRARIES = libdw.a
  343. -noinst_LIBRARIES = libdw_pic.a
  344. -noinst_DATA = $(noinst_LIBRARIES:_pic.a=.so)
  345. +lib_LTLIBRARIES = libdw.la
  346. include_HEADERS = dwarf.h
  347. pkginclude_HEADERS = libdw.h known-dwarf.h
  348. -libdw_a_SOURCES = dwarf_begin.c dwarf_begin_elf.c dwarf_end.c dwarf_getelf.c \
  349. +libdw_la_SOURCES = dwarf_begin.c dwarf_begin_elf.c dwarf_end.c dwarf_getelf.c \
  350. dwarf_getpubnames.c dwarf_getabbrev.c dwarf_tag.c \
  351. dwarf_error.c dwarf_nextcu.c dwarf_diename.c dwarf_offdie.c \
  352. dwarf_attr.c dwarf_formstring.c \
  353. @@ -103,50 +101,12 @@ $(srcdir)/known-dwarf.h: $(top_srcdir)/c
  354. mv -f [email protected] $@
  355. endif
  356. -libdw_pic_a_SOURCES =
  357. -am_libdw_pic_a_OBJECTS = $(libdw_a_SOURCES:.c=.os)
  358. -
  359. -libdw_so_LIBS = ../libebl/libebl_pic.a ../backends/libebl_backends_pic.a \
  360. - ../libcpu/libcpu_pic.a libdw_pic.a ../libdwelf/libdwelf_pic.a \
  361. - ../libdwfl/libdwfl_pic.a
  362. -libdw_so_DEPS = ../lib/libeu.a ../libelf/libelf.so
  363. -libdw_so_LDLIBS = $(libdw_so_DEPS) -ldl -lz $(argp_LDADD) $(fts_LIBS) $(obstack_LIBS) $(zip_LIBS) -pthread
  364. -libdw.so: $(srcdir)/libdw.map $(libdw_so_LIBS) $(libdw_so_DEPS)
  365. - $(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ \
  366. - -Wl,--soname,$@.$(VERSION),--enable-new-dtags \
  367. - -Wl,--version-script,$< \
  368. - $(NO_UNDEFINED) \
  369. - -Wl,--whole-archive $(libdw_so_LIBS) -Wl,--no-whole-archive \
  370. - $(libdw_so_LDLIBS)
  371. - @$(textrel_check)
  372. - $(AM_V_at)ln -fs $@ $@.$(VERSION)
  373. -
  374. -install: install-am libdw.so
  375. - $(mkinstalldirs) $(DESTDIR)$(libdir)
  376. - $(INSTALL_PROGRAM) libdw.so $(DESTDIR)$(libdir)/libdw-$(PACKAGE_VERSION).so
  377. - ln -fs libdw-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)/libdw.so.$(VERSION)
  378. - ln -fs libdw.so.$(VERSION) $(DESTDIR)$(libdir)/libdw.so
  379. -
  380. -uninstall: uninstall-am
  381. - rm -f $(DESTDIR)$(libdir)/libdw-$(PACKAGE_VERSION).so
  382. - rm -f $(DESTDIR)$(libdir)/libdw.so.$(VERSION)
  383. - rm -f $(DESTDIR)$(libdir)/libdw.so
  384. - rmdir --ignore-fail-on-non-empty $(DESTDIR)$(includedir)/elfutils
  385. -
  386. -libdwfl_objects = $(shell $(AR) t ../libdwfl/libdwfl.a)
  387. -libdw_a_LIBADD = $(addprefix ../libdwfl/,$(libdwfl_objects))
  388. -
  389. -libdwelf_objects = $(shell $(AR) t ../libdwelf/libdwelf.a)
  390. -libdw_a_LIBADD += $(addprefix ../libdwelf/,$(libdwelf_objects))
  391. -
  392. -libebl_objects = $(shell $(AR) t ../libebl/libebl.a)
  393. -libdw_a_LIBADD += $(addprefix ../libebl/,$(libebl_objects))
  394. -
  395. -backends_objects = $(shell $(AR) t ../backends/libebl_backends.a)
  396. -libdw_a_LIBADD += $(addprefix ../backends/,$(backends_objects))
  397. -
  398. -libcpu_objects = $(shell $(AR) t ../libcpu/libcpu.a)
  399. -libdw_a_LIBADD += $(addprefix ../libcpu/,$(libcpu_objects))
  400. +libdw_la_LIBADD = \
  401. + ../libdwfl/libdwfl.la \
  402. + ../libdwelf/libdwelf.la \
  403. + ../libebl/libebl.la \
  404. + ../backends/libebl_backends.la \
  405. + ../libcpu/libcpu.la
  406. noinst_HEADERS = libdwP.h memory-access.h dwarf_abbrev_hash.h \
  407. dwarf_sig8_hash.h cfi.h encoded-value.h
  408. --- a/libasm/Makefile.am
  409. +++ b/libasm/Makefile.am
  410. @@ -32,12 +32,10 @@ AM_CPPFLAGS += -I$(top_srcdir)/libelf -I
  411. VERSION = 1
  412. -lib_LIBRARIES = libasm.a
  413. -noinst_LIBRARIES = libasm_pic.a
  414. -noinst_DATA = $(noinst_LIBRARIES:_pic.a=.so)
  415. +lib_LTLIBRARIES = libasm.la
  416. pkginclude_HEADERS = libasm.h
  417. -libasm_a_SOURCES = asm_begin.c asm_abort.c asm_end.c asm_error.c \
  418. +libasm_la_SOURCES = asm_begin.c asm_abort.c asm_end.c asm_error.c \
  419. asm_getelf.c asm_newscn.c asm_newscn_ingrp.c \
  420. asm_newsubscn.c asm_newsym.c asm_newcomsym.c \
  421. asm_newabssym.c \
  422. @@ -51,38 +49,6 @@ libasm_a_SOURCES = asm_begin.c asm_abort
  423. disasm_begin.c disasm_cb.c disasm_end.c disasm_str.c \
  424. symbolhash.c
  425. -libasm_pic_a_SOURCES =
  426. -am_libasm_pic_a_OBJECTS = $(libasm_a_SOURCES:.c=.os)
  427. -
  428. -libasm_so_DEPS = ../lib/libeu.a ../libebl/libebl_pic.a ../libelf/libelf.so ../libdw/libdw.so
  429. -libasm_so_LDLIBS = $(libasm_so_DEPS)
  430. -if USE_LOCKS
  431. -libasm_so_LDLIBS += -lpthread
  432. -endif
  433. -
  434. -libasm_so_LIBS = libasm_pic.a
  435. -libasm.so: $(srcdir)/libasm.map $(libasm_so_LIBS) $(libasm_so_DEPS)
  436. - $(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ \
  437. - -Wl,--soname,$@.$(VERSION) \
  438. - -Wl,--version-script,$< \
  439. - $(NO_UNDEFINED) \
  440. - -Wl,--whole-archive $(libasm_so_LIBS) -Wl,--no-whole-archive \
  441. - $(libasm_so_LDLIBS)
  442. - @$(textrel_check)
  443. - $(AM_V_at)ln -fs $@ $@.$(VERSION)
  444. -
  445. -install: install-am libasm.so
  446. - $(mkinstalldirs) $(DESTDIR)$(libdir)
  447. - $(INSTALL_PROGRAM) libasm.so $(DESTDIR)$(libdir)/libasm-$(PACKAGE_VERSION).so
  448. - ln -fs libasm-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)/libasm.so.$(VERSION)
  449. - ln -fs libasm.so.$(VERSION) $(DESTDIR)$(libdir)/libasm.so
  450. -
  451. -uninstall: uninstall-am
  452. - rm -f $(DESTDIR)$(libdir)/libasm-$(PACKAGE_VERSION).so
  453. - rm -f $(DESTDIR)$(libdir)/libasm.so.$(VERSION)
  454. - rm -f $(DESTDIR)$(libdir)/libasm.so
  455. - rmdir --ignore-fail-on-non-empty $(DESTDIR)$(includedir)/elfutils
  456. -
  457. noinst_HEADERS = libasmP.h symbolhash.h
  458. EXTRA_DIST = libasm.map
  459. --- a/libdwfl/Makefile.am
  460. +++ b/libdwfl/Makefile.am
  461. @@ -34,13 +34,11 @@ AM_CPPFLAGS += -I$(srcdir) -I$(srcdir)/.
  462. -I$(srcdir)/../libdw -I$(srcdir)/../libdwelf -I$(builddir)/../debuginfod
  463. VERSION = 1
  464. -noinst_LIBRARIES = libdwfl.a
  465. -noinst_LIBRARIES += libdwfl_pic.a
  466. +noinst_LTLIBRARIES = libdwfl.la
  467. pkginclude_HEADERS = libdwfl.h
  468. -
  469. -libdwfl_a_SOURCES = dwfl_begin.c dwfl_end.c dwfl_error.c dwfl_version.c \
  470. +libdwfl_la_SOURCES = dwfl_begin.c dwfl_end.c dwfl_error.c dwfl_version.c \
  471. dwfl_module.c dwfl_report_elf.c relocate.c \
  472. dwfl_module_build_id.c dwfl_module_report_build_id.c \
  473. derelocate.c offline.c segment.c \
  474. @@ -73,24 +71,14 @@ libdwfl_a_SOURCES = dwfl_begin.c dwfl_en
  475. gzip.c debuginfod-client.c
  476. if BZLIB
  477. -libdwfl_a_SOURCES += bzip2.c
  478. +libdwfl_la_SOURCES += bzip2.c
  479. endif
  480. if LZMA
  481. -libdwfl_a_SOURCES += lzma.c
  482. +libdwfl_la_SOURCES += lzma.c
  483. endif
  484. if ZSTD
  485. -libdwfl_a_SOURCES += zstd.c
  486. +libdwfl_la_SOURCES += zstd.c
  487. endif
  488. -libdwfl = $(libdw)
  489. -libdw = ../libdw/libdw.so
  490. -libelf = ../libelf/libelf.so
  491. -libebl = ../libebl/libebl.a
  492. -libeu = ../lib/libeu.a
  493. -
  494. -libdwfl_pic_a_SOURCES =
  495. -am_libdwfl_pic_a_OBJECTS = $(libdwfl_a_SOURCES:.c=.os)
  496. -
  497. noinst_HEADERS = libdwflP.h
  498. -CLEANFILES += $(am_libdwfl_pic_a_OBJECTS)
  499. --- a/backends/Makefile.am
  500. +++ b/backends/Makefile.am
  501. @@ -34,7 +34,7 @@ endif
  502. AM_CPPFLAGS += -I$(top_srcdir)/libebl -I$(top_srcdir)/libasm \
  503. -I$(top_srcdir)/libelf -I$(top_srcdir)/libdw
  504. -noinst_LIBRARIES = libebl_backends.a libebl_backends_pic.a
  505. +noinst_LTLIBRARIES = libebl_backends.la
  506. modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \
  507. m68k bpf riscv csky loongarch arc
  508. @@ -102,17 +102,13 @@ loongarch_SRCS = loongarch_init.c loonga
  509. arc_SRCS = arc_init.c arc_symbol.c
  510. -libebl_backends_a_SOURCES = $(i386_SRCS) $(sh_SRCS) $(x86_64_SRCS) \
  511. +libebl_backends_la_SOURCES = $(i386_SRCS) $(sh_SRCS) $(x86_64_SRCS) \
  512. $(ia64_SRCS) $(alpha_SRCS) $(arm_SRCS) \
  513. $(aarch64_SRCS) $(sparc_SRCS) $(ppc_SRCS) \
  514. $(ppc64_SRCS) $(s390_SRCS) \
  515. $(m68k_SRCS) $(bpf_SRCS) $(riscv_SRCS) $(csky_SRCS) \
  516. $(loongarch_SRCS) $(arc_SRCS)
  517. -libebl_backends_pic_a_SOURCES =
  518. -am_libebl_backends_pic_a_OBJECTS = $(libebl_backends_a_SOURCES:.c=.os)
  519. noinst_HEADERS = libebl_CPU.h common-reloc.c linux-core-note.c x86_corenote.c
  520. EXTRA_DIST = $(modules:=_reloc.def)
  521. -
  522. -MOSTLYCLEANFILES = $(am_libebl_backends_pic_a_OBJECTS)
  523. --- a/libdwelf/Makefile.am
  524. +++ b/libdwelf/Makefile.am
  525. @@ -34,24 +34,12 @@ AM_CPPFLAGS += -I$(srcdir)/../libelf -I$
  526. -I$(srcdir)/../libdwfl -I$(srcdir)/../libebl
  527. VERSION = 1
  528. -noinst_LIBRARIES = libdwelf.a libdwelf_pic.a
  529. +noinst_LTLIBRARIES = libdwelf.la
  530. pkginclude_HEADERS = libdwelf.h
  531. noinst_HEADERS = libdwelfP.h
  532. -libdwelf_a_SOURCES = dwelf_elf_gnu_debuglink.c dwelf_dwarf_gnu_debugaltlink.c \
  533. +libdwelf_la_SOURCES = dwelf_elf_gnu_debuglink.c dwelf_dwarf_gnu_debugaltlink.c \
  534. dwelf_elf_gnu_build_id.c dwelf_scn_gnu_compressed_size.c \
  535. dwelf_strtab.c dwelf_elf_begin.c \
  536. dwelf_elf_e_machine_string.c
  537. -
  538. -libdwelf = $(libdw)
  539. -
  540. -libdw = ../libdw/libdw.so
  541. -libelf = ../libelf/libelf.so
  542. -libebl = ../libebl/libebl.a
  543. -libeu = ../lib/libeu.a
  544. -
  545. -libdwelf_pic_a_SOURCES =
  546. -am_libdwelf_pic_a_OBJECTS = $(libdwelf_a_SOURCES:.c=.os)
  547. -
  548. -CLEANFILES += $(am_libdwelf_pic_a_OBJECTS)
  549. --- a/libebl/Makefile.am
  550. +++ b/libebl/Makefile.am
  551. @@ -34,9 +34,9 @@ endif
  552. AM_CPPFLAGS += -I$(srcdir)/../libelf -I$(srcdir)/../libdw -I$(srcdir)/../libasm
  553. VERSION = 1
  554. -noinst_LIBRARIES = libebl.a libebl_pic.a
  555. +noinst_LTLIBRARIES = libebl.la
  556. -libebl_a_SOURCES = eblopenbackend.c eblclosebackend.c eblreloctypename.c \
  557. +libebl_la_SOURCES = eblopenbackend.c eblclosebackend.c eblreloctypename.c \
  558. eblsegmenttypename.c eblsectiontypename.c \
  559. eblmachineflagname.c eblsymboltypename.c \
  560. ebldynamictagname.c eblsectionname.c \
  561. @@ -56,9 +56,4 @@ libebl_a_SOURCES = eblopenbackend.c eblc
  562. eblresolvesym.c eblcheckreloctargettype.c \
  563. ebl_data_marker_symbol.c
  564. -libebl_pic_a_SOURCES =
  565. -am_libebl_pic_a_OBJECTS = $(libebl_a_SOURCES:.c=.os)
  566. -
  567. noinst_HEADERS = libebl.h libeblP.h ebl-hooks.h
  568. -
  569. -MOSTLYCLEANFILES = $(am_libebl_pic_a_OBJECTS)
  570. --- a/debuginfod/Makefile.am
  571. +++ b/debuginfod/Makefile.am
  572. @@ -40,23 +40,12 @@ AM_CPPFLAGS += -I$(srcdir) -I$(srcdir)/.
  573. program_prefix=
  574. program_transform_name = s,x,x,
  575. -if BUILD_STATIC
  576. -libasm = ../libasm/libasm.a
  577. -libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl -lpthread
  578. -libelf = ../libelf/libelf.a -lz
  579. -if DUMMY_LIBDEBUGINFOD
  580. -libdebuginfod = ./libdebuginfod.a
  581. -else
  582. -libdebuginfod = ./libdebuginfod.a -lpthread $(libcurl_LIBS)
  583. -endif
  584. -else
  585. -libasm = ../libasm/libasm.so
  586. -libdw = ../libdw/libdw.so
  587. -libelf = ../libelf/libelf.so
  588. -libdebuginfod = ./libdebuginfod.so
  589. -endif
  590. -libebl = ../libebl/libebl.a
  591. -libeu = ../lib/libeu.a
  592. +libasm = ../libasm/libasm.la
  593. +libdw = ../libdw/libdw.la -lz $(zip_LIBS) $(libelf) $(libebl) -ldl -lpthread
  594. +libelf = ../libelf/libelf.la
  595. +libdebuginfod = ./libdebuginfod.la
  596. +libebl = ../libebl/libebl.la
  597. +libeu = ../lib/libeu.la
  598. AM_LDFLAGS = -Wl,-rpath-link,../libelf:../libdw:.
  599. @@ -76,14 +65,10 @@ debuginfod_find_SOURCES = debuginfod-fin
  600. debuginfod_find_LDADD = $(libdw) $(libelf) $(libeu) $(libdebuginfod) $(argp_LDADD) $(fts_LIBS)
  601. if LIBDEBUGINFOD
  602. -noinst_LIBRARIES = libdebuginfod.a
  603. -noinst_LIBRARIES += libdebuginfod_pic.a
  604. +libdebuginfod_la_SOURCES = debuginfod-client.c
  605. +noinst_LTLIBRARIES = libdebuginfod.la
  606. endif
  607. -libdebuginfod_a_SOURCES = debuginfod-client.c
  608. -libdebuginfod_pic_a_SOURCES = debuginfod-client.c
  609. -am_libdebuginfod_pic_a_OBJECTS = $(libdebuginfod_a_SOURCES:.c=.os)
  610. -
  611. if DUMMY_LIBDEBUGINFOD
  612. AM_CPPFLAGS += -Wno-unused-parameter
  613. endif
  614. @@ -92,42 +77,7 @@ if LIBDEBUGINFOD
  615. pkginclude_HEADERS = debuginfod.h
  616. endif
  617. -if LIBDEBUGINFOD
  618. -libdebuginfod_so_LIBS = libdebuginfod_pic.a
  619. -if DUMMY_LIBDEBUGINFOD
  620. -libdebuginfod_so_LDLIBS =
  621. -else
  622. -libdebuginfod_so_LDLIBS = -lpthread $(libcurl_LIBS) $(fts_LIBS) $(libelf)
  623. -endif
  624. -$(LIBDEBUGINFOD_SONAME): $(srcdir)/libdebuginfod.map $(libdebuginfod_so_LIBS)
  625. - $(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ \
  626. - -Wl,--soname,$(LIBDEBUGINFOD_SONAME) \
  627. - -Wl,--version-script,$< \
  628. - $(NO_UNDEFINED) \
  629. - -Wl,--whole-archive $(libdebuginfod_so_LIBS) -Wl,--no-whole-archive \
  630. - $(libdebuginfod_so_LDLIBS)
  631. - @$(textrel_check)
  632. -
  633. -libdebuginfod.so: $(LIBDEBUGINFOD_SONAME)
  634. - ln -fs $< $@
  635. -
  636. -install: install-am libdebuginfod.so
  637. - $(mkinstalldirs) $(DESTDIR)$(libdir)
  638. - $(INSTALL_PROGRAM) $(LIBDEBUGINFOD_SONAME) \
  639. - $(DESTDIR)$(libdir)/libdebuginfod-$(PACKAGE_VERSION).so
  640. - ln -fs libdebuginfod-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)/$(LIBDEBUGINFOD_SONAME)
  641. - ln -fs libdebuginfod-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)/libdebuginfod.so
  642. -
  643. -uninstall: uninstall-am
  644. - rm -f $(DESTDIR)$(libdir)/libdebuginfod-$(PACKAGE_VERSION).so
  645. - rm -f $(DESTDIR)$(libdir)/$(LIBDEBUGINFOD_SONAME)
  646. - rm -f $(DESTDIR)$(libdir)/libdebuginfod.so
  647. - rmdir --ignore-fail-on-non-empty $(DESTDIR)$(includedir)/elfutils
  648. -endif
  649. -
  650. EXTRA_DIST = libdebuginfod.map
  651. -MOSTLYCLEANFILES = $(am_libdebuginfod_pic_a_OBJECTS) $(LIBDEBUGINFOD_SONAME)
  652. -CLEANFILES += $(am_libdebuginfod_pic_a_OBJECTS) libdebuginfod.so
  653. # automake std-options override: arrange to pass LD_LIBRARY_PATH
  654. installcheck-binPROGRAMS: $(bin_PROGRAMS)
  655. --- a/lib/Makefile.am
  656. +++ b/lib/Makefile.am
  657. @@ -31,9 +31,9 @@ include $(top_srcdir)/config/eu.am
  658. AM_CFLAGS += $(fpic_CFLAGS)
  659. AM_CPPFLAGS += -I$(srcdir)/../libelf
  660. -noinst_LIBRARIES = libeu.a
  661. +noinst_LTLIBRARIES = libeu.la
  662. -libeu_a_SOURCES = xasprintf.c xstrdup.c xstrndup.c xmalloc.c next_prime.c \
  663. +libeu_la_SOURCES = xasprintf.c xstrdup.c xstrndup.c xmalloc.c next_prime.c \
  664. crc32.c crc32_file.c \
  665. color.c error.c printversion.c
  666. --- a/src/Makefile.am
  667. +++ b/src/Makefile.am
  668. @@ -29,9 +29,9 @@ bin_PROGRAMS = readelf nm size strip elf
  669. elfcmp objdump ranlib strings ar unstrip stack elfcompress \
  670. elfclassify srcfiles
  671. -noinst_LIBRARIES = libar.a
  672. +noinst_LTLIBRARIES = libar.la
  673. -libar_a_SOURCES = arlib.c arlib2.c arlib-argp.c
  674. +libar_la_SOURCES = arlib.c arlib2.c arlib-argp.c
  675. EXTRA_DIST = arlib.h debugpred.h
  676. @@ -39,27 +39,16 @@ bin_SCRIPTS = make-debug-archive
  677. EXTRA_DIST += make-debug-archive.in
  678. CLEANFILES += make-debug-archive
  679. -if BUILD_STATIC
  680. -libasm = ../libasm/libasm.a
  681. -libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) -ldl -lpthread
  682. -libelf = ../libelf/libelf.a -lz $(zstd_LIBS)
  683. +libasm = ../libasm/libasm.la
  684. +libdw = ../libdw/libdw.la -lz $(zip_LIBS) $(libelf) -ldl -lpthread
  685. +libelf = ../libelf/libelf.la -lz $(zstd_LIBS)
  686. if LIBDEBUGINFOD
  687. -libdebuginfod = ../debuginfod/libdebuginfod.a -lpthread $(libcurl_LIBS)
  688. +libdebuginfod = ../debuginfod/libdebuginfod.la -lpthread $(libcurl_LIBS)
  689. else
  690. libdebuginfod =
  691. endif
  692. -else
  693. -libasm = ../libasm/libasm.so
  694. -libdw = ../libdw/libdw.so
  695. -libelf = ../libelf/libelf.so
  696. -if LIBDEBUGINFOD
  697. -libdebuginfod = ../debuginfod/libdebuginfod.so
  698. -else
  699. -libdebuginfod =
  700. -endif
  701. -endif
  702. -libebl = ../libebl/libebl.a ../backends/libebl_backends.a ../libcpu/libcpu.a
  703. -libeu = ../lib/libeu.a
  704. +libebl = ../libebl/libebl.la ../backends/libebl_backends.la ../libcpu/libcpu.la
  705. +libeu = ../lib/libeu.la
  706. if DEMANGLE
  707. demanglelib = -lstdc++
  708. @@ -87,9 +76,9 @@ findtextrel_LDADD = $(libdw) $(libelf) $
  709. addr2line_LDADD = $(libdw) $(libelf) $(libeu) $(argp_LDADD) $(demanglelib)
  710. elfcmp_LDADD = $(libebl) $(libdw) $(libelf) $(libeu) $(argp_LDADD)
  711. objdump_LDADD = $(libasm) $(libebl) $(libdw) $(libelf) $(libeu) $(argp_LDADD)
  712. -ranlib_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD) $(obstack_LIBS)
  713. +ranlib_LDADD = libar.la $(libelf) $(libeu) $(argp_LDADD) $(obstack_LIBS)
  714. strings_LDADD = $(libelf) $(libeu) $(argp_LDADD)
  715. -ar_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD) $(obstack_LIBS)
  716. +ar_LDADD = libar.la $(libelf) $(libeu) $(argp_LDADD) $(obstack_LIBS)
  717. unstrip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD)
  718. stack_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) $(demanglelib)
  719. elfcompress_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD)
  720. --- a/tests/Makefile.am
  721. +++ b/tests/Makefile.am
  722. @@ -689,17 +689,11 @@ installcheck-local:
  723. TESTS_ENVIRONMENT="$(installed_TESTS_ENVIRONMENT)" \
  724. LOG_COMPILER="$(installed_LOG_COMPILER)" check-TESTS
  725. -if BUILD_STATIC
  726. -libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl -lpthread
  727. -libelf = ../libelf/libelf.a -lz $(zstd_LIBS)
  728. -libasm = ../libasm/libasm.a
  729. -else
  730. -libdw = ../libdw/libdw.so
  731. -libelf = ../libelf/libelf.so
  732. -libasm = ../libasm/libasm.so
  733. -endif
  734. -libebl = ../libebl/libebl.a ../backends/libebl_backends.a ../libcpu/libcpu.a
  735. -libeu = ../lib/libeu.a
  736. +libdw = ../libdw/libdw.la -lz $(zip_LIBS) $(libelf) $(libebl) -ldl -lpthread
  737. +libelf = ../libelf/libelf.la
  738. +libasm = ../libasm/libasm.la
  739. +libebl = ../libebl/libebl.la ../backends/libebl_backends.la ../libcpu/libcpu.la
  740. +libeu = ../lib/libeu.la
  741. arextract_LDADD = $(libelf)
  742. arsymtest_LDADD = $(libelf)
  743. --- a/libcpu/Makefile.am
  744. +++ b/libcpu/Makefile.am
  745. @@ -38,19 +38,16 @@ LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAG
  746. LEX_OUTPUT_ROOT = lex.$(<F:lex.l=)
  747. AM_YFLAGS = -p$(<F:parse.y=)
  748. -noinst_LIBRARIES = libcpu.a libcpu_pic.a
  749. +noinst_LTLIBRARIES = libcpu.la
  750. noinst_HEADERS = i386_dis.h i386_mne.h x86_64_dis.h
  751. -libcpu_a_SOURCES = i386_disasm.c x86_64_disasm.c bpf_disasm.c riscv_disasm.c
  752. -
  753. -libcpu_pic_a_SOURCES =
  754. -am_libcpu_pic_a_OBJECTS = $(libcpu_a_SOURCES:.c=.os)
  755. +libcpu_la_SOURCES = i386_disasm.c x86_64_disasm.c bpf_disasm.c riscv_disasm.c
  756. i386_gendis_SOURCES = i386_gendis.c i386_lex.l i386_parse.y
  757. -i386_disasm.o: i386.mnemonics $(srcdir)/i386_dis.h
  758. -x86_64_disasm.o: x86_64.mnemonics $(srcdir)/x86_64_dis.h
  759. +$(libcpu_la_OBJECTS): i386.mnemonics $(srcdir)/i386_dis.h
  760. +$(libcpu_la_OBJECTS): x86_64.mnemonics $(srcdir)/x86_64_dis.h
  761. %_defs: $(srcdir)/defs/i386
  762. $(AM_V_GEN)m4 -D$* -DDISASSEMBLER $< > $@T
  763. @@ -87,20 +84,15 @@ endif
  764. i386_lex_no_Werror = yes
  765. -libeu = ../lib/libeu.a
  766. +libeu = ../lib/libeu.la
  767. i386_lex_CFLAGS = -Wno-unused-label -Wno-unused-function -Wno-sign-compare \
  768. -Wno-implicit-fallthrough
  769. -i386_parse.o: i386_parse.c i386.mnemonics
  770. -i386_lex.o: i386_parse.h
  771. i386_gendis_LDADD = $(libeu) -lm $(obstack_LIBS)
  772. -i386_parse.h: i386_parse.c ;
  773. -
  774. bpf_disasm_CFLAGS = -Wno-format-nonliteral
  775. EXTRA_DIST = defs/i386
  776. -MOSTLYCLEANFILES = $(am_libcpu_pic_a_OBJECTS)
  777. CLEANFILES += $(foreach P,i386 x86_64,$P_defs $P.mnemonics)
  778. MAINTAINERCLEANFILES = $(foreach P,i386 x86_64, $P_dis.h)
  779. --- a/config/libelf.pc.in
  780. +++ b/config/libelf.pc.in
  781. @@ -8,7 +8,7 @@ Description: elfutils libelf library to
  782. Version: @VERSION@
  783. URL: http://elfutils.org/
  784. -Libs: -L${libdir} -lelf
  785. +Libs: -L${libdir} -lelf -lz
  786. Cflags: -I${includedir}
  787. Requires.private: zlib @LIBZSTD@
  788. --- a/lib/next_prime.c
  789. +++ b/lib/next_prime.c
  790. @@ -27,6 +27,7 @@
  791. the GNU Lesser General Public License along with this program. If
  792. not, see <http://www.gnu.org/licenses/>. */
  793. +#include <config.h>
  794. #include <stddef.h>
  795. --- a/libdw/libdwP.h
  796. +++ b/libdw/libdwP.h
  797. @@ -35,7 +35,7 @@
  798. #include <libeu.h>
  799. #include <libdw.h>
  800. #include <dwarf.h>
  801. -#include <libgen.h>
  802. +#include <dirname.h>
  803. /* Known location expressions already decoded. */
  804. --- a/libdwfl/libdwflP.h
  805. +++ b/libdwfl/libdwflP.h
  806. @@ -32,7 +32,7 @@
  807. #include <libdwfl.h>
  808. #include <libebl.h>
  809. #include <libeu.h>
  810. -#include <libgen.h>
  811. +#include <dirname.h>
  812. #include <assert.h>
  813. #include <dirent.h>
  814. #include <errno.h>