You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1869 lines
62 KiB

  1. --- elfutils/backends/ChangeLog
  2. +++ elfutils/backends/ChangeLog
  3. @@ -413,6 +413,10 @@
  4. * ppc_attrs.c (ppc_check_object_attribute): Handle tag
  5. GNU_Power_ABI_Struct_Return.
  6. +2009-01-23 Roland McGrath <roland@redhat.com>
  7. +
  8. + * Makefile.am (libebl_%.so): Use $(LD_AS_NEEDED).
  9. +
  10. 2008-10-04 Ulrich Drepper <drepper@redhat.com>
  11. * i386_reloc.def: Fix entries for TLS_GOTDESC, TLS_DESC_CALL, and
  12. @@ -740,6 +744,11 @@
  13. * sparc_init.c: Likewise.
  14. * x86_64_init.c: Likewise.
  15. +2005-11-22 Roland McGrath <roland@redhat.com>
  16. +
  17. + * Makefile.am (LD_AS_NEEDED): New variable, substituted by configure.
  18. + (libebl_%.so rule): Use it in place of -Wl,--as-needed.
  19. +
  20. 2005-11-19 Roland McGrath <roland@redhat.com>
  21. * ppc64_reloc.def: REL30 -> ADDR30.
  22. @@ -762,6 +771,9 @@
  23. * Makefile.am (uninstall): Don't try to remove $(pkgincludedir).
  24. (CLEANFILES): Add libebl_$(m).so.
  25. + * Makefile.am (WEXTRA): New variable, substituted by configure.
  26. + (AM_CFLAGS): Use it in place of -Wextra.
  27. +
  28. * ppc_reloc.def: Update bits per Alan Modra <amodra@bigpond.net.au>.
  29. * ppc64_reloc.def: Likewise.
  30. --- elfutils/backends/Makefile.am
  31. +++ elfutils/backends/Makefile.am
  32. @@ -119,7 +119,7 @@ libebl_%.so libebl_%.map: libebl_%_pic.a
  33. $(LINK) -shared -o $(@:.map=.so) \
  34. -Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \
  35. -Wl,--version-script,$(@:.so=.map) \
  36. - -Wl,-z,defs -Wl,--as-needed $(libelf) $(libdw)
  37. + -Wl,-z,defs $(LD_AS_NEEDED) $(libelf) $(libdw)
  38. $(textrel_check)
  39. libebl_i386.so: $(cpu_i386)
  40. --- elfutils/backends/Makefile.in
  41. +++ elfutils/backends/Makefile.in
  42. @@ -83,6 +83,7 @@ host_triplet = @host@
  43. DIST_COMMON = $(top_srcdir)/config/eu.am $(srcdir)/Makefile.in \
  44. $(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \
  45. $(noinst_HEADERS) ChangeLog
  46. +@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror)
  47. subdir = backends
  48. ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
  49. am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \
  50. @@ -285,6 +286,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
  51. INSTALL_SCRIPT = @INSTALL_SCRIPT@
  52. INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
  53. LDFLAGS = @LDFLAGS@
  54. +LD_AS_NEEDED = @LD_AS_NEEDED@
  55. LEX = @LEX@
  56. LEXLIB = @LEXLIB@
  57. LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
  58. @@ -316,6 +318,7 @@ SHELL = @SHELL@
  59. STRIP = @STRIP@
  60. USE_NLS = @USE_NLS@
  61. VERSION = @VERSION@
  62. +WEXTRA = @WEXTRA@
  63. XGETTEXT = @XGETTEXT@
  64. XGETTEXT_015 = @XGETTEXT_015@
  65. XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
  66. @@ -378,11 +381,11 @@ zip_LIBS = @zip_LIBS@
  67. AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. \
  68. -I$(top_srcdir)/libebl -I$(top_srcdir)/libasm \
  69. -I$(top_srcdir)/libelf -I$(top_srcdir)/libdw
  70. -AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \
  71. - $(if $($(*F)_no_Werror),,-Werror) \
  72. - $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
  73. - $($(*F)_CFLAGS)
  74. -
  75. +AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
  76. + $($(*F)_no_Werror),,-Werror) $(if \
  77. + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
  78. + $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
  79. + $(am__append_1)
  80. COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage, $(COMPILE))
  81. CLEANFILES = *.gcno *.gcda $(foreach m,$(modules), libebl_$(m).map \
  82. libebl_$(m).so $(am_libebl_$(m)_pic_a_OBJECTS))
  83. @@ -885,7 +888,7 @@ libebl_%.so libebl_%.map: libebl_%_pic.a
  84. $(LINK) -shared -o $(@:.map=.so) \
  85. -Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \
  86. -Wl,--version-script,$(@:.so=.map) \
  87. - -Wl,-z,defs -Wl,--as-needed $(libelf) $(libdw)
  88. + -Wl,-z,defs $(LD_AS_NEEDED) $(libelf) $(libdw)
  89. $(textrel_check)
  90. libebl_i386.so: $(cpu_i386)
  91. --- elfutils/ChangeLog
  92. +++ elfutils/ChangeLog
  93. @@ -170,6 +170,8 @@
  94. 2012-01-24 Mark Wielaard <mjw@redhat.com>
  95. + * configure.ac: Wrap AC_COMPILE_IFELSE sources in AC_LANG_SOURCE.
  96. +
  97. * COPYING: Fix address. Updated version from gnulib.
  98. 2012-01-23 Mark Wielaard <mjw@redhat.com>
  99. @@ -188,6 +190,9 @@
  100. 2011-10-08 Mike Frysinger <vapier@gentoo.org>
  101. + * configure.ac (--disable-werror): Handle it, controlling BUILD_WERROR
  102. + automake option.
  103. +
  104. * configure.ac: Fix use of AC_ARG_ENABLE to handle $enableval correctly.
  105. 2011-10-02 Ulrich Drepper <drepper@gmail.com>
  106. @@ -209,6 +214,10 @@
  107. * configure.ac (LOCALEDIR, DATADIRNAME): Removed.
  108. +2009-11-22 Roland McGrath <roland@redhat.com>
  109. +
  110. + * configure.ac: Use sed and expr instead of modern bash extensions.
  111. +
  112. 2009-09-21 Ulrich Drepper <drepper@redhat.com>
  113. * configure.ac: Update for more modern autoconf.
  114. @@ -217,6 +226,10 @@
  115. * configure.ac (zip_LIBS): Check for liblzma too.
  116. +2009-08-17 Roland McGrath <roland@redhat.com>
  117. +
  118. + * configure.ac: Check for -fgnu89-inline; add it to WEXTRA if it works.
  119. +
  120. 2009-04-19 Roland McGrath <roland@redhat.com>
  121. * configure.ac (eu_version): Round down here, not in version.h macros.
  122. @@ -228,6 +241,8 @@
  123. 2009-01-23 Roland McGrath <roland@redhat.com>
  124. + * configure.ac: Check for __builtin_popcount.
  125. +
  126. * configure.ac (zlib check): Check for gzdirect, need zlib >= 1.2.2.3.
  127. * configure.ac (__thread check): Use AC_LINK_IFELSE, in case of
  128. @@ -308,6 +323,10 @@
  129. * configure.ac: Add dummy automake conditional to get dependencies
  130. for non-generic linker right. See src/Makefile.am.
  131. +2005-11-22 Roland McGrath <roland@redhat.com>
  132. +
  133. + * configure.ac: Check for --as-needed linker option.
  134. +
  135. 2005-11-18 Roland McGrath <roland@redhat.com>
  136. * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New variable.
  137. @@ -355,6 +374,17 @@
  138. * Makefile.am (all_SUBDIRS): Add libdwfl.
  139. * configure.ac: Write libdwfl/Makefile.
  140. +2005-05-31 Roland McGrath <roland@redhat.com>
  141. +
  142. + * configure.ac (WEXTRA): Check for -Wextra and set this substitution.
  143. +
  144. + * configure.ac: Check for struct stat st_?tim members.
  145. + * src/strip.c (process_file): Use st_?time if st_?tim are not there.
  146. +
  147. + * configure.ac: Check for futimes function.
  148. + * src/strip.c (handle_elf) [! HAVE_FUTIMES]: Use utimes instead.
  149. + (handle_ar) [! HAVE_FUTIMES]: Likewise.
  150. +
  151. 2005-05-19 Roland McGrath <roland@redhat.com>
  152. * configure.ac [AH_BOTTOM] (INTDECL, _INTDECL): New macros.
  153. --- elfutils/config/ChangeLog
  154. +++ elfutils/config/ChangeLog
  155. @@ -62,6 +62,10 @@
  156. * known-dwarf.awk: Use gawk.
  157. +2011-10-08 Mike Frysinger <vapier@gentoo.org>
  158. +
  159. + * eu.am [BUILD_WERROR]: Conditionalize -Werror use on this.
  160. +
  161. 2010-07-02 Ulrich Drepper <drepper@redhat.com>
  162. * elfutils.spec.in: Add more BuildRequires.
  163. --- elfutils/config/eu.am
  164. +++ elfutils/config/eu.am
  165. @@ -1,6 +1,6 @@
  166. ## Common automake fragments for elfutils subdirectory makefiles.
  167. ##
  168. -## Copyright (C) 2010, 2014 Red Hat, Inc.
  169. +## Copyright (C) 2010-2011, 2014 Red Hat, Inc.
  170. ##
  171. ## This file is part of elfutils.
  172. ##
  173. @@ -29,13 +29,21 @@
  174. ## not, see <http://www.gnu.org/licenses/>.
  175. ##
  176. +WEXTRA = @WEXTRA@
  177. +LD_AS_NEEDED = @LD_AS_NEEDED@
  178. +
  179. DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DLOCALEDIR='"${localedir}"'
  180. AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I..
  181. -AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \
  182. +AM_CFLAGS = -std=gnu99 -Wall -Wshadow \
  183. $(if $($(*F)_no_Werror),,-Werror) \
  184. - $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
  185. + $(if $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) \
  186. + $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2) \
  187. $($(*F)_CFLAGS)
  188. +if BUILD_WERROR
  189. +AM_CFLAGS += $(if $($(*F)_no_Werror),,-Werror)
  190. +endif
  191. +
  192. COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage, $(COMPILE))
  193. %.os: %.c %.o
  194. --- elfutils/config/Makefile.in
  195. +++ elfutils/config/Makefile.in
  196. @@ -146,6 +146,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
  197. INSTALL_SCRIPT = @INSTALL_SCRIPT@
  198. INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
  199. LDFLAGS = @LDFLAGS@
  200. +LD_AS_NEEDED = @LD_AS_NEEDED@
  201. LEX = @LEX@
  202. LEXLIB = @LEXLIB@
  203. LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
  204. @@ -177,6 +178,7 @@ SHELL = @SHELL@
  205. STRIP = @STRIP@
  206. USE_NLS = @USE_NLS@
  207. VERSION = @VERSION@
  208. +WEXTRA = @WEXTRA@
  209. XGETTEXT = @XGETTEXT@
  210. XGETTEXT_015 = @XGETTEXT_015@
  211. XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
  212. --- elfutils/config.h.in
  213. +++ elfutils/config.h.in
  214. @@ -3,6 +3,9 @@
  215. /* Should ar and ranlib use -D behavior by default? */
  216. #undef DEFAULT_AR_DETERMINISTIC
  217. +/* Have __builtin_popcount. */
  218. +#undef HAVE_BUILTIN_POPCOUNT
  219. +
  220. /* Define to 1 if you have the <inttypes.h> header file. */
  221. #undef HAVE_INTTYPES_H
  222. @@ -102,4 +105,7 @@
  223. /* Define for large files, on AIX-style hosts. */
  224. #undef _LARGE_FILES
  225. +/* Stubbed out if missing compiler support. */
  226. +#undef __thread
  227. +
  228. #include <eu-config.h>
  229. --- elfutils/configure
  230. +++ elfutils/configure
  231. @@ -661,6 +661,8 @@ ZLIB_TRUE
  232. LIBEBL_SUBDIR
  233. TESTS_RPATH_FALSE
  234. TESTS_RPATH_TRUE
  235. +BUILD_WERROR_FALSE
  236. +BUILD_WERROR_TRUE
  237. BUILD_STATIC_FALSE
  238. BUILD_STATIC_TRUE
  239. USE_VALGRIND_FALSE
  240. @@ -676,6 +678,8 @@ NEVER_TRUE
  241. base_cpu
  242. NATIVE_LD_FALSE
  243. NATIVE_LD_TRUE
  244. +LD_AS_NEEDED
  245. +WEXTRA
  246. NM
  247. READELF
  248. ac_ct_AR
  249. @@ -796,6 +800,7 @@ enable_debugpred
  250. enable_gprof
  251. enable_gcov
  252. enable_valgrind
  253. +enable_werror
  254. enable_tests_rpath
  255. enable_libebl_subdir
  256. with_zlib
  257. @@ -1452,6 +1457,7 @@ Optional Features:
  258. --enable-gprof build binaries with gprof support
  259. --enable-gcov build binaries with gcov support
  260. --enable-valgrind run all tests under valgrind
  261. + --disable-werror do not build with -Werror
  262. --enable-tests-rpath build $ORIGIN-using rpath into tests
  263. --enable-libebl-subdir=DIR
  264. install libebl_CPU modules in $(libdir)/DIR
  265. @@ -4728,6 +4734,130 @@ if test "x$ac_cv_c99" != xyes; then :
  266. as_fn_error $? "gcc with C99 support required" "$LINENO" 5
  267. fi
  268. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra option to $CC" >&5
  269. +$as_echo_n "checking for -Wextra option to $CC... " >&6; }
  270. +if ${ac_cv_cc_wextra+:} false; then :
  271. + $as_echo_n "(cached) " >&6
  272. +else
  273. + old_CFLAGS="$CFLAGS"
  274. +CFLAGS="$CFLAGS -Wextra"
  275. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  276. +/* end confdefs.h. */
  277. +void foo (void) { }
  278. +_ACEOF
  279. +if ac_fn_c_try_compile "$LINENO"; then :
  280. + ac_cv_cc_wextra=yes
  281. +else
  282. + ac_cv_cc_wextra=no
  283. +fi
  284. +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  285. +CFLAGS="$old_CFLAGS"
  286. +fi
  287. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_wextra" >&5
  288. +$as_echo "$ac_cv_cc_wextra" >&6; }
  289. +
  290. +if test "x$ac_cv_cc_wextra" = xyes; then :
  291. + WEXTRA=-Wextra
  292. +else
  293. + WEXTRA=-W
  294. +fi
  295. +
  296. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fgnu89-inline option to $CC" >&5
  297. +$as_echo_n "checking for -fgnu89-inline option to $CC... " >&6; }
  298. +if ${ac_cv_cc_gnu89_inline+:} false; then :
  299. + $as_echo_n "(cached) " >&6
  300. +else
  301. + old_CFLAGS="$CFLAGS"
  302. +CFLAGS="$CFLAGS -fgnu89-inline -Werror"
  303. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  304. +/* end confdefs.h. */
  305. +
  306. +void foo (void)
  307. +{
  308. + inline void bar (void) {}
  309. + bar ();
  310. +}
  311. +extern inline void baz (void) {}
  312. +
  313. +_ACEOF
  314. +if ac_fn_c_try_compile "$LINENO"; then :
  315. + ac_cv_cc_gnu89_inline=yes
  316. +else
  317. + ac_cv_cc_gnu89_inline=no
  318. +fi
  319. +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  320. +CFLAGS="$old_CFLAGS"
  321. +fi
  322. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_gnu89_inline" >&5
  323. +$as_echo "$ac_cv_cc_gnu89_inline" >&6; }
  324. +if test "x$ac_cv_cc_gnu89_inline" = xyes; then :
  325. + WEXTRA="${WEXTRA:+$WEXTRA }-fgnu89-inline"
  326. +fi
  327. +
  328. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --as-needed linker option" >&5
  329. +$as_echo_n "checking for --as-needed linker option... " >&6; }
  330. +if ${ac_cv_as_needed+:} false; then :
  331. + $as_echo_n "(cached) " >&6
  332. +else
  333. + cat > conftest.c <<EOF
  334. +int main (void) { return 0; }
  335. +EOF
  336. +if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
  337. + -fPIC -shared -o conftest.so conftest.c
  338. + -Wl,--as-needed 1>&5'
  339. + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
  340. + (eval $ac_try) 2>&5
  341. + ac_status=$?
  342. + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  343. + test $ac_status = 0; }; }
  344. +then
  345. + ac_cv_as_needed=yes
  346. +else
  347. + ac_cv_as_needed=no
  348. +fi
  349. +rm -f conftest*
  350. +fi
  351. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_as_needed" >&5
  352. +$as_echo "$ac_cv_as_needed" >&6; }
  353. +if test "x$ac_cv_as_needed" = xyes; then :
  354. + LD_AS_NEEDED=-Wl,--as-needed
  355. +else
  356. + LD_AS_NEEDED=
  357. +fi
  358. +
  359. +
  360. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_popcount" >&5
  361. +$as_echo_n "checking for __builtin_popcount... " >&6; }
  362. +if ${ac_cv_popcount+:} false; then :
  363. + $as_echo_n "(cached) " >&6
  364. +else
  365. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  366. +/* end confdefs.h. */
  367. +
  368. +int
  369. +main ()
  370. +{
  371. +exit (__builtin_popcount (127));
  372. + ;
  373. + return 0;
  374. +}
  375. +_ACEOF
  376. +if ac_fn_c_try_link "$LINENO"; then :
  377. + ac_cv_popcount=yes
  378. +else
  379. + ac_cv_popcount=no
  380. +fi
  381. +rm -f core conftest.err conftest.$ac_objext \
  382. + conftest$ac_exeext conftest.$ac_ext
  383. +fi
  384. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_popcount" >&5
  385. +$as_echo "$ac_cv_popcount" >&6; }
  386. +if test "x$ac_cv_popcount" = xyes; then :
  387. +
  388. +$as_echo "#define HAVE_BUILTIN_POPCOUNT 1" >>confdefs.h
  389. +
  390. +fi
  391. +
  392. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __thread support" >&5
  393. $as_echo_n "checking for __thread support... " >&6; }
  394. if ${ac_cv_tls+:} false; then :
  395. @@ -4764,7 +4894,13 @@ fi
  396. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tls" >&5
  397. $as_echo "$ac_cv_tls" >&6; }
  398. if test "x$ac_cv_tls" != xyes; then :
  399. - as_fn_error $? "__thread support required" "$LINENO" 5
  400. + if test "$use_locks" = yes; then :
  401. + as_fn_error $? "--enable-thread-safety requires __thread support" "$LINENO" 5
  402. +else
  403. +
  404. +$as_echo "#define __thread /* empty: no multi-thread support */" >>confdefs.h
  405. +
  406. +fi
  407. fi
  408. # Check whether --enable-largefile was given.
  409. @@ -5131,6 +5267,22 @@ else
  410. fi
  411. +# Check whether --enable-werror was given.
  412. +if test "${enable_werror+set}" = set; then :
  413. + enableval=$enable_werror; enable_werror=$enableval
  414. +else
  415. + enable_werror=yes
  416. +fi
  417. +
  418. + if test "$enable_werror" = yes; then
  419. + BUILD_WERROR_TRUE=
  420. + BUILD_WERROR_FALSE='#'
  421. +else
  422. + BUILD_WERROR_TRUE='#'
  423. + BUILD_WERROR_FALSE=
  424. +fi
  425. +
  426. +
  427. # Check whether --enable-tests-rpath was given.
  428. if test "${enable_tests_rpath+set}" = set; then :
  429. enableval=$enable_tests_rpath; tests_use_rpath=$enableval
  430. @@ -5854,7 +6006,7 @@ case "$eu_version" in
  431. esac
  432. # Round up to the next release API (x.y) version.
  433. -eu_version=$(( (eu_version + 999) / 1000 ))
  434. +eu_version=`expr \( $eu_version + 999 \) / 1000`
  435. ac_ext=c
  436. ac_cpp='$CPP $CPPFLAGS'
  437. @@ -6600,6 +6752,10 @@ if test -z "${BUILD_STATIC_TRUE}" && tes
  438. as_fn_error $? "conditional \"BUILD_STATIC\" was never defined.
  439. Usually this means the macro was only invoked conditionally." "$LINENO" 5
  440. fi
  441. +if test -z "${BUILD_WERROR_TRUE}" && test -z "${BUILD_WERROR_FALSE}"; then
  442. + as_fn_error $? "conditional \"BUILD_WERROR\" was never defined.
  443. +Usually this means the macro was only invoked conditionally." "$LINENO" 5
  444. +fi
  445. if test -z "${TESTS_RPATH_TRUE}" && test -z "${TESTS_RPATH_FALSE}"; then
  446. as_fn_error $? "conditional \"TESTS_RPATH\" was never defined.
  447. Usually this means the macro was only invoked conditionally." "$LINENO" 5
  448. --- elfutils/configure.ac
  449. +++ elfutils/configure.ac
  450. @@ -89,6 +89,54 @@ CFLAGS="$old_CFLAGS"])
  451. AS_IF([test "x$ac_cv_c99" != xyes],
  452. AC_MSG_ERROR([gcc with C99 support required]))
  453. +AC_CACHE_CHECK([for -Wextra option to $CC], ac_cv_cc_wextra, [dnl
  454. +old_CFLAGS="$CFLAGS"
  455. +CFLAGS="$CFLAGS -Wextra"
  456. +AC_COMPILE_IFELSE([AC_LANG_SOURCE([void foo (void) { }])],
  457. + ac_cv_cc_wextra=yes, ac_cv_cc_wextra=no)
  458. +CFLAGS="$old_CFLAGS"])
  459. +AC_SUBST(WEXTRA)
  460. +AS_IF([test "x$ac_cv_cc_wextra" = xyes], [WEXTRA=-Wextra], [WEXTRA=-W])
  461. +
  462. +AC_CACHE_CHECK([for -fgnu89-inline option to $CC], ac_cv_cc_gnu89_inline, [dnl
  463. +old_CFLAGS="$CFLAGS"
  464. +CFLAGS="$CFLAGS -fgnu89-inline -Werror"
  465. +AC_COMPILE_IFELSE([AC_LANG_SOURCE([
  466. +void foo (void)
  467. +{
  468. + inline void bar (void) {}
  469. + bar ();
  470. +}
  471. +extern inline void baz (void) {}
  472. +])], ac_cv_cc_gnu89_inline=yes, ac_cv_cc_gnu89_inline=no)
  473. +CFLAGS="$old_CFLAGS"])
  474. +AS_IF([test "x$ac_cv_cc_gnu89_inline" = xyes],
  475. + [WEXTRA="${WEXTRA:+$WEXTRA }-fgnu89-inline"])
  476. +
  477. +AC_CACHE_CHECK([for --as-needed linker option],
  478. + ac_cv_as_needed, [dnl
  479. +cat > conftest.c <<EOF
  480. +int main (void) { return 0; }
  481. +EOF
  482. +if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
  483. + -fPIC -shared -o conftest.so conftest.c
  484. + -Wl,--as-needed 1>&AS_MESSAGE_LOG_FD])
  485. +then
  486. + ac_cv_as_needed=yes
  487. +else
  488. + ac_cv_as_needed=no
  489. +fi
  490. +rm -f conftest*])
  491. +AS_IF([test "x$ac_cv_as_needed" = xyes],
  492. + [LD_AS_NEEDED=-Wl,--as-needed], [LD_AS_NEEDED=])
  493. +AC_SUBST(LD_AS_NEEDED)
  494. +
  495. +AC_CACHE_CHECK([for __builtin_popcount], ac_cv_popcount, [dnl
  496. +AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[exit (__builtin_popcount (127));]])],
  497. + ac_cv_popcount=yes, ac_cv_popcount=no)])
  498. +AS_IF([test "x$ac_cv_popcount" = xyes],
  499. + [AC_DEFINE([HAVE_BUILTIN_POPCOUNT], [1], [Have __builtin_popcount.])])
  500. +
  501. AC_CACHE_CHECK([for __thread support], ac_cv_tls, [dnl
  502. # Use the same flags that we use for our DSOs, so the test is representative.
  503. # Some old compiler/linker/libc combinations fail some ways and not others.
  504. @@ -104,7 +152,10 @@ static __thread int a; int foo (int b) {
  505. CFLAGS="$save_CFLAGS"
  506. LDFLAGS="$save_LDFLAGS"])
  507. AS_IF([test "x$ac_cv_tls" != xyes],
  508. - AC_MSG_ERROR([__thread support required]))
  509. + [AS_IF([test "$use_locks" = yes],
  510. + [AC_MSG_ERROR([--enable-thread-safety requires __thread support])],
  511. + [AC_DEFINE([__thread], [/* empty: no multi-thread support */],
  512. + [Stubbed out if missing compiler support.])])])
  513. dnl This test must come as early as possible after the compiler configuration
  514. dnl tests, because the choice of the file model can (in principle) affect
  515. @@ -183,6 +234,11 @@ AM_CONDITIONAL(USE_VALGRIND, test "$use_
  516. AM_CONDITIONAL(BUILD_STATIC, [dnl
  517. test "$use_gprof" = yes -o "$use_gcov" = yes])
  518. +AC_ARG_ENABLE([werror],
  519. +AS_HELP_STRING([--disable-werror],[do not build with -Werror]),
  520. + [enable_werror=$enableval], [enable_werror=yes])
  521. +AM_CONDITIONAL(BUILD_WERROR, test "$enable_werror" = yes)
  522. +
  523. AC_ARG_ENABLE([tests-rpath],
  524. AS_HELP_STRING([--enable-tests-rpath],[build $ORIGIN-using rpath into tests]),
  525. [tests_use_rpath=$enableval], [tests_use_rpath=no])
  526. @@ -297,7 +353,7 @@ case "$eu_version" in
  527. esac
  528. # Round up to the next release API (x.y) version.
  529. -eu_version=$(( (eu_version + 999) / 1000 ))
  530. +eu_version=`expr \( $eu_version + 999 \) / 1000`
  531. AC_CHECK_SIZEOF(long)
  532. --- elfutils/lib/ChangeLog
  533. +++ elfutils/lib/ChangeLog
  534. @@ -65,6 +65,9 @@
  535. 2009-01-23 Roland McGrath <roland@redhat.com>
  536. + * eu-config.h [! HAVE_BUILTIN_POPCOUNT]
  537. + (__builtin_popcount): New inline function.
  538. +
  539. * eu-config.h: Add multiple inclusion protection.
  540. 2009-01-17 Ulrich Drepper <drepper@redhat.com>
  541. @@ -121,6 +124,11 @@
  542. * Makefile.am (libeu_a_SOURCES): Add it.
  543. * system.h: Declare crc32_file.
  544. +2005-02-07 Roland McGrath <roland@redhat.com>
  545. +
  546. + * Makefile.am (WEXTRA): New variable, substituted by configure.
  547. + (AM_CFLAGS): Use it in place of -Wextra.
  548. +
  549. 2005-04-30 Ulrich Drepper <drepper@redhat.com>
  550. * Makefile.am: Use -ffunction-sections for xmalloc.c.
  551. --- elfutils/lib/eu-config.h
  552. +++ elfutils/lib/eu-config.h
  553. @@ -162,6 +162,17 @@ asm (".section predict_data, \"aw\"; .pr
  554. /* This macro is used by the tests conditionalize for standalone building. */
  555. #define ELFUTILS_HEADER(name) <lib##name.h>
  556. +#ifndef HAVE_BUILTIN_POPCOUNT
  557. +# define __builtin_popcount hakmem_popcount
  558. +static inline unsigned int __attribute__ ((unused))
  559. +hakmem_popcount (unsigned int x)
  560. +{
  561. + /* HAKMEM 169 */
  562. + unsigned int n = x - ((x >> 1) & 033333333333) - ((x >> 2) & 011111111111);
  563. + return ((n + (n >> 3)) & 030707070707) % 63;
  564. +}
  565. +#endif /* HAVE_BUILTIN_POPCOUNT */
  566. +
  567. #ifdef SHARED
  568. # define OLD_VERSION(name, version) \
  569. --- elfutils/lib/Makefile.in
  570. +++ elfutils/lib/Makefile.in
  571. @@ -82,6 +82,7 @@ host_triplet = @host@
  572. DIST_COMMON = $(top_srcdir)/config/eu.am $(srcdir)/Makefile.in \
  573. $(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \
  574. $(noinst_HEADERS) ChangeLog
  575. +@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror)
  576. subdir = lib
  577. ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
  578. am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \
  579. @@ -197,6 +198,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
  580. INSTALL_SCRIPT = @INSTALL_SCRIPT@
  581. INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
  582. LDFLAGS = @LDFLAGS@
  583. +LD_AS_NEEDED = @LD_AS_NEEDED@
  584. LEX = @LEX@
  585. LEXLIB = @LEXLIB@
  586. LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
  587. @@ -228,6 +230,7 @@ SHELL = @SHELL@
  588. STRIP = @STRIP@
  589. USE_NLS = @USE_NLS@
  590. VERSION = @VERSION@
  591. +WEXTRA = @WEXTRA@
  592. XGETTEXT = @XGETTEXT@
  593. XGETTEXT_015 = @XGETTEXT_015@
  594. XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
  595. @@ -289,9 +292,11 @@ top_srcdir = @top_srcdir@
  596. zip_LIBS = @zip_LIBS@
  597. AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. \
  598. -I$(srcdir)/../libelf
  599. -AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 $(if \
  600. +AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
  601. $($(*F)_no_Werror),,-Werror) $(if \
  602. - $($(*F)_no_Wunused),,-Wunused -Wextra) $($(*F)_CFLAGS) -fpic
  603. + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
  604. + $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
  605. + $(am__append_1) -fpic
  606. COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage, $(COMPILE))
  607. CLEANFILES = *.gcno *.gcda
  608. textrel_check = if $(READELF) -d $@ | fgrep -q TEXTREL; then exit 1; fi
  609. --- elfutils/libasm/ChangeLog
  610. +++ elfutils/libasm/ChangeLog
  611. @@ -79,6 +79,11 @@
  612. * asm_error.c: Add new error ASM_E_IOERROR.
  613. * libasmP.h: Add ASM_E_IOERROR definition.
  614. +2005-05-31 Roland McGrath <roland@redhat.com>
  615. +
  616. + * Makefile.am (WEXTRA): New variable, substituted by configure.
  617. + (AM_CFLAGS): Use it in place of -Wextra.
  618. +
  619. 2005-02-15 Ulrich Drepper <drepper@redhat.com>
  620. * Makefile.am (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
  621. --- elfutils/libasm/Makefile.in
  622. +++ elfutils/libasm/Makefile.in
  623. @@ -83,8 +83,9 @@ host_triplet = @host@
  624. DIST_COMMON = $(top_srcdir)/config/eu.am $(srcdir)/Makefile.in \
  625. $(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \
  626. $(noinst_HEADERS) $(pkginclude_HEADERS) ChangeLog
  627. +@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror)
  628. noinst_PROGRAMS = $(am__EXEEXT_1)
  629. -@USE_LOCKS_TRUE@am__append_1 = -lpthread
  630. +@USE_LOCKS_TRUE@am__append_2 = -lpthread
  631. subdir = libasm
  632. ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
  633. am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \
  634. @@ -248,6 +249,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
  635. INSTALL_SCRIPT = @INSTALL_SCRIPT@
  636. INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
  637. LDFLAGS = @LDFLAGS@
  638. +LD_AS_NEEDED = @LD_AS_NEEDED@
  639. LEX = @LEX@
  640. LEXLIB = @LEXLIB@
  641. LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
  642. @@ -279,6 +281,7 @@ SHELL = @SHELL@
  643. STRIP = @STRIP@
  644. USE_NLS = @USE_NLS@
  645. VERSION = 1
  646. +WEXTRA = @WEXTRA@
  647. XGETTEXT = @XGETTEXT@
  648. XGETTEXT_015 = @XGETTEXT_015@
  649. XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
  650. @@ -341,11 +344,11 @@ zip_LIBS = @zip_LIBS@
  651. AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. \
  652. -I$(top_srcdir)/libelf -I$(top_srcdir)/libebl \
  653. -I$(top_srcdir)/libdw
  654. -AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \
  655. - $(if $($(*F)_no_Werror),,-Werror) \
  656. - $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
  657. - $($(*F)_CFLAGS)
  658. -
  659. +AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
  660. + $($(*F)_no_Werror),,-Werror) $(if \
  661. + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
  662. + $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
  663. + $(am__append_1)
  664. COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage, $(COMPILE))
  665. CLEANFILES = *.gcno *.gcda $(am_libasm_pic_a_OBJECTS) \
  666. libasm.so.$(VERSION)
  667. @@ -370,7 +373,7 @@ libasm_a_SOURCES = asm_begin.c asm_abort
  668. libasm_pic_a_SOURCES =
  669. am_libasm_pic_a_OBJECTS = $(libasm_a_SOURCES:.c=.os)
  670. -libasm_so_LDLIBS = $(am__append_1)
  671. +libasm_so_LDLIBS = $(am__append_2)
  672. libasm_so_SOURCES =
  673. noinst_HEADERS = libasmP.h symbolhash.h
  674. EXTRA_DIST = libasm.map
  675. --- elfutils/libcpu/ChangeLog
  676. +++ elfutils/libcpu/ChangeLog
  677. @@ -51,6 +51,9 @@
  678. 2009-01-23 Roland McGrath <roland@redhat.com>
  679. + * i386_disasm.c (i386_disasm): Add abort after assert-constant for old
  680. + compilers that don't realize it's noreturn.
  681. +
  682. * Makefile.am (i386_parse_CFLAGS): Use quotes around command
  683. substitution that can produce leading whitespace.
  684. @@ -380,6 +383,11 @@
  685. * defs/i386.doc: New file.
  686. * defs/x86_64: New file.
  687. +2005-04-04 Roland McGrath <roland@redhat.com>
  688. +
  689. + * Makefile.am (WEXTRA): New variable, substituted by configure.
  690. + (AM_CFLAGS): Use it instead of -Wextra.
  691. +
  692. 2005-02-15 Ulrich Drepper <drepper@redhat.com>
  693. * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
  694. --- elfutils/libcpu/i386_disasm.c
  695. +++ elfutils/libcpu/i386_disasm.c
  696. @@ -822,6 +822,7 @@ i386_disasm (const uint8_t **startp, con
  697. default:
  698. assert (! "INVALID not handled");
  699. + abort ();
  700. }
  701. }
  702. else
  703. --- elfutils/libcpu/Makefile.in
  704. +++ elfutils/libcpu/Makefile.in
  705. @@ -84,6 +84,7 @@ DIST_COMMON = $(top_srcdir)/config/eu.am
  706. $(srcdir)/Makefile.am i386_lex.c i386_parse.c \
  707. $(top_srcdir)/config/depcomp $(top_srcdir)/config/ylwrap \
  708. $(am__noinst_HEADERS_DIST) ChangeLog
  709. +@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror)
  710. @MAINTAINER_MODE_TRUE@noinst_PROGRAMS = i386_gendis$(EXEEXT)
  711. subdir = libcpu
  712. ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
  713. @@ -223,6 +224,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
  714. INSTALL_SCRIPT = @INSTALL_SCRIPT@
  715. INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
  716. LDFLAGS = @LDFLAGS@
  717. +LD_AS_NEEDED = @LD_AS_NEEDED@
  718. LEX = @LEX@
  719. LEXLIB = @LEXLIB@
  720. LEX_OUTPUT_ROOT = lex.$(<F:lex.l=)
  721. @@ -254,6 +256,7 @@ SHELL = @SHELL@
  722. STRIP = @STRIP@
  723. USE_NLS = @USE_NLS@
  724. VERSION = @VERSION@
  725. +WEXTRA = @WEXTRA@
  726. XGETTEXT = @XGETTEXT@
  727. XGETTEXT_015 = @XGETTEXT_015@
  728. XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
  729. @@ -316,10 +319,11 @@ zip_LIBS = @zip_LIBS@
  730. AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. \
  731. -I$(srcdir)/../libelf -I$(srcdir)/../libebl \
  732. -I$(srcdir)/../libdw -I$(srcdir)/../libasm
  733. -AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 $(if \
  734. +AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
  735. $($(*F)_no_Werror),,-Werror) $(if \
  736. - $($(*F)_no_Wunused),,-Wunused -Wextra) $($(*F)_CFLAGS) -fpic \
  737. - -fdollars-in-identifiers
  738. + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
  739. + $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
  740. + $(am__append_1) -fpic -fdollars-in-identifiers
  741. COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage, $(COMPILE))
  742. CLEANFILES = *.gcno *.gcda $(foreach P,i386 x86_64,$P_defs \
  743. $P.mnemonics)
  744. --- elfutils/libdw/ChangeLog
  745. +++ elfutils/libdw/ChangeLog
  746. @@ -439,6 +439,10 @@
  747. * Makefile.am (known-dwarf.h): Run gawk on config/known-dwarf.awk.
  748. +2011-07-20 Mark Wielaard <mjw@redhat.com>
  749. +
  750. + * dwarf_begin_elf.c: Add fallback for be64toh if not defined.
  751. +
  752. 2011-07-14 Mark Wielaard <mjw@redhat.com>
  753. * libdw.h (dwarf_offdie): Fix documentation to mention .debug_info.
  754. @@ -798,6 +802,10 @@
  755. * dwarf_hasattr_integrate.c: Integrate DW_AT_specification too.
  756. +2009-08-17 Roland McGrath <roland@redhat.com>
  757. +
  758. + * libdw.h: Disable extern inlines for GCC 4.2.
  759. +
  760. 2009-08-10 Roland McGrath <roland@redhat.com>
  761. * dwarf_getscopevar.c: Use dwarf_diename.
  762. @@ -1566,6 +1574,11 @@
  763. 2005-05-31 Roland McGrath <roland@redhat.com>
  764. + * Makefile.am (WEXTRA): New variable, substituted by configure.
  765. + (AM_CFLAGS): Use it in place of -Wextra.
  766. +
  767. +2005-05-31 Roland McGrath <roland@redhat.com>
  768. +
  769. * dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to
  770. formref offset.
  771. --- elfutils/libdw/dwarf_begin_elf.c
  772. +++ elfutils/libdw/dwarf_begin_elf.c
  773. @@ -47,6 +47,14 @@
  774. #if USE_ZLIB
  775. # include <endian.h>
  776. # define crc32 loser_crc32
  777. +# ifndef be64toh
  778. +# include <byteswap.h>
  779. +# if __BYTE_ORDER == __LITTLE_ENDIAN
  780. +# define be64toh(x) bswap_64 (x)
  781. +# else
  782. +# define be64toh(x) (x)
  783. +# endif
  784. +# endif
  785. # include <zlib.h>
  786. # undef crc32
  787. #endif
  788. --- elfutils/libdw/libdw.h
  789. +++ elfutils/libdw/libdw.h
  790. @@ -915,7 +915,7 @@ extern Dwarf_OOM dwarf_new_oom_handler (
  791. /* Inline optimizations. */
  792. -#ifdef __OPTIMIZE__
  793. +#if defined __OPTIMIZE__ && !(__GNUC__ == 4 && __GNUC_MINOR__ == 2)
  794. /* Return attribute code of given attribute. */
  795. __libdw_extern_inline unsigned int
  796. dwarf_whatattr (Dwarf_Attribute *attr)
  797. --- elfutils/libdw/Makefile.in
  798. +++ elfutils/libdw/Makefile.in
  799. @@ -84,7 +84,8 @@ DIST_COMMON = $(top_srcdir)/config/eu.am
  800. $(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \
  801. $(include_HEADERS) $(noinst_HEADERS) $(pkginclude_HEADERS) \
  802. ChangeLog
  803. -@BUILD_STATIC_TRUE@am__append_1 = -fpic
  804. +@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror)
  805. +@BUILD_STATIC_TRUE@am__append_2 = -fpic
  806. noinst_PROGRAMS = $(am__EXEEXT_1)
  807. subdir = libdw
  808. ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
  809. @@ -296,6 +297,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
  810. INSTALL_SCRIPT = @INSTALL_SCRIPT@
  811. INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
  812. LDFLAGS = @LDFLAGS@
  813. +LD_AS_NEEDED = @LD_AS_NEEDED@
  814. LEX = @LEX@
  815. LEXLIB = @LEXLIB@
  816. LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
  817. @@ -327,6 +329,7 @@ SHELL = @SHELL@
  818. STRIP = @STRIP@
  819. USE_NLS = @USE_NLS@
  820. VERSION = 1
  821. +WEXTRA = @WEXTRA@
  822. XGETTEXT = @XGETTEXT@
  823. XGETTEXT_015 = @XGETTEXT_015@
  824. XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
  825. @@ -388,10 +391,11 @@ top_srcdir = @top_srcdir@
  826. zip_LIBS = @zip_LIBS@
  827. AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. \
  828. -I$(srcdir)/../libelf
  829. -AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 $(if \
  830. +AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
  831. $($(*F)_no_Werror),,-Werror) $(if \
  832. - $($(*F)_no_Wunused),,-Wunused -Wextra) $($(*F)_CFLAGS) \
  833. - $(am__append_1)
  834. + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
  835. + $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
  836. + $(am__append_1) $(am__append_2)
  837. COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage, $(COMPILE))
  838. CLEANFILES = *.gcno *.gcda
  839. textrel_check = if $(READELF) -d $@ | fgrep -q TEXTREL; then exit 1; fi
  840. --- elfutils/libdwelf/Makefile.in
  841. +++ elfutils/libdwelf/Makefile.in
  842. @@ -82,6 +82,7 @@ host_triplet = @host@
  843. DIST_COMMON = $(top_srcdir)/config/eu.am $(srcdir)/Makefile.in \
  844. $(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \
  845. $(noinst_HEADERS) $(pkginclude_HEADERS) ChangeLog
  846. +@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror)
  847. subdir = libdwelf
  848. ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
  849. am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \
  850. @@ -227,6 +228,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
  851. INSTALL_SCRIPT = @INSTALL_SCRIPT@
  852. INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
  853. LDFLAGS = @LDFLAGS@
  854. +LD_AS_NEEDED = @LD_AS_NEEDED@
  855. LEX = @LEX@
  856. LEXLIB = @LEXLIB@
  857. LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
  858. @@ -258,6 +260,7 @@ SHELL = @SHELL@
  859. STRIP = @STRIP@
  860. USE_NLS = @USE_NLS@
  861. VERSION = 1
  862. +WEXTRA = @WEXTRA@
  863. XGETTEXT = @XGETTEXT@
  864. XGETTEXT_015 = @XGETTEXT_015@
  865. XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
  866. @@ -320,11 +323,11 @@ zip_LIBS = @zip_LIBS@
  867. AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. \
  868. -I$(srcdir)/../libelf -I$(srcdir)/../libdw \
  869. -I$(srcdir)/../libdwfl -I$(srcdir)/../libebl
  870. -AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \
  871. - $(if $($(*F)_no_Werror),,-Werror) \
  872. - $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
  873. - $($(*F)_CFLAGS)
  874. -
  875. +AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
  876. + $($(*F)_no_Werror),,-Werror) $(if \
  877. + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
  878. + $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
  879. + $(am__append_1)
  880. COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage, $(COMPILE))
  881. CLEANFILES = *.gcno *.gcda $(am_libdwelf_pic_a_OBJECTS)
  882. textrel_check = if $(READELF) -d $@ | fgrep -q TEXTREL; then exit 1; fi
  883. --- elfutils/libdwfl/ChangeLog
  884. +++ elfutils/libdwfl/ChangeLog
  885. @@ -467,6 +467,21 @@
  886. (dwfl_module_addrsym) (i_to_symfile): New function.
  887. (dwfl_module_addrsym) (search_table): Use it.
  888. +2013-11-09 Jan Kratochvil <jan.kratochvil@redhat.com>
  889. +
  890. + Older OS compatibility bits.
  891. + * linux-core-attach.c (be64toh, le64toh, be32toh, le32toh): Provide
  892. + fallbacks if not defined by system.
  893. +
  894. +2013-11-09 Jan Kratochvil <jan.kratochvil@redhat.com>
  895. +
  896. + Handle T-stopped detach for old kernels.
  897. + * linux-pid-attach.c (struct pid_arg): New field stopped.
  898. + (ptrace_attach): New parameter stoppedp. Set it appropriately.
  899. + (pid_set_initial_registers): Pass the new field.
  900. + (pid_thread_detach): Handle the case of STOPPED for old kernels.
  901. + (__libdwfl_attach_state_for_pid): Initialize STOPPED.
  902. +
  903. 2013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com>
  904. Mark Wielaard <mjw@redhat.com>
  905. @@ -2232,6 +2247,11 @@
  906. 2005-07-21 Roland McGrath <roland@redhat.com>
  907. + * Makefile.am (WEXTRA): New variable, substituted by configure.
  908. + (AM_CFLAGS): Use it in place of -Wextra.
  909. +
  910. +2005-07-21 Roland McGrath <roland@redhat.com>
  911. +
  912. * Makefile.am (noinst_HEADERS): Add loc2c.c.
  913. * test2.c (main): Check sscanf result to quiet warning.
  914. --- elfutils/libdwfl/linux-core-attach.c
  915. +++ elfutils/libdwfl/linux-core-attach.c
  916. @@ -29,6 +29,35 @@
  917. #include "libdwflP.h"
  918. #include <fcntl.h>
  919. #include "system.h"
  920. +#include <endian.h>
  921. +#include <byteswap.h>
  922. +#if __BYTE_ORDER == __LITTLE_ENDIAN
  923. +# ifndef be64toh
  924. +# define be64toh(x) bswap_64 (x)
  925. +# endif
  926. +# ifndef le64toh
  927. +# define le64toh(x) (x)
  928. +# endif
  929. +# ifndef be32toh
  930. +# define be32toh(x) bswap_32 (x)
  931. +# endif
  932. +# ifndef le32toh
  933. +# define le32toh(x) (x)
  934. +# endif
  935. +#else
  936. +# ifndef be64toh
  937. +# define be64toh(x) (x)
  938. +# endif
  939. +# ifndef le64toh
  940. +# define le64toh(x) bswap_64 (x)
  941. +# endif
  942. +# ifndef be32toh
  943. +# define be32toh(x) (x)
  944. +# endif
  945. +# ifndef le32toh
  946. +# define le32toh(x) bswap_32 (x)
  947. +# endif
  948. +#endif
  949. #include "../libdw/memory-access.h"
  950. --- elfutils/libdwfl/linux-pid-attach.c
  951. +++ elfutils/libdwfl/linux-pid-attach.c
  952. @@ -255,6 +255,11 @@ void
  953. internal_function
  954. __libdwfl_ptrace_detach (pid_t tid, bool tid_was_stopped)
  955. {
  956. + // Older kernels (tested kernel-2.6.18-348.12.1.el5.x86_64) need special
  957. + // handling of the detachment to keep the process State: T (stopped).
  958. + if (tid_was_stopped)
  959. + syscall (__NR_tkill, tid, SIGSTOP);
  960. +
  961. /* This handling is needed only on older Linux kernels such as
  962. 2.6.32-358.23.2.el6.ppc64. Later kernels such as
  963. 3.11.7-200.fc19.x86_64 remember the T (stopped) state
  964. @@ -262,6 +267,15 @@ __libdwfl_ptrace_detach (pid_t tid, bool
  965. PTRACE_DETACH. */
  966. ptrace (PTRACE_DETACH, tid, NULL,
  967. (void *) (intptr_t) (tid_was_stopped ? SIGSTOP : 0));
  968. +
  969. + if (tid_was_stopped)
  970. + {
  971. + // Wait till the SIGSTOP settles down.
  972. + int i;
  973. + for (i = 0; i < 100000; i++)
  974. + if (linux_proc_pid_is_stopped (tid))
  975. + break;
  976. + }
  977. }
  978. static void
  979. --- elfutils/libdwfl/Makefile.in
  980. +++ elfutils/libdwfl/Makefile.in
  981. @@ -82,9 +82,10 @@ host_triplet = @host@
  982. DIST_COMMON = $(top_srcdir)/config/eu.am $(srcdir)/Makefile.in \
  983. $(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \
  984. $(noinst_HEADERS) $(pkginclude_HEADERS) ChangeLog
  985. -@ZLIB_TRUE@am__append_1 = gzip.c
  986. -@BZLIB_TRUE@am__append_2 = bzip2.c
  987. -@LZMA_TRUE@am__append_3 = lzma.c
  988. +@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror)
  989. +@ZLIB_TRUE@am__append_2 = gzip.c
  990. +@BZLIB_TRUE@am__append_3 = bzip2.c
  991. +@LZMA_TRUE@am__append_4 = lzma.c
  992. subdir = libdwfl
  993. ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
  994. am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \
  995. @@ -286,6 +287,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
  996. INSTALL_SCRIPT = @INSTALL_SCRIPT@
  997. INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
  998. LDFLAGS = @LDFLAGS@
  999. +LD_AS_NEEDED = @LD_AS_NEEDED@
  1000. LEX = @LEX@
  1001. LEXLIB = @LEXLIB@
  1002. LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
  1003. @@ -317,6 +319,7 @@ SHELL = @SHELL@
  1004. STRIP = @STRIP@
  1005. USE_NLS = @USE_NLS@
  1006. VERSION = 1
  1007. +WEXTRA = @WEXTRA@
  1008. XGETTEXT = @XGETTEXT@
  1009. XGETTEXT_015 = @XGETTEXT_015@
  1010. XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
  1011. @@ -379,11 +382,11 @@ zip_LIBS = @zip_LIBS@
  1012. AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. -I$(srcdir) \
  1013. -I$(srcdir)/../libelf -I$(srcdir)/../libebl \
  1014. -I$(srcdir)/../libdw -I$(srcdir)/../libdwelf
  1015. -AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \
  1016. - $(if $($(*F)_no_Werror),,-Werror) \
  1017. - $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
  1018. - $($(*F)_CFLAGS)
  1019. -
  1020. +AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
  1021. + $($(*F)_no_Werror),,-Werror) $(if \
  1022. + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
  1023. + $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
  1024. + $(am__append_1)
  1025. COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage, $(COMPILE))
  1026. CLEANFILES = *.gcno *.gcda $(am_libdwfl_pic_a_OBJECTS)
  1027. textrel_check = if $(READELF) -d $@ | fgrep -q TEXTREL; then exit 1; fi
  1028. @@ -410,8 +413,8 @@ libdwfl_a_SOURCES = dwfl_begin.c dwfl_en
  1029. dwfl_module_register_names.c dwfl_segment_report_module.c \
  1030. link_map.c core-file.c open.c image-header.c dwfl_frame.c \
  1031. frame_unwind.c dwfl_frame_pc.c linux-pid-attach.c \
  1032. - linux-core-attach.c dwfl_frame_regs.c $(am__append_1) \
  1033. - $(am__append_2) $(am__append_3)
  1034. + linux-core-attach.c dwfl_frame_regs.c $(am__append_2) \
  1035. + $(am__append_3) $(am__append_4)
  1036. libdwfl = $(libdw)
  1037. libdw = ../libdw/libdw.so
  1038. libelf = ../libelf/libelf.so
  1039. --- elfutils/libebl/ChangeLog
  1040. +++ elfutils/libebl/ChangeLog
  1041. @@ -754,6 +754,11 @@
  1042. * Makefile.am (libebl_*_so_SOURCES): Set to $(*_SRCS) so dependency
  1043. tracking works right.
  1044. +2005-05-31 Roland McGrath <roland@redhat.com>
  1045. +
  1046. + * Makefile.am (WEXTRA): New variable, substituted by configure.
  1047. + (AM_CFLAGS): Use it in place of -Wextra.
  1048. +
  1049. 2005-05-21 Ulrich Drepper <drepper@redhat.com>
  1050. * libebl_x86_64.map: Add x86_64_core_note.
  1051. --- elfutils/libebl/Makefile.in
  1052. +++ elfutils/libebl/Makefile.in
  1053. @@ -82,6 +82,7 @@ host_triplet = @host@
  1054. DIST_COMMON = $(top_srcdir)/config/eu.am $(srcdir)/Makefile.in \
  1055. $(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \
  1056. $(noinst_HEADERS) $(pkginclude_HEADERS) ChangeLog
  1057. +@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror)
  1058. subdir = libebl
  1059. ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
  1060. am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \
  1061. @@ -249,6 +250,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
  1062. INSTALL_SCRIPT = @INSTALL_SCRIPT@
  1063. INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
  1064. LDFLAGS = @LDFLAGS@
  1065. +LD_AS_NEEDED = @LD_AS_NEEDED@
  1066. LEX = @LEX@
  1067. LEXLIB = @LEXLIB@
  1068. LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
  1069. @@ -280,6 +282,7 @@ SHELL = @SHELL@
  1070. STRIP = @STRIP@
  1071. USE_NLS = @USE_NLS@
  1072. VERSION = 1
  1073. +WEXTRA = @WEXTRA@
  1074. XGETTEXT = @XGETTEXT@
  1075. XGETTEXT_015 = @XGETTEXT_015@
  1076. XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
  1077. @@ -342,9 +345,11 @@ zip_LIBS = @zip_LIBS@
  1078. AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. \
  1079. -I$(srcdir)/../libelf -I$(srcdir)/../libdw \
  1080. -I$(srcdir)/../libasm
  1081. -AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 $(if \
  1082. +AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
  1083. $($(*F)_no_Werror),,-Werror) $(if \
  1084. - $($(*F)_no_Wunused),,-Wunused -Wextra) $($(*F)_CFLAGS) -fpic
  1085. + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
  1086. + $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
  1087. + $(am__append_1) -fpic
  1088. COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage, $(COMPILE))
  1089. CLEANFILES = *.gcno *.gcda $(am_libebl_pic_a_OBJECTS)
  1090. textrel_check = if $(READELF) -d $@ | fgrep -q TEXTREL; then exit 1; fi
  1091. --- elfutils/libelf/ChangeLog
  1092. +++ elfutils/libelf/ChangeLog
  1093. @@ -139,6 +139,11 @@
  1094. * elf-knowledge.h (SECTION_STRIP_P): Remove < SHT_NUM check.
  1095. +2011-03-10 Roland McGrath <roland@redhat.com>
  1096. +
  1097. + * gnuhash_xlate.h (elf_cvt_gnuhash): Avoid post-increment in bswap_32
  1098. + argument, since some implementations are buggy macros.
  1099. +
  1100. 2011-02-26 Mark Wielaard <mjw@redhat.com>
  1101. * elf_end.c (elf_end): Call rwlock_unlock before rwlock_fini.
  1102. @@ -816,6 +821,11 @@
  1103. * elf.h: Update from glibc.
  1104. +2005-05-31 Roland McGrath <roland@redhat.com>
  1105. +
  1106. + * Makefile.am (WEXTRA): New variable, substituted by configure.
  1107. + (AM_CFLAGS): Use it in place of -Wextra.
  1108. +
  1109. 2005-05-08 Roland McGrath <roland@redhat.com>
  1110. * elf_begin.c (read_file) [_MUDFLAP]: Don't use mmap for now.
  1111. --- elfutils/libelf/common.h
  1112. +++ elfutils/libelf/common.h
  1113. @@ -139,7 +139,7 @@ libelf_release_all (Elf *elf)
  1114. (Var) = (sizeof (Var) == 1 \
  1115. ? (unsigned char) (Var) \
  1116. : (sizeof (Var) == 2 \
  1117. - ? bswap_16 (Var) \
  1118. + ? (unsigned short int) bswap_16 (Var) \
  1119. : (sizeof (Var) == 4 \
  1120. ? bswap_32 (Var) \
  1121. : bswap_64 (Var))))
  1122. @@ -148,7 +148,7 @@ libelf_release_all (Elf *elf)
  1123. (Dst) = (sizeof (Var) == 1 \
  1124. ? (unsigned char) (Var) \
  1125. : (sizeof (Var) == 2 \
  1126. - ? bswap_16 (Var) \
  1127. + ? (unsigned short int) bswap_16 (Var) \
  1128. : (sizeof (Var) == 4 \
  1129. ? bswap_32 (Var) \
  1130. : bswap_64 (Var))))
  1131. --- elfutils/libelf/gnuhash_xlate.h
  1132. +++ elfutils/libelf/gnuhash_xlate.h
  1133. @@ -1,5 +1,5 @@
  1134. /* Conversion functions for versioning information.
  1135. - Copyright (C) 2006, 2007 Red Hat, Inc.
  1136. + Copyright (C) 2006-2011 Red Hat, Inc.
  1137. This file is part of elfutils.
  1138. Written by Ulrich Drepper <drepper@redhat.com>, 2006.
  1139. @@ -68,7 +68,9 @@ elf_cvt_gnuhash (void *dest, const void
  1140. dest32 = (Elf32_Word *) &dest64[bitmask_words];
  1141. while (len >= 4)
  1142. {
  1143. - *dest32++ = bswap_32 (*src32++);
  1144. + *dest32 = bswap_32 (*src32);
  1145. + ++dest32;
  1146. + ++src32;
  1147. len -= 4;
  1148. }
  1149. }
  1150. --- elfutils/libelf/Makefile.in
  1151. +++ elfutils/libelf/Makefile.in
  1152. @@ -84,9 +84,10 @@ DIST_COMMON = $(top_srcdir)/config/eu.am
  1153. $(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \
  1154. $(include_HEADERS) $(noinst_HEADERS) $(pkginclude_HEADERS) \
  1155. ChangeLog
  1156. -@BUILD_STATIC_TRUE@am__append_1 = -fpic
  1157. +@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror)
  1158. +@BUILD_STATIC_TRUE@am__append_2 = -fpic
  1159. noinst_PROGRAMS = $(am__EXEEXT_1)
  1160. -@USE_LOCKS_TRUE@am__append_2 = -lpthread
  1161. +@USE_LOCKS_TRUE@am__append_3 = -lpthread
  1162. subdir = libelf
  1163. ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
  1164. am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \
  1165. @@ -291,6 +292,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
  1166. INSTALL_SCRIPT = @INSTALL_SCRIPT@
  1167. INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
  1168. LDFLAGS = @LDFLAGS@
  1169. +LD_AS_NEEDED = @LD_AS_NEEDED@
  1170. LEX = @LEX@
  1171. LEXLIB = @LEXLIB@
  1172. LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
  1173. @@ -322,6 +324,7 @@ SHELL = @SHELL@
  1174. STRIP = @STRIP@
  1175. USE_NLS = @USE_NLS@
  1176. VERSION = 1
  1177. +WEXTRA = @WEXTRA@
  1178. XGETTEXT = @XGETTEXT@
  1179. XGETTEXT_015 = @XGETTEXT_015@
  1180. XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
  1181. @@ -382,10 +385,11 @@ top_builddir = @top_builddir@
  1182. top_srcdir = @top_srcdir@
  1183. zip_LIBS = @zip_LIBS@
  1184. AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I..
  1185. -AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 $(if \
  1186. +AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
  1187. $($(*F)_no_Werror),,-Werror) $(if \
  1188. - $($(*F)_no_Wunused),,-Wunused -Wextra) $($(*F)_CFLAGS) \
  1189. - $(am__append_1)
  1190. + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
  1191. + $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
  1192. + $(am__append_1) $(am__append_2)
  1193. COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage, $(COMPILE))
  1194. CLEANFILES = *.gcno *.gcda $(am_libelf_pic_a_OBJECTS) \
  1195. libelf.so.$(VERSION)
  1196. @@ -446,7 +450,7 @@ libelf_a_SOURCES = elf_version.c elf_has
  1197. libelf_pic_a_SOURCES =
  1198. am_libelf_pic_a_OBJECTS = $(libelf_a_SOURCES:.c=.os)
  1199. -libelf_so_LDLIBS = $(am__append_2)
  1200. +libelf_so_LDLIBS = $(am__append_3)
  1201. libelf_so_SOURCES =
  1202. noinst_HEADERS = elf.h abstract.h common.h exttypes.h gelf_xlate.h libelfP.h \
  1203. version_xlate.h gnuhash_xlate.h note_xlate.h dl-hash.h
  1204. --- elfutils/m4/Makefile.in
  1205. +++ elfutils/m4/Makefile.in
  1206. @@ -145,6 +145,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
  1207. INSTALL_SCRIPT = @INSTALL_SCRIPT@
  1208. INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
  1209. LDFLAGS = @LDFLAGS@
  1210. +LD_AS_NEEDED = @LD_AS_NEEDED@
  1211. LEX = @LEX@
  1212. LEXLIB = @LEXLIB@
  1213. LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
  1214. @@ -176,6 +177,7 @@ SHELL = @SHELL@
  1215. STRIP = @STRIP@
  1216. USE_NLS = @USE_NLS@
  1217. VERSION = @VERSION@
  1218. +WEXTRA = @WEXTRA@
  1219. XGETTEXT = @XGETTEXT@
  1220. XGETTEXT_015 = @XGETTEXT_015@
  1221. XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
  1222. --- elfutils/Makefile.in
  1223. +++ elfutils/Makefile.in
  1224. @@ -263,6 +263,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
  1225. INSTALL_SCRIPT = @INSTALL_SCRIPT@
  1226. INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
  1227. LDFLAGS = @LDFLAGS@
  1228. +LD_AS_NEEDED = @LD_AS_NEEDED@
  1229. LEX = @LEX@
  1230. LEXLIB = @LEXLIB@
  1231. LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
  1232. @@ -294,6 +295,7 @@ SHELL = @SHELL@
  1233. STRIP = @STRIP@
  1234. USE_NLS = @USE_NLS@
  1235. VERSION = @VERSION@
  1236. +WEXTRA = @WEXTRA@
  1237. XGETTEXT = @XGETTEXT@
  1238. XGETTEXT_015 = @XGETTEXT_015@
  1239. XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
  1240. --- elfutils/src/addr2line.c
  1241. +++ elfutils/src/addr2line.c
  1242. @@ -540,10 +540,10 @@ handle_address (const char *string, Dwfl
  1243. bool parsed = false;
  1244. int i, j;
  1245. char *name = NULL;
  1246. - if (sscanf (string, "(%m[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
  1247. + if (sscanf (string, "(%a[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
  1248. && string[i] == '\0')
  1249. parsed = adjust_to_section (name, &addr, dwfl);
  1250. - switch (sscanf (string, "%m[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
  1251. + switch (sscanf (string, "%a[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
  1252. {
  1253. default:
  1254. break;
  1255. --- elfutils/src/ChangeLog
  1256. +++ elfutils/src/ChangeLog
  1257. @@ -1155,8 +1155,16 @@
  1258. * readelf.c (attr_callback): Use print_block only when we don't use
  1259. print_ops.
  1260. +2009-08-17 Roland McGrath <roland@redhat.com>
  1261. +
  1262. + * ld.h: Disable extern inlines for GCC 4.2.
  1263. +
  1264. 2009-08-14 Roland McGrath <roland@redhat.com>
  1265. + * strings.c (read_block): Conditionalize posix_fadvise use
  1266. + on [POSIX_FADV_SEQUENTIAL].
  1267. + From Petr Salinger <Petr.Salinger@seznam.cz>.
  1268. +
  1269. * ar.c (do_oper_extract): Use pathconf instead of statfs.
  1270. 2009-08-01 Ulrich Drepper <drepper@redhat.com>
  1271. @@ -1320,6 +1328,8 @@
  1272. * readelf.c (print_debug_frame_section): Use t instead of j formats
  1273. for ptrdiff_t OFFSET.
  1274. + * addr2line.c (handle_address): Use %a instead of %m for compatibility.
  1275. +
  1276. 2009-01-21 Ulrich Drepper <drepper@redhat.com>
  1277. * elflint.c (check_program_header): Fix typo in .eh_frame_hdr section
  1278. @@ -1503,6 +1513,11 @@
  1279. that matches its PT_LOAD's p_flags &~ PF_W. On sparc, PF_X really
  1280. is valid in RELRO.
  1281. +2008-03-01 Roland McGrath <roland@redhat.com>
  1282. +
  1283. + * readelf.c (dump_archive_index): Tweak portability hack
  1284. + to match [__GNUC__ < 4] too.
  1285. +
  1286. 2008-02-29 Roland McGrath <roland@redhat.com>
  1287. * readelf.c (print_attributes): Add a cast.
  1288. @@ -1754,6 +1769,8 @@
  1289. * readelf.c (hex_dump): Fix rounding error in whitespace calculation.
  1290. + * Makefile.am (readelf_no_Werror): New variable.
  1291. +
  1292. 2007-10-15 Roland McGrath <roland@redhat.com>
  1293. * make-debug-archive.in: New file.
  1294. @@ -2193,6 +2210,10 @@
  1295. * elflint.c (valid_e_machine): Add EM_ALPHA.
  1296. Reported by Christian Aichinger <Greek0@gmx.net>.
  1297. + * strings.c (map_file): Define POSIX_MADV_SEQUENTIAL to
  1298. + MADV_SEQUENTIAL if undefined. Don't call posix_madvise
  1299. + if neither is defined.
  1300. +
  1301. 2006-08-08 Ulrich Drepper <drepper@redhat.com>
  1302. * elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB.
  1303. @@ -2269,6 +2290,10 @@
  1304. * Makefile.am: Add hacks to create dependency files for non-generic
  1305. linker.
  1306. +2006-04-05 Roland McGrath <roland@redhat.com>
  1307. +
  1308. + * strings.c (MAP_POPULATE): Define to 0 if undefined.
  1309. +
  1310. 2006-06-12 Ulrich Drepper <drepper@redhat.com>
  1311. * ldgeneric.c (ld_generic_generate_sections): Don't create .interp
  1312. @@ -2617,6 +2642,11 @@
  1313. * readelf.c (print_debug_loc_section): Fix indentation for larger
  1314. address size.
  1315. +2005-05-31 Roland McGrath <roland@redhat.com>
  1316. +
  1317. + * Makefile.am (WEXTRA): New variable, substituted by configure.
  1318. + (AM_CFLAGS): Use it in place of -Wextra.
  1319. +
  1320. 2005-05-30 Roland McGrath <roland@redhat.com>
  1321. * readelf.c (print_debug_line_section): Print section offset of each
  1322. --- elfutils/src/findtextrel.c
  1323. +++ elfutils/src/findtextrel.c
  1324. @@ -496,7 +496,11 @@ ptrcompare (const void *p1, const void *
  1325. static void
  1326. -check_rel (size_t nsegments, struct segments segments[nsegments],
  1327. +check_rel (size_t nsegments, struct segments segments[
  1328. +#if __GNUC__ >= 4
  1329. + nsegments
  1330. +#endif
  1331. + ],
  1332. GElf_Addr addr, Elf *elf, Elf_Scn *symscn, Dwarf *dw,
  1333. const char *fname, bool more_than_one, void **knownsrcs)
  1334. {
  1335. --- elfutils/src/ld.h
  1336. +++ elfutils/src/ld.h
  1337. @@ -1114,6 +1114,7 @@ extern bool dynamically_linked_p (void);
  1338. /* Checked whether the symbol is undefined and referenced from a DSO. */
  1339. extern bool linked_from_dso_p (struct scninfo *scninfo, size_t symidx);
  1340. +#if defined __OPTIMIZE__ && !(__GNUC__ == 4 && __GNUC_MINOR__ == 2)
  1341. #ifdef __GNUC_STDC_INLINE__
  1342. __attribute__ ((__gnu_inline__))
  1343. #endif
  1344. @@ -1131,5 +1132,6 @@ linked_from_dso_p (struct scninfo *scnin
  1345. return sym->defined && sym->in_dso;
  1346. }
  1347. +#endif /* Optimizing and not GCC 4.2. */
  1348. #endif /* ld.h */
  1349. --- elfutils/src/Makefile.am
  1350. +++ elfutils/src/Makefile.am
  1351. @@ -89,6 +89,11 @@ endif
  1352. # XXX While the file is not finished, don't warn about this
  1353. ldgeneric_no_Wunused = yes
  1354. +# Buggy old compilers or libc headers.
  1355. +readelf_no_Werror = yes
  1356. +strings_no_Werror = yes
  1357. +addr2line_no_Wformat = yes
  1358. +
  1359. readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) -ldl
  1360. nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) -ldl \
  1361. $(demanglelib)
  1362. --- elfutils/src/Makefile.in
  1363. +++ elfutils/src/Makefile.in
  1364. @@ -85,6 +85,7 @@ DIST_COMMON = $(top_srcdir)/config/eu.am
  1365. $(srcdir)/Makefile.am ldlex.c ldscript.c \
  1366. $(top_srcdir)/config/depcomp $(top_srcdir)/config/ylwrap \
  1367. $(noinst_HEADERS) ChangeLog
  1368. +@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror)
  1369. bin_PROGRAMS = readelf$(EXEEXT) nm$(EXEEXT) size$(EXEEXT) \
  1370. strip$(EXEEXT) ld$(EXEEXT) elflint$(EXEEXT) \
  1371. findtextrel$(EXEEXT) addr2line$(EXEEXT) elfcmp$(EXEEXT) \
  1372. @@ -93,9 +94,9 @@ bin_PROGRAMS = readelf$(EXEEXT) nm$(EXEE
  1373. @NATIVE_LD_FALSE@noinst_PROGRAMS = $(am__EXEEXT_1)
  1374. # We never build this library but we need to get the dependency files
  1375. # of all the linker backends that might be used in a non-generic linker.
  1376. -@NEVER_TRUE@am__append_1 = libdummy.a
  1377. +@NEVER_TRUE@am__append_2 = libdummy.a
  1378. # -ldl is always needed for libebl.
  1379. -@NATIVE_LD_TRUE@am__append_2 = libld_elf.a
  1380. +@NATIVE_LD_TRUE@am__append_3 = libld_elf.a
  1381. @NATIVE_LD_TRUE@am_libld_elf_i386_pic_a_OBJECTS =
  1382. subdir = src
  1383. ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
  1384. @@ -159,7 +160,7 @@ am_ld_OBJECTS = ld.$(OBJEXT) ldgeneric.$
  1385. ldscript.$(OBJEXT) symbolhash.$(OBJEXT) sectionhash.$(OBJEXT) \
  1386. versionhash.$(OBJEXT)
  1387. ld_OBJECTS = $(am_ld_OBJECTS)
  1388. -ld_DEPENDENCIES = $(libebl) $(libelf) $(libeu) $(am__append_2)
  1389. +ld_DEPENDENCIES = $(libebl) $(libelf) $(libeu) $(am__append_3)
  1390. ld_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(ld_LDFLAGS) $(LDFLAGS) -o \
  1391. $@
  1392. am_libld_elf_i386_so_OBJECTS =
  1393. @@ -340,6 +341,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
  1394. INSTALL_SCRIPT = @INSTALL_SCRIPT@
  1395. INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
  1396. LDFLAGS = @LDFLAGS@
  1397. +LD_AS_NEEDED = @LD_AS_NEEDED@
  1398. LEX = @LEX@
  1399. LEXLIB = @LEXLIB@
  1400. LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
  1401. @@ -371,6 +373,7 @@ SHELL = @SHELL@
  1402. STRIP = @STRIP@
  1403. USE_NLS = @USE_NLS@
  1404. VERSION = @VERSION@
  1405. +WEXTRA = @WEXTRA@
  1406. XGETTEXT = @XGETTEXT@
  1407. XGETTEXT_015 = @XGETTEXT_015@
  1408. XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
  1409. @@ -434,11 +437,11 @@ AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_sr
  1410. -I$(srcdir)/../libelf -I$(srcdir)/../libebl \
  1411. -I$(srcdir)/../libdw -I$(srcdir)/../libdwelf \
  1412. -I$(srcdir)/../libdwfl -I$(srcdir)/../libasm
  1413. -AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \
  1414. - $(if $($(*F)_no_Werror),,-Werror) \
  1415. - $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
  1416. - $($(*F)_CFLAGS)
  1417. -
  1418. +AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
  1419. + $($(*F)_no_Werror),,-Werror) $(if \
  1420. + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
  1421. + $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
  1422. + $(am__append_1)
  1423. COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage, $(COMPILE))
  1424. CLEANFILES = *.gcno *.gcda make-debug-archive none_ld.os \
  1425. $(ld_modules:.c=.os) *.gconv
  1426. @@ -449,8 +452,8 @@ AM_LFLAGS = -Pld -olex.yy.c
  1427. native_ld = @native_ld@
  1428. ld_dsos = libld_elf_i386_pic.a
  1429. @NATIVE_LD_FALSE@noinst_LIBRARIES = libld_elf.a libar.a $(ld_dsos) \
  1430. -@NATIVE_LD_FALSE@ $(am__append_1)
  1431. -@NATIVE_LD_TRUE@noinst_LIBRARIES = libld_elf.a libar.a $(am__append_1)
  1432. +@NATIVE_LD_FALSE@ $(am__append_2)
  1433. +@NATIVE_LD_TRUE@noinst_LIBRARIES = libld_elf.a libar.a $(am__append_2)
  1434. @NATIVE_LD_TRUE@native_ld_cflags = -DBASE_ELF_NAME=elf_$(base_cpu)
  1435. @NEVER_TRUE@libdummy_a_SOURCES = i386_ld.c
  1436. ld_SOURCES = ld.c ldgeneric.c ldlex.l ldscript.y symbolhash.c sectionhash.c \
  1437. @@ -476,13 +479,18 @@ libeu = ../lib/libeu.a
  1438. # XXX While the file is not finished, don't warn about this
  1439. ldgeneric_no_Wunused = yes
  1440. +
  1441. +# Buggy old compilers or libc headers.
  1442. +readelf_no_Werror = yes
  1443. +strings_no_Werror = yes
  1444. +addr2line_no_Wformat = yes
  1445. readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) -ldl
  1446. nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) -ldl \
  1447. $(demanglelib)
  1448. size_LDADD = $(libelf) $(libeu)
  1449. strip_LDADD = $(libebl) $(libelf) $(libeu) -ldl
  1450. -ld_LDADD = $(libebl) $(libelf) $(libeu) -ldl $(am__append_2)
  1451. +ld_LDADD = $(libebl) $(libelf) $(libeu) -ldl $(am__append_3)
  1452. ld_LDFLAGS = -rdynamic
  1453. elflint_LDADD = $(libebl) $(libelf) $(libeu) -ldl
  1454. findtextrel_LDADD = $(libdw) $(libelf)
  1455. --- elfutils/src/readelf.c
  1456. +++ elfutils/src/readelf.c
  1457. @@ -4253,10 +4253,12 @@ listptr_base (struct listptr *p)
  1458. return base;
  1459. }
  1460. +static const char *listptr_name;
  1461. +
  1462. static int
  1463. -compare_listptr (const void *a, const void *b, void *arg)
  1464. +compare_listptr (const void *a, const void *b)
  1465. {
  1466. - const char *name = arg;
  1467. + const char *const name = listptr_name;
  1468. struct listptr *p1 = (void *) a;
  1469. struct listptr *p2 = (void *) b;
  1470. @@ -4345,8 +4347,11 @@ static void
  1471. sort_listptr (struct listptr_table *table, const char *name)
  1472. {
  1473. if (table->n > 0)
  1474. - qsort_r (table->table, table->n, sizeof table->table[0],
  1475. - &compare_listptr, (void *) name);
  1476. + {
  1477. + listptr_name = name;
  1478. + qsort (table->table, table->n, sizeof table->table[0],
  1479. + &compare_listptr);
  1480. + }
  1481. }
  1482. static bool
  1483. @@ -9268,7 +9273,7 @@ dump_archive_index (Elf *elf, const char
  1484. if (unlikely (elf_rand (elf, as_off) == 0)
  1485. || unlikely ((subelf = elf_begin (-1, ELF_C_READ_MMAP, elf))
  1486. == NULL))
  1487. -#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 7)
  1488. +#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 7) || __GNUC__ < 4
  1489. while (1)
  1490. #endif
  1491. error (EXIT_FAILURE, 0,
  1492. --- elfutils/src/strings.c
  1493. +++ elfutils/src/strings.c
  1494. @@ -43,6 +43,10 @@
  1495. #include <system.h>
  1496. +#ifndef MAP_POPULATE
  1497. +# define MAP_POPULATE 0
  1498. +#endif
  1499. +
  1500. /* Prototypes of local functions. */
  1501. static int read_fd (int fd, const char *fname, off64_t fdlen);
  1502. @@ -489,8 +493,13 @@ map_file (int fd, off64_t start_off, off
  1503. fd, start_off);
  1504. if (mem != MAP_FAILED)
  1505. {
  1506. +#if !defined POSIX_MADV_SEQUENTIAL && defined MADV_SEQUENTIAL
  1507. +# define POSIX_MADV_SEQUENTIAL MADV_SEQUENTIAL
  1508. +#endif
  1509. +#ifdef POSIX_MADV_SEQUENTIAL
  1510. /* We will go through the mapping sequentially. */
  1511. (void) posix_madvise (mem, map_size, POSIX_MADV_SEQUENTIAL);
  1512. +#endif
  1513. break;
  1514. }
  1515. if (errno != EINVAL && errno != ENOMEM)
  1516. @@ -581,9 +590,11 @@ read_block (int fd, const char *fname, o
  1517. elfmap_off = from & ~(ps - 1);
  1518. elfmap_base = elfmap = map_file (fd, elfmap_off, fdlen, &elfmap_size);
  1519. +#ifdef POSIX_FADV_SEQUENTIAL
  1520. if (unlikely (elfmap == MAP_FAILED))
  1521. /* Let the kernel know we are going to read everything in sequence. */
  1522. (void) posix_fadvise (fd, 0, 0, POSIX_FADV_SEQUENTIAL);
  1523. +#endif
  1524. }
  1525. if (unlikely (elfmap == MAP_FAILED))
  1526. --- elfutils/src/strip.c
  1527. +++ elfutils/src/strip.c
  1528. @@ -45,6 +45,12 @@
  1529. #include <libebl.h>
  1530. #include <system.h>
  1531. +#ifdef HAVE_FUTIMES
  1532. +# define FUTIMES(fd, fname, tvp) futimes (fd, tvp)
  1533. +#else
  1534. +# define FUTIMES(fd, fname, tvp) utimes (fname, tvp)
  1535. +#endif
  1536. +
  1537. typedef uint8_t GElf_Byte;
  1538. /* Name and version of program. */
  1539. @@ -318,8 +324,18 @@ process_file (const char *fname)
  1540. /* If we have to preserve the timestamp, we need it in the
  1541. format utimes() understands. */
  1542. +#ifdef HAVE_STRUCT_STAT_ST_ATIM
  1543. TIMESPEC_TO_TIMEVAL (&tv[0], &pre_st.st_atim);
  1544. +#else
  1545. + tv[0].tv_sec = pre_st.st_atime;
  1546. + tv[0].tv_usec = 0;
  1547. +#endif
  1548. +#ifdef HAVE_STRUCT_STAT_ST_MTIM
  1549. TIMESPEC_TO_TIMEVAL (&tv[1], &pre_st.st_mtim);
  1550. +#else
  1551. + tv[1].tv_sec = pre_st.st_atime;
  1552. + tv[1].tv_usec = 0;
  1553. +#endif
  1554. }
  1555. /* Open the file. */
  1556. @@ -2086,7 +2102,7 @@ while computing checksum for debug infor
  1557. /* If requested, preserve the timestamp. */
  1558. if (tvp != NULL)
  1559. {
  1560. - if (futimes (fd, tvp) != 0)
  1561. + if (FUTIMES (fd, output_fname, tvp) != 0)
  1562. {
  1563. error (0, errno, gettext ("\
  1564. cannot set access and modification date of '%s'"),
  1565. @@ -2143,7 +2159,7 @@ handle_ar (int fd, Elf *elf, const char
  1566. if (tvp != NULL)
  1567. {
  1568. - if (unlikely (futimes (fd, tvp) != 0))
  1569. + if (unlikely (FUTIMES (fd, fname, tvp) != 0))
  1570. {
  1571. error (0, errno, gettext ("\
  1572. cannot set access and modification date of '%s'"), fname);
  1573. --- elfutils/tests/backtrace.c
  1574. +++ elfutils/tests/backtrace.c
  1575. @@ -36,6 +36,7 @@
  1576. #include <fcntl.h>
  1577. #include <string.h>
  1578. #include <argp.h>
  1579. +#include <sys/syscall.h>
  1580. #include ELFUTILS_HEADER(dwfl)
  1581. #ifndef __linux__
  1582. --- elfutils/tests/ChangeLog
  1583. +++ elfutils/tests/ChangeLog
  1584. @@ -304,6 +304,13 @@
  1585. 2013-12-02 Jan Kratochvil <jan.kratochvil@redhat.com>
  1586. + Handle T-stopped detach for old kernels.
  1587. + * backtrace.c: Include sys/syscall.h.
  1588. + (linux_proc_pid_is_stopped): New function.
  1589. + (ptrace_detach_stopped): Handle old kernels.
  1590. +
  1591. +2013-12-02 Jan Kratochvil <jan.kratochvil@redhat.com>
  1592. +
  1593. * Makefile.am (check_PROGRAMS): Add backtrace, backtrace-child,
  1594. backtrace-data and backtrace-dwarf.
  1595. (BUILT_SOURCES, clean-local, backtrace-child-biarch): New.
  1596. @@ -1168,6 +1175,8 @@
  1597. 2008-01-21 Roland McGrath <roland@redhat.com>
  1598. + * line2addr.c (main): Revert last change.
  1599. +
  1600. * testfile45.S.bz2: Add tests for cltq, cqto.
  1601. * testfile45.expect.bz2: Adjust.
  1602. @@ -1876,6 +1885,11 @@
  1603. * Makefile.am (TESTS): Add run-elflint-test.sh.
  1604. (EXTRA_DIST): Add run-elflint-test.sh and testfile18.bz2.
  1605. +2005-05-31 Roland McGrath <roland@redhat.com>
  1606. +
  1607. + * Makefile.am (WEXTRA): New variable, substituted by configure.
  1608. + (AM_CFLAGS): Use it in place of -Wextra.
  1609. +
  1610. 2005-05-24 Ulrich Drepper <drepper@redhat.com>
  1611. * get-files.c (main): Use correct format specifier.
  1612. --- elfutils/tests/line2addr.c
  1613. +++ elfutils/tests/line2addr.c
  1614. @@ -124,7 +124,7 @@ main (int argc, char *argv[])
  1615. {
  1616. struct args a = { .arg = argv[cnt] };
  1617. - switch (sscanf (a.arg, "%m[^:]:%d", &a.file, &a.line))
  1618. + switch (sscanf (a.arg, "%a[^:]:%d", &a.file, &a.line))
  1619. {
  1620. default:
  1621. case 0:
  1622. --- elfutils/tests/Makefile.am
  1623. +++ elfutils/tests/Makefile.am
  1624. @@ -356,6 +356,7 @@ get_lines_LDADD = $(libdw) $(libelf)
  1625. get_files_LDADD = $(libdw) $(libelf)
  1626. get_aranges_LDADD = $(libdw) $(libelf)
  1627. allfcts_LDADD = $(libdw) $(libelf)
  1628. +line2addr_no_Wformat = yes
  1629. line2addr_LDADD = $(libdw)
  1630. addrscopes_LDADD = $(libdw)
  1631. funcscopes_LDADD = $(libdw)
  1632. --- elfutils/tests/Makefile.in
  1633. +++ elfutils/tests/Makefile.in
  1634. @@ -80,13 +80,14 @@ host_triplet = @host@
  1635. DIST_COMMON = $(top_srcdir)/config/eu.am $(srcdir)/Makefile.in \
  1636. $(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \
  1637. $(top_srcdir)/config/test-driver ChangeLog
  1638. -@STANDALONE_FALSE@am__append_1 = -I$(top_srcdir)/libasm -I$(top_srcdir)/libdw \
  1639. +@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror)
  1640. +@STANDALONE_FALSE@am__append_2 = -I$(top_srcdir)/libasm -I$(top_srcdir)/libdw \
  1641. @STANDALONE_FALSE@ -I$(top_srcdir)/libdwfl -I$(top_srcdir)/libdwelf \
  1642. @STANDALONE_FALSE@ -I$(top_srcdir)/libebl -I$(top_srcdir)/libelf \
  1643. @STANDALONE_FALSE@ -I$(top_srcdir)/lib -I..
  1644. -@STANDALONE_FALSE@am__append_2 = -Wl,-rpath-link,../libasm:../libdw:../libelf
  1645. -@TESTS_RPATH_TRUE@am__append_3 = -Wl,-rpath,$(BUILD_RPATH)
  1646. +@STANDALONE_FALSE@am__append_3 = -Wl,-rpath-link,../libasm:../libdw:../libelf
  1647. +@TESTS_RPATH_TRUE@am__append_4 = -Wl,-rpath,$(BUILD_RPATH)
  1648. check_PROGRAMS = arextract$(EXEEXT) arsymtest$(EXEEXT) \
  1649. newfile$(EXEEXT) saridx$(EXEEXT) scnnames$(EXEEXT) \
  1650. sectiondump$(EXEEXT) showptable$(EXEEXT) update1$(EXEEXT) \
  1651. @@ -111,7 +112,7 @@ check_PROGRAMS = arextract$(EXEEXT) arsy
  1652. backtrace-data$(EXEEXT) backtrace-dwarf$(EXEEXT) \
  1653. debuglink$(EXEEXT) debugaltlink$(EXEEXT) buildid$(EXEEXT) \
  1654. $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_4)
  1655. -@BIARCH_TRUE@am__append_4 = backtrace-child-biarch
  1656. +@BIARCH_TRUE@am__append_5 = backtrace-child-biarch
  1657. TESTS = run-arextract.sh run-arsymtest.sh newfile$(EXEEXT) \
  1658. test-nlist$(EXEEXT) update1$(EXEEXT) update2$(EXEEXT) \
  1659. update3$(EXEEXT) update4$(EXEEXT) run-show-die-info.sh \
  1660. @@ -155,14 +156,14 @@ TESTS = run-arextract.sh run-arsymtest.s
  1661. run-backtrace-core-s390.sh run-backtrace-core-aarch64.sh \
  1662. run-backtrace-demangle.sh run-stack-d-test.sh \
  1663. run-stack-i-test.sh run-readelf-dwz-multi.sh \
  1664. - run-allfcts-multi.sh $(am__EXEEXT_2) $(am__append_7) \
  1665. - $(am__append_8) $(am__EXEEXT_4)
  1666. -@STANDALONE_FALSE@am__append_5 = msg_tst md5-sha1-test
  1667. + run-allfcts-multi.sh $(am__EXEEXT_2) $(am__append_8) \
  1668. + $(am__append_9) $(am__EXEEXT_4)
  1669. @STANDALONE_FALSE@am__append_6 = msg_tst md5-sha1-test
  1670. -@LZMA_TRUE@am__append_7 = run-readelf-s.sh run-dwflsyms.sh
  1671. -@ZLIB_TRUE@am__append_8 = run-readelf-zdebug.sh
  1672. -@HAVE_LIBASM_TRUE@am__append_9 = $(asm_TESTS)
  1673. +@STANDALONE_FALSE@am__append_7 = msg_tst md5-sha1-test
  1674. +@LZMA_TRUE@am__append_8 = run-readelf-s.sh run-dwflsyms.sh
  1675. +@ZLIB_TRUE@am__append_9 = run-readelf-zdebug.sh
  1676. @HAVE_LIBASM_TRUE@am__append_10 = $(asm_TESTS)
  1677. +@HAVE_LIBASM_TRUE@am__append_11 = $(asm_TESTS)
  1678. subdir = tests
  1679. ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
  1680. am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \
  1681. @@ -768,6 +769,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
  1682. INSTALL_SCRIPT = @INSTALL_SCRIPT@
  1683. INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
  1684. LDFLAGS = @LDFLAGS@
  1685. +LD_AS_NEEDED = @LD_AS_NEEDED@
  1686. LEX = @LEX@
  1687. LEXLIB = @LEXLIB@
  1688. LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
  1689. @@ -799,6 +801,7 @@ SHELL = @SHELL@
  1690. STRIP = @STRIP@
  1691. USE_NLS = @USE_NLS@
  1692. VERSION = @VERSION@
  1693. +WEXTRA = @WEXTRA@
  1694. XGETTEXT = @XGETTEXT@
  1695. XGETTEXT_015 = @XGETTEXT_015@
  1696. XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
  1697. @@ -858,17 +861,17 @@ top_build_prefix = @top_build_prefix@
  1698. top_builddir = @top_builddir@
  1699. top_srcdir = @top_srcdir@
  1700. zip_LIBS = @zip_LIBS@
  1701. -AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. $(am__append_1)
  1702. -AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \
  1703. - $(if $($(*F)_no_Werror),,-Werror) \
  1704. - $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
  1705. - $($(*F)_CFLAGS)
  1706. -
  1707. +AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. $(am__append_2)
  1708. +AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
  1709. + $($(*F)_no_Werror),,-Werror) $(if \
  1710. + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
  1711. + $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
  1712. + $(am__append_1)
  1713. COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage, $(COMPILE))
  1714. CLEANFILES = *.gcno *.gcda
  1715. textrel_check = if $(READELF) -d $@ | fgrep -q TEXTREL; then exit 1; fi
  1716. BUILD_RPATH = \$$ORIGIN/../libasm:\$$ORIGIN/../libdw:\$$ORIGIN/../backends:\$$ORIGIN/../libelf
  1717. -AM_LDFLAGS = $(am__append_2) $(am__append_3)
  1718. +AM_LDFLAGS = $(am__append_3) $(am__append_4)
  1719. @TESTS_RPATH_FALSE@tests_rpath = no
  1720. @TESTS_RPATH_TRUE@tests_rpath = yes
  1721. asm_TESTS = asm-tst1 asm-tst2 asm-tst3 asm-tst4 asm-tst5 \
  1722. @@ -1077,6 +1080,7 @@ get_lines_LDADD = $(libdw) $(libelf)
  1723. get_files_LDADD = $(libdw) $(libelf)
  1724. get_aranges_LDADD = $(libdw) $(libelf)
  1725. allfcts_LDADD = $(libdw) $(libelf)
  1726. +line2addr_no_Wformat = yes
  1727. line2addr_LDADD = $(libdw)
  1728. addrscopes_LDADD = $(libdw)
  1729. funcscopes_LDADD = $(libdw)