Commit Graph

46 Commits

Author SHA1 Message Date
Iain Buclaw 2206fb8940 libbacktrace: Suppress the default action-if-found for AC_CHECK_LIBS.
Zlib is not a dependency of libbacktrace, and so it shouldn't be added
to LIBS.

libbacktrace/

	* configure.ac: Move define of HAVE_ZLIB into check for -lz.
	* Makefile.in: Regenerate.
	* config.h.in: Likewise.
	* configure: Likewise.

From-SVN: r263320
2018-08-05 20:24:59 +00:00
H.J. Lu 7b47ecf2f7 Regenerate configure of target libraries
* configure: Regenerated.

From-SVN: r259610
2018-04-24 09:45:26 -07:00
Jakub Jelinek a0e1df888d cet.m4 (GCC_CET_FLAGS): Default to --disable-cet, replace --enable-cet=default with --enable-cet=auto.
* config/cet.m4 (GCC_CET_FLAGS): Default to --disable-cet, replace
	--enable-cet=default with --enable-cet=auto.

	* doc/install.texi: Document --disable-cet being the default and
	--enable-cet=auto.

	* configure: Regenerated.

From-SVN: r259487
2018-04-19 09:45:51 +02:00
Igor Tsimbalist 14e335edc8 CET shouldn't be enabled in 32-bit run-time libraries by defualt
ENDBR32 and RDSSPD are multi-byte NOPs on x86-64 processors and
newer x86 processors, starting Pentium Pro.  They are UD on older
32-bit processors. Detect this at configure time and adjust the
default value for enable_cet. GCC will enable CET in 32-bit run-time
libraries in any case if --enable-cet is used to configure GCC.

	PR target/84148
	* config/cet.m4: Check if target support multi-byte NOPS (SSE).
	* libatomic/configure: Regenerate.
	* libbacktrace/configure: Likewise.
	* libgcc/configure: Likewise.
	* libgfortran/configure: Likewise.
	* libgomp/configure: Likewise.
	* libitm/configure: Likewise.
	* libmpx/configure: Likewise.
	* libobjc/configure: Likewise.
	* libquadmath/configure: Likewise.
	* libsanitizer/configure: Likewise.
	* libssp/configure: Likewise.
	* libstdc++-v3/configure: Likewise.
	* libvtv/configure: Likewise.

From-SVN: r257809
2018-02-19 17:25:49 +01:00
Igor Tsimbalist 44685d378f Enable building libbacktrace with Intel CET
libbacktrace/
	* configure.ac: Add CET_FLAGS to EXTRA_FLAGS.
	* aclocal.m4: Regenerate.
	* Makefile.in: Likewise.
	* configure: Likewise.

From-SVN: r254892
2017-11-17 22:11:42 +01:00
Ian Lance Taylor 8398c1dfe2 ztest.c: #include <errno.h>.
* ztest.c: #include <errno.h>.
	(TEST_TIMING): Don't define, don't test.
	(xclock_gettime, xclockid_t): Define if !HAVE_CLOCK_GETTIME.
	(clockid_t, clock_gettime, CLOCK_REALTIME): Likewise.
	(ZLIB_CLOCK_GETTIME_ARG): Define.
	* configure.ac: Change clock_gettime_link to CLOCK_GETTIME_LINK.
	* Makefile.am: Likewise.
	* configure, Makefile.in: Rebuild.

From-SVN: r253377
2017-10-03 02:27:33 +00:00
Thomas Schwinge dd954c67ab libbacktrace: Support the case that clock_gettime is in librt
libbacktrace/
	PR other/67165
	* Makefile.am: Append the content of clock_gettime_link to
	ztest_LDADD.
	* configure.ac: Test for the case that clock_gettime is in librt.
	* Makefile.in: Regenerate.
	* configure: Likewise.

From-SVN: r253345
2017-10-02 13:56:39 +02:00
Thomas Schwinge dbc31f20d3 libbacktrace: Conditionalize test timing on clock_gettime availability
libbacktrace/
	PR other/67165
	* configure.ac: Check for clock_gettime.
	* config.h.in: Regenerate.
	* configure: Likewise.
	* ztest.c (average_time, test_large): Conditionalize test timing
	on clock_gettime availability.

From-SVN: r253344
2017-10-02 13:56:25 +02:00
Ian Lance Taylor 8da872d9ca re PR other/67165 (please enable libbacktrace to work with compressed debug sections)
PR other/67165
	* elf.c (__builtin_prefetch): Define if not __GNUC__.
	(unlikely): Define.
	(SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define.
	(b_elf_chdr): Define type.
	(enum debug_section): Add ZDEBUG_xxx values.
	(debug_section_names): Add names for new sections.
	(struct debug_section_info): Add compressed field.
	(elf_zlib_failed, elf_zlib_fetch): New static functions.
	(HUFFMAN_TABLE_SIZE, HUFFMAN_VALUE_MASK): Define.
	(HUFFMAN_BITS_SHIFT, HUFFMAN_BITS_MASK): Define.
	(HUFFMAN_SECONDARY_SHIFT): Define.
	(ZDEBUG_TABLE_SIZE): Define.
	(ZDEBUG_TABLE_CODELEN_OFFSET, ZDEBUG_TABLE_WORK_OFFSET): Define.
	(final_next_secondary): New static variable if
	BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE.
	(elf_zlib_inflate_table): New static function.
	(BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE): If define, define main
	function to produce fixed Huffman table.
	(elf_zlib_default_table): New static variable.
	(elf_zlib_inflate): New static function.
	(elf_zlib_verify_checksum): Likewise.
	(elf_zlib_inflate_and_verify): Likewise.
	(elf_uncompress_zdebug): Likewise.
	(elf_uncompress_chdr): Likewise.
	(backtrace_uncompress_zdebug): New extern function.
	(elf_add): Look for .zdebug sections and SHF_COMPRESSED debug
	sections, and uncompress them.
	* internal.h (backtrace_compress_zdebug): Declare.
	* ztest.c: New file.
	* configure.ac: Check for -lz and check whether the linker
	supports --compress-debug-sections.
	* Makefile.am (ztest_SOURCES): New variable.
	(ztest_CFLAGS, ztest_LDADD): New variables.
	(check_PROGRAMS): Add ztest.
	(ctestg_SOURCES): New variable.
	(ctestg_CFLAGS, ctestg_LDFLAGS, ctestg_LDADD): New variables.
	(ctesta_SOURCES): New variable.
	(ctesta_CFLAGS, ctesta_LDFLAGS, ctesta_LDADD): New variables.
	(check_PROGRAMS): Add ctestg and ctesta.
	* configure, config.h.in, Makefile.in: Rebuild.

From-SVN: r253275
2017-09-29 00:30:35 +00:00
Ian Lance Taylor 8c2ea6b20a re PR sanitizer/77631 (no symbols in backtrace shown by ASan when debug info is split)
PR sanitizer/77631
	* configure.ac: Check for lstat and readlink.
	* elf.c (lstat, readlink): Provide dummy versions if real versions
	are not available.
	* configure, config.h.in: Rebuild.

From-SVN: r253095
2017-09-22 13:38:10 +00:00
Ian Lance Taylor 9283471ba0 re PR sanitizer/77631 (no symbols in backtrace shown by ASan when debug info is split)
PR sanitizer/77631
	Support for external debug info.
	* elf.c: Include <errno.h>, <sys/stat.h>, <unistd.h>.
	(S_ISLNK): Define if not defined.
	(xstrnlen): Define if strnlen is not available.
	(b_elf_note): Define type.
	(NT_GNU_BUILD_ID): Define macro.
	(elf_crc32, elf_crc32_file): New static functions.
	(elf_is_symlink, elf_readlink): New static functions.
	(elf_open_debugfile_by_buildid): New static function.
	(elf_try_debugfile): New static function.
	(elf_find_debugfile_by_debuglink): New static function.
	(elf_open_debugfile_by_debuglink): New static function.
	(elf_add): Add filename and debuginfo parameters.  Adjust all
	callers.  Look for external debug info notes, and try to fetch
	debug info from external file.
	(struct phdr_data): Add exe_filename field.
	(phdr_callback): Pass filename to elf_add.
	(backtrace_initialize): Add filename parameter.
	* internal.h (backtrace_initialize): Add filename parameter.
	* fileline.c (fileline_initialize): Pass filename to
	backtrace_initialize.
	* pecoff.c (fileline_initialize): Add unused filename parameter.
	* unknown.c (fileline_initialize): Likewise.
	* xcoff.c (fileline_initialize): Likewise.
	* configure.ac: Check for objcopy --add-gnu-debuglink.
	* Makefile.am (dtest): New test target.
	* configure, Makefile.in: Rebuild.

Co-Authored-By: Denis Khalikov <d.khalikov@partner.samsung.com>

From-SVN: r253032
2017-09-20 21:09:37 +00:00
Tony Reix 7e2a8417f7 configure.ac: Check for XCOFF32/XCOFF64.
* configure.ac: Check for XCOFF32/XCOFF64.  Check for loadquery.
	* filetype.awk: Separate AIX XCOFF32 and XCOFF64.
	* xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats.
	* configure, config.h.in: Regenerate.

From-SVN: r250590
2017-07-26 21:43:28 +00:00
Tony Reix b3530b946f filetype.awk: Add AIX XCOFF type detection.
* filetype.awk: Add AIX XCOFF type detection.
	* configure.ac: Recognize xcoff format.
	* Makefile.am (FORMAT_FILES): Add xcoff.c.
	* fileline.c: Include <unistd.h>.
	(fileline_initialize): Add case for AIX procfs.
	* xcoff.c: New file.
	* configure, Makefile.in: Rebuild.

From-SVN: r250435
2017-07-21 18:05:08 +00:00
Richard Biener e91a2ddc1f configure.ac: Add AC_SYS_LARGEFILE.
2017-06-21  Richard Biener  <rguenther@suse.de>

	* configure.ac: Add AC_SYS_LARGEFILE.
	* config.h.in: Regenerate.
	* configure: Likewise.

From-SVN: r249436
2017-06-21 07:04:13 +00:00
Ian Lance Taylor d1609a2326 elf.c (backtrace_initialize): Always set *fileline_fn.
* elf.c (backtrace_initialize): Always set *fileline_fn.
	* ttest.c: New file.
	* btest.c: Move support functions into testlib.c.  Change calls to
	check to pass file name.
	* testlib.c: New file, copied from (part of) btest.c.
	* testlib.h: New file, declarations for testlib.c.
	* edtest.c: Use testlib.h and testlib.c.
	* configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
	* Makefile.am (btest_SOURCES): Add testlib.c.
	(edtest_SOURCES): Likewise.
	(CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
	(ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
	* configure, Makefile.in: Rebuild.

From-SVN: r249111
2017-06-12 03:25:04 +00:00
Matthias Klose 84c1b9d3d4 config-ml.in: Remove references to GCJ.
<toplevel>

2016-11-15  Matthias Klose  <doko@ubuntu.com>

	* config-ml.in: Remove references to GCJ.
	* configure.ac: Likewise.
	* configure: Regenerate.

config/

2016-11-15  Matthias Klose  <doko@ubuntu.com>

	multi.m4: Don't set GCJ.

gcc/

2016-11-15  Matthias Klose  <doko@ubuntu.com>

	* doc/install.texi: Remove references to gcj/libjava.
	* doc/invoke.texi: Likewise.

*/ (where necessary)

2016-11-15  Matthias Klose  <doko@ubuntu.com>

	* configure: Regenerate.

From-SVN: r242433
2016-11-15 16:34:02 +00:00
Andris Pavenis 5b4bbc7dfb Specify that DJGPP do not have mmap even when sys/mman.h exists
* configure.ac: Specify that DJGPP do not have mmap even when sys/mman.h exists
	* configure: Regenerate

From-SVN: r231802
2015-12-18 06:36:11 +02:00
John David Anglin 2f401a8f18 PR 68115/libfortran
PR 68115/libfortran
	* configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
	* configure: Regenerate.
	* elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
	to void.

From-SVN: r231485
2015-12-10 01:08:13 +00:00
Ulrich Weigand 8f5027bf14 configure.ac: For spu-*-* targets, set have_fcntl to no.
* configure.ac: For spu-*-* targets, set have_fcntl to no.
	* configure: Regenerate.

From-SVN: r227348
2015-08-31 14:03:34 +00:00
Ulrich Weigand 7e5c754721 configure.ac: Remove [disable-shared] argument to LT_INIT.
* configure.ac: Remove [disable-shared] argument to LT_INIT.
	Remove setting PIC_FLAG when building as target library.
	* configure: Regenerate.

From-SVN: r227261
2015-08-27 14:08:19 +00:00
Hans-Peter Nilsson 7ce9cf39a4 configure.ac: Only compile with -fPIC if the target supports it.
* configure.ac: Only compile with -fPIC if the target
	supports it.
	* configure: Regenerate.

From-SVN: r227203
2015-08-25 23:32:06 +00:00
Ulrich Weigand 1b533361da configure.ac: Set have_mmap to no on spu-*-* targets.
* configure.ac: Set have_mmap to no on spu-*-* targets.
	* configure: Regenerate.

From-SVN: r227145
2015-08-24 18:48:28 +00:00
Tristan Gingold e24afc10e0 libbacktrace: add support of PE/COFF
libbacktrace/
2015-05-29  Tristan Gingold  <gingold@adacore.com>

	* pecoff.c: New file.
	* Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
	* Makefile.in: Regenerate.
	* filetype.awk: Detect pecoff.
	* configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
	Add pecoff.
	* btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
	true.
	* backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
	* configure: Regenerate.
	* pecoff.c: New file.

From-SVN: r223859
2015-05-29 08:40:20 +00:00
Michael Haubenwallner df96c0f79a libbacktrace: Bump to automake 1.11.6
2015-05-13  Michael Haubenwallner  <michael.haubenwallner@ssi-schaefer.com>

	* Makefile.in: Regenerated with automake-1.11.6.
	* aclocal.m4: Likewise.
	* configure: Likewise.

From-SVN: r223128
2015-05-13 10:58:11 +00:00
Matthias Klose 405a6b1c93 configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
2015-01-24  Matthias Klose  <doko@ubuntu.com>

        * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
        * configure: Regenerate.

From-SVN: r220075
2015-01-24 02:46:22 +00:00
H.J. Lu a699d67255 Always use PIC option with -shared in libtool
Libtool needs to pass PIC option -shared when creating shared object to
link regular object files with slim-lto archive.

	PR bootstrap/63784
	* libtool.m4: Add $pic_flag with -shared.

boehm-gc/

	PR bootstrap/63784
	* configure: Regenerated.

gcc/

	PR bootstrap/63784
	* configure: Regenerated.

libatomic/

	PR bootstrap/63784
	* configure: Regenerated.

libbacktrace/

	PR bootstrap/63784
	* configure: Regenerated.

libcc1/

	PR bootstrap/63784
	* configure: Regenerated.

libcilkrts/

	PR bootstrap/63784
	* configure: Regenerated.

libffi/

	PR bootstrap/63784
	* configure: Regenerated.

libgfortran/

	PR bootstrap/63784
	* configure: Regenerated.

libgomp/

	PR bootstrap/63784
	* configure: Regenerated.

libitm/

	PR bootstrap/63784
	* configure: Regenerated.

libjava/

	PR bootstrap/63784
	* configure: Regenerated.

libjava/classpath/

	PR bootstrap/63784
	* configure: Regenerated.

libobjc/

	PR bootstrap/63784
	* configure: Regenerated.

libquadmath/

	PR bootstrap/63784
	* configure: Regenerated.

libsanitizer/

	PR bootstrap/63784
	* configure: Regenerated.

libssp/

	PR bootstrap/63784
	* configure: Regenerated.

libstdc++-v3/

	PR bootstrap/63784
	* configure: Regenerated.

libvtv/

	PR bootstrap/63784
	* configure: Regenerated.

lto-plugin/

	PR bootstrap/63784
	* configure: Regenerated.

From-SVN: r217937
2014-11-21 08:49:17 -08:00
Francois-Xavier Coudert ebf6d33b73 re PR target/63610 (Fixing the libtool bug for Yosemite (darwin14))
toplevel:
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* libtool.m4: Fix globbing of darwin versions.

boehm-gc/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

gcc/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libatomic/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libbacktrace/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libcc1/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libcilkrts/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libffi/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libgfortran/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libgomp/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libitm/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libobjc/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libquadmath/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libsanitizer/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libssp/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libstdc++-v3/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libvtv/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

lto-plugin/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libjava/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libjava/classpath/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

zlib/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

From-SVN: r217366
2014-11-11 20:25:18 +00:00
Misty De Meo 63fefb4bc9 re PR libgcc/58710 (HAVE_GETIPINFO is incorrectly set on Mac OS X 10.4)
PR target/58710
	* configure.ac: Use AC_LINK_IFELSE in check for
	_Unwind_GetIPInfo.
	* configure: Regenerate.

From-SVN: r207612
2014-02-07 21:10:55 +00:00
Ian Lance Taylor 49579c7e20 configure.ac: Check for support of __atomic extensions.
* configure.ac: Check for support of __atomic extensions.
	* internal.h: Declare or #define atomic functions for use in
	backtrace code.
	* atomic.c: New file.
	* dwarf.c (dwarf_lookup_pc): Use atomic functions.
	(dwarf_fileline, backtrace_dwarf_add): Likewise.
	* elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
	(backtrace_initialize): Likewise.
	* fileline.c (fileline_initialize): Likewise.
	* Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
	* configure, config.h.in, Makefile.in: Rebuild.

From-SVN: r204994
2013-11-19 01:09:47 +00:00
David Malcolm 459260ecf8 Add --enable-host-shared configuration option
/
	* configure.ac: Add --enable-host-shared
	* configure: Regenerate.

gcc/
	* Makefile.in (PICFLAG): New.
	(enable_host_shared): New.
	(INTERNAL_CFLAGS): Use PICFLAG.
	(LIBIBERTY): Use pic build of libiberty.a if configured with
	--enable-host-shared.
	* configure.ac: Add --enable-host-shared, setting up new
	PICFLAG variable.
	* configure: Regenerate.
	* doc/install.texi (--enable-shared): Add note contrasting it
	with...
	(--enable-host-shared): New option.

libbacktrace/
	* configure.ac: Add --enable-host-shared, setting up
	pre-existing PIC_FLAG variable within Makefile.am et al.
	* configure: Regenerate.

libcpp/
	* Makefile.in (PICFLAG): New.
	(ALL_CFLAGS): Add PICFLAG.
	(ALL_CXXFLAGS): Likewise.
	* configure.ac: Add --enable-host-shared, setting up new
	PICFLAG variable.
	* configure: Regenerate.

libdecnumber/
	* Makefile.in (PICFLAG): New.
	(ALL_CFLAGS): Add PICFLAG.
	* configure.ac: Add --enable-host-shared, setting up new
	PICFLAG variable.
	* configure: Regenerate.

libiberty/
	* configure.ac: If --enable-host-shared, use -fPIC.
	* configure: Regenerate.

zlib/
	* configure.ac: Add --enable-host-shared, setting up new
	PICFLAG variable.
	* Makefile.am: Add PICFLAG to libz_a_CFLAGS.
	* Makefile.in: Regenerate.
	* configure: Regenerate.

From-SVN: r203632
2013-10-15 20:33:55 +00:00
Alan Modra 3cbe17f7de libtool.m4 (_LT_ENABLE_LOCK <ld -m flags>): Remove non-canonical ppc host match.
* libtool.m4 (_LT_ENABLE_LOCK <ld -m flags>): Remove non-canonical
	ppc host match.  Support little-endian powerpc linux hosts.
Regenerate configure throughout.

From-SVN: r202773
2013-09-20 19:17:52 +09:30
Jakub Jelinek 36a58fb342 re PR bootstrap/54926 (Bootstrap comparison failure for various files in libbacktrace)
PR bootstrap/54926
	* Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
	* configure.ac: If --with-target-subdir, add -frandom-seed=$@
	to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
	accepts it.
	* Makefile.in: Regenerated.
	* configure: Regenerated.

From-SVN: r194412
2012-12-11 19:45:45 +01:00
Ian Lance Taylor 73c3ed27fc re PR other/55312 (libbacktrace doesn't honor --disable-werror)
PR other/55312
	* configure.ac: Only add -Werror if building a target library.

From-SVN: r193485
2012-11-13 21:25:39 +00:00
Ian Lance Taylor 33521509a8 configure.ac: Check for getexecname.
* configure.ac: Check for getexecname.
	* fileline.c: #include <errno.h>.  Define getexecname if not
	available.
	(fileline_initialize): Try to find the executable in a few
	different ways.
	* print.c (error_callback): Only print the filename if it came
	from the backtrace state.
	* configure, config.h.in: Rebuild.

Co-Authored-By: Gerald Pfeifer <gerald@pfeifer.com>
Co-Authored-By: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>

From-SVN: r193454
2012-11-12 21:24:19 +00:00
Jack Howarth 385710cf27 re PR target/55061 (libbacktrace build fails during bootstrap on powerpc-apple-darwin9)
PR target/55061
	* configure.ac: Check for _Unwind_GetIPInfo function declaration.
	* configure: Regenerate.

From-SVN: r192853
2012-10-26 17:34:59 +00:00
Ian Lance Taylor 32061319f7 re PR target/55061 (libbacktrace build fails during bootstrap on powerpc-apple-darwin9)
PR target/55061
	* configure.ac: Check whether -funwind-tables option works.
	* configure: Rebuild.

From-SVN: r192782
2012-10-24 21:09:55 +00:00
Ian Lance Taylor 5551b12c31 configure.ac: Do not use dl_iterate_phdr on Solaris 10.
* configure.ac: Do not use dl_iterate_phdr on Solaris 10.
	* configure: Rebuild.

From-SVN: r192371
2012-10-11 16:43:47 +00:00
Ian Lance Taylor e561a9920c Add support for tracing through shared libraries.
* configure.ac: Check for link.h and dl_iterate_phdr.
	* elf.c: #include <link.h> if system has dl_iterate_phdr.  #undef
	ELF macros before #defining them.
	(dl_phdr_info, dl_iterate_phdr): Define if system does not have
	dl_iterate_phdr.
	(struct elf_syminfo_data): Add next field.
	(elf_initialize_syminfo): Initialize next field.
	(elf_add_syminfo_data): New static function.
	(elf_add): New static function, broken out of
	backtrace_initialize.  Call backtrace_dwarf_add instead of
	backtrace_dwarf_initialize.
	(struct phdr_data): Define.
	(phdr_callback): New static function.
	(backtrace_initialize): Call elf_add.
	* dwarf.c (struct dwarf_data): Add next and base_address fields.
	(add_unit_addr): Add base_address parameter.  Change all callers.
	(add_unit_ranges, build_address_map): Likewise.
	(add_line): Add ddata parameter.  Change all callers.
	(read_line_program, add_function_range): Likewise.
	(dwarf_lookup_pc): New static function, broken out of
	dwarf_fileline.
	(dwarf_fileline): Call dwarf_lookup_pc.
	(build_dwarf_data): New static function.
	(backtrace_dwarf_add): New function.
	(backtrace_dwarf_initialize): Remove.
	* internal.h (backtrace_dwarf_initialize): Don't declare.
	(backtrace_dwarf_add): Declare.
	* configure, config.h.in: Rebuild.

From-SVN: r192267
2012-10-09 18:20:45 +00:00
Uros Bizjak 5619500911 re PR other/54761 (FAIL log)
PR other/54761
        * configure.ac (EXTRA_FLAGS): New.
	* Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
        * configure, Makefile.in: Regenerate.

From-SVN: r191981
2012-10-02 15:14:25 +02:00
Ian Lance Taylor af710874e9 re PR bootstrap/54732 (Installation failure: libbacktrace rebuilds upon install when built with "make bootstrap-lean")
PR bootstrap/54732
	* configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
	* Makefile.am: Add dependencies for all objects.
	* configure, aclocal.m4, Makefile.in: Rebuild.

From-SVN: r191819
2012-09-28 06:13:00 +00:00
Ian Lance Taylor 64b89453bc configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled as a target library.
* configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
	as a target library.
	* configure: Rebuild.

From-SVN: r191503
2012-09-19 22:57:53 +00:00
Rainer Orth 768505569c configure.ac (GCC_HEADER_STDINT): Invoke.
* configure.ac (GCC_HEADER_STDINT): Invoke.
        * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
        * btest.c: Don't include <stdint.h>.
        * dwarf.c: Likewise.
        * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.

Co-Authored-By: Ian Lance Taylor <iant@google.com>

From-SVN: r191474
2012-09-19 13:41:33 +00:00
Ian Lance Taylor 3319ef17d2 posix.c (O_BINARY): Define if not defined.
* posix.c (O_BINARY): Define if not defined.
	(backtrace_open): Pass O_BINARY to open.  Only call fcntl if
	HAVE_FCNTL is defined.
	* configure.ac: Test for the fcntl function.
	* configure, config.h.in: Rebuild.

From-SVN: r191443
2012-09-18 18:06:28 +00:00
Ian Lance Taylor d4c059d582 configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
* configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
	* mmapio.c: Don't define _GNU_SOURCE.
	* configure, config.h.in: Rebuild.

From-SVN: r191435
2012-09-18 16:36:48 +00:00
Ian Lance Taylor 772a71a959 configure.ac: Check whether strnlen is declared.
* configure.ac: Check whether strnlen is declared.
	* dwarf.c: Declare strnlen if not declared.
	* configure, config.h.in: Rebuild.

From-SVN: r191433
2012-09-18 16:06:53 +00:00
Ian Lance Taylor eff02e4f84 libbacktrace/:
* Initial implementation.

./:
	* MAINTAINERS (Various Maintainers): Add libbacktrace.
	* configure.ac (host_libs): Add libbacktrace.
	(target_libraries): Add libbacktrace.
	* Makefile.def (host_modules): Add libbacktrace.
	(target_modules): Likewise.
	* configure, Makefile.in: Rebuild.

gcc/go:
	* config-lang.in (target_libs): Add target-libbacktrace.

From-SVN: r191397
2012-09-17 16:38:38 +00:00