Commit Graph

237 Commits

Author SHA1 Message Date
Ulrich Weigand 2f2aeda98f Remove Cell Broadband Engine SPU targets
From-SVN: r275343
2019-09-03 15:08:28 +00:00
Clement Chigot 245254b8bb Makefile.am (BUILDTESTS): Remove test_elf, add test_elf_32 and test_elf_64.
* Makefile.am (BUILDTESTS): Remove test_elf, add test_elf_32 and
	test_elf_64.
	* Makefile.in: Regenerate.

From-SVN: r271602
2019-05-24 11:55:21 +00:00
Rainer Orth ccd1242eec Remove obsolete Solaris 10 support
libstdc++-v3:
	* config/os/solaris/solaris2.10: Move to ...
	* config/os/solaris: ... this.
	* configure.host (os_include_dir): Adapt.
	(abi_baseline_pair): Remove Solaris 10 handling.
	* config/abi/post/i386-solaris2.10: Remove.
	* config/abi/post/sparc-solaris2.10: Remove.
	* config/abi/post/i386-solaris2.11: Rename to ...
	* config/abi/post/i386-solaris: ... this.
	* config/abi/post/sparc-solaris2.11: Rename to ...
	* config/abi/post/sparc-solaris: ... this.

	* libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] [__sun]: Remove
	workaround.

	* testsuite/ext/enc_filebuf/char/13598.cc: Remove *-*-solaris2.10
	xfail.

	libsanitizer:
	* configure.ac (have_dl_iterate_phdr): Remove *-*-solaris2.10*
	handling.
	* configure: Regenerate.

	libgcc:
	* config.host: Simplify various *-*-solaris2.1[0-9]* to
	*-*-solaris2*.
	* configure.ac: Likewise.
	* configure: Regenerate.

	* config/i386/sol2-unwind.h (x86_fallback_frame_state): Remove
	Solaris 10 and Solaris 11 < snv_125 handling.

	libbacktrace:
	* configure.ac (have_dl_iterate_phdr): Remove *-*-solaris2.10*
	handling.
	* configure: Regenerate.

	gcc/testsuite:
	* gcc.dg/atomic/c11-atomic-exec-4.c: Simplify triplet to
	*-*-solaris2*.
	* gcc.dg/atomic/c11-atomic-exec-5.c: Likewise.
	* gcc.dg/c99-math-double-1.c: Likewise.
	* gcc.dg/c99-math-float-1.c: Likewise.
	* gcc.dg/c99-math-long-double-1.c: Likewise.
	* gcc.misc-tests/linkage.exp: Simplify triplet to
	x86_64-*-solaris2*.

	* gcc.target/i386/mcount_pic.c: Remove *-*-solaris2.10* && !gld
	xfail.
	* gcc.target/i386/pr63620.c: Likewise.

	* lib/target-supports.exp (check_sse_os_support_available): Remove
	Solaris 9/x86 workaround.

	gcc:
	* config.gcc: Move *-*-solaris2.10* from obsolete configurations
	to unsupported ones.
	Simplify x86_64-*-solaris2.1[0-9]* to x86_64-*-solaris2*.
	* config.host: Likewise.
	* config/i386/sol2.h (ASM_COMMENT_START): Remove.
	* config/sparc/driver-sparc.c (host_detect_local_cpu) [__sun__ &&
	__svr4__]: Remove "brand" fallback.
	[!KSTAT_DATA_STRING]: Remove.
	* configure.ac (gcc_cv_ld_hidden): Simplify *-*-solaris2.1[0-9]*
	to *-*-solaris2*.
	(comdat_group): Likewise.
	(set_have_as_tls): Likewise.
	(gcc_cv_target_dl_iterate_phdr): Likewise.
	(gcc_cv_as_shf_merge): Remove Solaris 10/x86 workaround.
	(gcc_cv_ld_aligned_shf_merge): Remove Solaris 10/SPARC workaround.
	* configure: Regenerate.
	* doc/install.texi: Simplify Solaris target triplets.
	(Specific, i?86-*-solaris2*): Remove Solaris 10 references.
	(Specific, *-*-solaris2*): Document Solaris 10 removal.
	Remove Solaris 10 references.
	Remove obsolete Solaris bug reference.
	(Specific, sparc-sun-solaris2.10): Remove.

From-SVN: r271183
2019-05-14 17:17:23 +00:00
Ian Lance Taylor 7856fb4539 re PR libbacktrace/89669 (/usr/ccs/bin/ld: Unsatisfied symbols: backtrace_uncompress_zdebug)
PR libbacktrace/89669
	* Makefile.am (BUILDTESTS): Only add ztest and ztest_alloc if
	HAVE_ELF.
	* Makefile.in: Regenerate.

From-SVN: r269594
2019-03-11 20:40:34 +00:00
Tom de Vries 067aef033f [libbacktrace] Fix btest-lto for older gcc
With gcc 4.8.5, btest_lto ends up with a privatized name for the variable with
name 'global':
...
$ nm btest_lto | grep ' d ' | grep global
0000000000617150 d global.2530
...
which makes test5 fail:
...
    test5: unexpected syminfo name got global.2530 expected global
...

Fix this failure by accepting this type of name as a valid name in btest_lto.

2019-02-26  Tom de Vries  <tdevries@suse.de>

	* btest.c (test5): Allow global.* as minimal symbol name for global.

From-SVN: r269217
2019-02-26 16:09:40 +00:00
Tom de Vries d831b1ec03 [libbacktrace] Require dwz for b3test_dwz_buildid
If dwz is not available, then the libbacktrace test b3test_dwz_buildid fails
like this:
...
gmake[4]: *** No rule to make target 'b3test_dwz_buildid'
...

Fix this by guarding the test with HAVE_DWZ.

Tested on x86_64 with and without dwz installed.

2019-02-26  Tom de Vries  <tdevries@suse.de>

	* Makefile.am (TESTS): Only add b3test_dwz_buildid if HAVE_DWZ.
	* Makefile.in: Regenerate.

From-SVN: r269204
2019-02-26 07:54:57 +00:00
Tom de Vries 68641fb77c [libbacktrace] Handle bsearch with NULL base in dwarf_lookup_pc
The call to bsearch in dwarf_lookup_pc can have NULL as base argument when
the nmemb argument is 0.  The base argument is required to be pointing to the
initial member of an array of nmemb objects.  It is not specified what
constitutes a valid pointer to an array of 0 objects, but glibc declares base
with attribute non-null, so the NULL will trigger a sanitizer runtime error.

Fix this by only calling bsearch if nmemb != 0.

2019-02-12  Tom de Vries  <tdevries@suse.de>

	PR libbacktrace/81983
	* dwarf.c (dwarf_lookup_pc): Don't call bsearch if nmemb == 0.

From-SVN: r268796
2019-02-12 14:00:59 +00:00
Tom de Vries c51b2c8ce3 [libbacktrace] Add btest_lto
Add libbacktrace test-case using -flto.

2019-02-10  Tom de Vries  <tdevries@suse.de>

	* Makefile.am (BUILDTESTS): Add btest_lto.
	* Makefile.in: Regenerate.
	* btest.c (test1, f2, f3, test3, f22, f23): Declare with
	__attribute__((noclone)).

From-SVN: r268736
2019-02-10 03:16:09 +00:00
Tom de Vries 4af50e13a0 [libbacktrace] Declare external backtrace fns noinline
The backtrace functions backtrace_full, backtrace_print and backtrace_simple
walk the call stack, but make sure to skip the first entry, in order to skip
over the functions themselves, and start the backtrace at the caller of the
functions.

When compiling with -flto, the functions may be inlined, causing them to skip
over the caller instead.

Fix this by declaring the functions with __attribute__((noinline)).

2019-02-08  Tom de Vries  <tdevries@suse.de>

	* backtrace.c (backtrace_full): Declare with __attribute__((noinline)).
	* print.c (backtrace_print): Same.
	* simple.c (backtrace_simple): Same.

From-SVN: r268668
2019-02-08 09:49:06 +00:00
Tom de Vries 2bd0a246c6 [libbacktrace] Handle DW_FORM_ref_addr
Add handling of the DW_FORM_ref_addr encoding to libbacktrace.

2019-02-08  Tom de Vries  <tdevries@suse.de>

	PR libbacktrace/78063
	* dwarf.c (build_address_map): Keep all parsed units.
	(read_referenced_name_from_attr): Handle DW_FORM_ref_addr.

From-SVN: r268663
2019-02-08 05:55:44 +00:00
Tom de Vries 3a3f5dd1af [libbacktrace] Fix .gnu_debugaltlink build-id check
The 'debugaltlink_name_len =+ 1' bug reported in PR89136 exposes the fact that
the build-id is not verified for the .gnu_debugaltlink.

Fix both problems.

2019-01-31  Tom de Vries  <tdevries@suse.de>

	PR libbacktrace/89136
	* elf.c (elf_add): Read build-id if with_buildid_data.  Fix
	'debugaltlink_name_len =+ 1'.

From-SVN: r268419
2019-01-31 12:17:32 +00:00
Tom de Vries fddbc19325 [libbacktrace] Add test-cases exercising build-id and dwz
Add test-cases b2test_buildid and b3test_dwz_buildid.

The last one triggers the segfault fixed by "[backtrace] Avoid segfault"
( r268275 ).

2019-01-29  Tom de Vries  <tdevries@suse.de>

	* install-debuginfo-for-buildid.sh.in: New script.
	* Makefile.am (check_PROGRAMS): Add b2test and b3test.
	(TESTS): Add b2test_buildid and b3test_dwz_buildid.
	* Makefile.in: Regenerate.
	* configure.ac (HAVE_ELF): Set with AM_CONDITIONAL.
	(READELF): Set with AC_CHECK_PROG.
	(install-debuginfo-for-buildid.sh): Generate with AC_CONFIG_FILES.
	* configure: Regenerate.
	* elf.c (SYSTEM_BUILD_ID_DIR): Factor out of ...
	(elf_open_debugfile_by_buildid): ... here.

From-SVN: r268369
2019-01-29 16:25:46 +00:00
Tom de Vries 57f0d30384 [libbacktrace] Don't assign check_PROGRAMS to TESTS
In automake files, the check_PROGRAMS variable lists programs that need to be
build for testing, and TESTS lists the programs that need to be run.

The libbacktrace/Makefile.am uses a shortcut:
...
TESTS = $(check_PROGRAMS)
...
to make sure that each program added with:
...
check_PROGRAMS += foo
...
is both build and run.

However, for the allocfail.sh test, we need allocfail to be build and
allocfail.sh to be run:
...
check_PROGRAMS += allocfail
TESTS += allocfail.sh
...
but the shortcut causes allocfail also to be run, which is not required.

Fix this by removing the short-cut, allowing check_PROGRAMS to retain its
original semantics, and introducing a variable BUILDTESTS for programs that
need to be both build and run.

2019-01-29  Tom de Vries  <tdevries@suse.de>

	* Makefile.am: Replace check_PROGRAMS with BUILDTESTS, except for
	allocfail.
	(TESTS): Don't add check_PROGRAMS. Add BUILDTESTS.
	(check_PROGRAMS): Add BUILDTESTS.
	* Makefile.in: Regenerate.

From-SVN: r268360
2019-01-29 07:22:16 +00:00
Tom de Vries 62d4a355b7 [libbacktrace] Fix and simplify xcoff_%.c pattern rule
When generating xcoff_%.c, the last command is a sed command.  In case of a
sed failure, this will leave an incomplete file, which will appear as up to
date to make, so consequently it will not be regenerated.  Fix this by
sedding into a temporary file instead.

Also, use $< to access the prerequisite xcoff.c, instead of spelling out the
file name once more.

2019-01-28  Tom de Vries  <tdevries@suse.de>

	* Makefile.am (xcoff_%.c): Generate sed result into temporary file.
	Use $< to access prerequisite.
	* Makefile.in: Regenerate.

From-SVN: r268344
2019-01-28 22:21:19 +00:00
Nathan Sidwell 4bfcd13938 [backtrace] Avoid segfault
https://gcc.gnu.org/ml/gcc-patches/2019-01/msg01521.html

	* elf.c (elf_add): Pass "" filename to recursive call with
	separated debug.

From-SVN: r268275
2019-01-25 17:16:53 +00:00
Tom de Vries c75795fa1d [libbacktrace] Fix strrchr segfault
Currently, when running a libbacktrace testcase t with .gnu_debuglink to
t.debug, and t.debug having a .gnu_debugaltlink to t.alt.debug, a segfault
is triggered when calling strrchr with a NULL string from
elf_find_debugfile_by_debuglink.  The NULL string originates from the elf_add
called for the .gnu_debugaltlink, which uses NULL as filename argument.

Fix this by using "" as filename argument instead.

2019-01-25  Tom de Vries  <tdevries@suse.de>

	* elf.c (elf_add): When handling .gnu_debugaltlink, call elf_add with
	filename == "".
	* Makefile.am (TESTS): Add btest_dwz_gnudebuglink.
	* Makefile.in: Regenerate.

From-SVN: r268269
2019-01-25 14:39:58 +00:00
Tom de Vries 37ab491dce [libbacktrace] Rename dtest to btest_gnudebuglink
Create a pattern rule for copying an existing test-case, separating out the
debug information into a .debug file, and referencing the .debug file from
the copied test-case using a .gnu_debuglink.

2019-01-25  Tom de Vries  <tdevries@suse.de>

	* Makefile.am: Rewrite dtest rule into "%_gnudebuglink" pattern rule.
	(TESTS): Rename dtest to btest_gnudebuglink.
	* Makefile.in: Regenerate.

From-SVN: r268268
2019-01-25 14:39:47 +00:00
Tom de Vries 3f5d2012fb [libbacktrace] Use size_t for low_offset/high_offset fields of struct unit
2019-01-23  Tom de Vries  <tdevries@suse.de>

	* dwarf.c (struct unit): Use size_t for low_offset/high_offset fields.
	(units_search, find_unit): Use size_t for offset.
	(build_address_map): Use size_t for unit_offset.

From-SVN: r268180
2019-01-23 10:22:43 +00:00
Gerald Pfeifer 5e2a724199 * allocfail.c (main): Increase portability of printf statement.
From-SVN: r268105
2019-01-20 15:09:02 +00:00
Ian Lance Taylor 8b248c17bd re PR libbacktrace/88890 (libbacktrace on 32-bit system with _FILE_OFFSET_BITS == 64)
PR libbacktrace/88890
	* mmapio.c (backtrace_get_view): Change size parameter to
	uint64_t.  Check that value fits in size_t.
	* read.c (backtrace_get_view): Likewise.
	* internal.h (backtrace_get_view): Update declaration.
	* elf.c (elf_add): Pass shstrhdr->sh_size to backtrace_get_view.

From-SVN: r268082
2019-01-18 17:13:59 +00:00
Tom de Vries 10f48858e8 [libbacktrace] Add btest_dwz test-case
Add test-case to verify that libbacktrace can read debug info that was
compressed with dwz.

2019-01-17  Tom de Vries  <tdevries@suse.de>

	PR libbacktrace/82857
	* configure.ac (DWZ): Set with AC_CHECK_PROG.
	(HAVE_DWZ): Set with AM_CONDITIONAL.
	* configure: Regenerate.
	* Makefile.am (TESTS): Add btest_dwz.
	* Makefile.in: Regenerate.

From-SVN: r268032
2019-01-17 13:42:30 +00:00
Tom de Vries 1c2a9a37c6 [libbacktrace] Handle DW_FORM_GNU_ref_alt
Handle DW_FORM_GNU_ref_alt which references the .debug_info section in the
.gnu_debugaltlink file.

2019-01-17  Tom de Vries  <tdevries@suse.de>

	PR libbacktrace/82857
	* dwarf.c (enum attr_val_encoding): Add ATTR_VAL_REF_ALT_INFO.
	(read_attribute): Handle DW_FORM_GNU_ref_alt using
	ATTR_VAL_REF_ALT_INFO.
	(read_referenced_name_from_attr): Handle DW_FORM_GNU_ref_alt.

From-SVN: r268031
2019-01-17 13:42:20 +00:00
Tom de Vries 9d576782a2 [libbacktrace] Add find_unit
Add a function that finds the unit given an offset into .debug_info.

2019-01-17  Tom de Vries  <tdevries@suse.de>

	* dwarf.c (struct unit): Add low_offset and high_offset fields.
	(struct unit_vector): New type.
	(struct dwarf_data): Add units and units_counts fields.
	(find_unit): New function.
	(find_address_ranges): Add and handle unit_tag parameter.
	(build_address_map): Add and handle units_vec parameter.
	(build_dwarf_data): Pass units_vec to build_address_map.  Store resulting
	units vector.

From-SVN: r268030
2019-01-17 13:42:09 +00:00
Tom de Vries f2f00d3a04 [libbacktrace] Handle DW_FORM_GNU_strp_alt
Handle DW_FORM_GNU_strp_alt which references the .debug_str section in the
.gnu_debugaltlink file.

2019-01-17  Tom de Vries  <tdevries@suse.de>

	PR libbacktrace/82857
	* dwarf.c (read_attribute): Handle DW_FORM_GNU_strp_alt
	using altlink.

From-SVN: r267996
2019-01-17 00:08:05 +00:00
Tom de Vries 944f59ffe2 [libbacktrace] Handle alt FORMS without .gnu_debugaltlink
Handle DW_FORM_GNU_strp_alt and DW_FORM_GNU_ref_alt references robustly in
presence of missing .gnu_debugaltlink file.

2019-01-17  Tom de Vries  <tdevries@suse.de>

	* dwarf.c (enum attr_val_encoding): Add ATTR_VAL_NONE.
	(read_attribute): Add altlink parameter.  Handle missing altlink for
	DW_FORM_GNU_strp_alt and DW_FORM_GNU_ref_alt.
	(find_address_ranges, build_address_map, build_dwarf_data): Add and
	handle altlink parameter.
	(read_referenced_name, read_function_entry): Add argument to
	read_attribute call.

From-SVN: r267995
2019-01-17 00:07:53 +00:00
Tom de Vries 9ad458d539 [libbacktrace] Add altlink field to struct dwarf_data
Add an altlink field to struct dwarf_data, and initialize it with the pointer
to the struct dwarf_data for the .gnu_debugaltlink.

2019-01-17  Tom de Vries  <tdevries@suse.de>

	* dwarf.c (struct dwarf_data): Add altlink field.
	(backtrace_dwarf_add): Add and handle fileline_altlink parameter.
	* elf.c	(elf_add): Add argument to backtrace_dwarf_add call.
	(phdr_callback, backtrace_initialize): Add argument to elf_add calls.
	* internal.h (backtrace_dwarf_add): Add fileline_altlink parameter.
	* pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
	* xcoff.c (xcoff_add): Same.

From-SVN: r267994
2019-01-17 00:07:43 +00:00
Tom de Vries e6f00c83f4 [libbacktrace] Return struct dwarf_data pointer from elf_add
Allow the caller of elf_add access to the struct dwarf_data pointer
corresponding to the added elf.

2019-01-17  Tom de Vries  <tdevries@suse.de>

	* internal.h (backtrace_dwarf_add): Add fileline_entry parameter.
	* dwarf.c (backtrace_dwarf_add): Add and handle fileline_entry parameter.
	* elf.c	(elf_add): Add and handle fileline_entry parameter.  Add
	argument to backtrace_dwarf_add call.
	(phdr_callback, backtrace_initialize): Add argument to elf_add calls.
	* pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
	* xcoff.c (xcoff_add): Same.

From-SVN: r267993
2019-01-17 00:07:32 +00:00
Tom de Vries a34c2a3d19 [libbacktrace] Read .gnu_debugaltlink
Read the elf file pointed at by the .gnu_debugaltlink section, and verify that
the build id matches.

2019-01-17  Tom de Vries  <tdevries@suse.de>

	* elf.c (elf_add): Add and handle with_buildid_data and
	with_buildid_size parameters.  Handle .gnu_debugaltlink section.
	(phdr_callback, backtrace_initialize): Add arguments to elf_add calls.

From-SVN: r267992
2019-01-17 00:07:21 +00:00
Tom de Vries 07e1534f44 [libbacktrace] Factor out read_referenced_name_from_attr
Factor out the common handling of DW_AT_abstract_origin and
DW_AT_specification from read_function_entry and read_referenced_name.

2019-01-16  Tom de Vries  <tdevries@suse.de>

	* dwarf.c (read_referenced_name_from_attr): New function.  Factor out
	of ...
 	(read_referenced_name): ... here, and ...
	(read_function_entry): ... here.

From-SVN: r267986
2019-01-16 20:47:02 +00:00
Tom de Vries df1de06415 [libbacktrace] Unify function name preference handling
Both read_function_entry and read_referenced_name implement a priority scheme
for names.  The priorities are:
- 1st: DW_AT_linkage_name
- 2nd: Name from DW_AT_abstract_origin or DW_AT_specification
- 3rd: DW_AT_name.

Ensure both functions fully adhere to it.

2019-01-16  Tom de Vries  <tdevries@suse.de>

	* dwarf.c (read_referenced_name): Don't allow DW_AT_name to override any
	name.
	(read_function_entry): Same.  Don't allow name found via
	DW_AT_abstract_origin or case DW_AT_specification to override linkage
	name.

From-SVN: r267963
2019-01-16 07:46:56 +00:00
Sandra Loosemore 6791469314 PR other/16615 [1/5]
2019-01-09  Sandra Loosemore  <sandra@codesourcery.com>

	PR other/16615 [1/5]

	contrib/
	* mklog: Mechanically replace "can not" with "cannot".

	gcc/
	* Makefile.in: Mechanically replace "can not" with "cannot".
	* alias.c: Likewise.
	* builtins.c: Likewise.
	* calls.c: Likewise.
	* cgraph.c: Likewise.
	* cgraph.h: Likewise.
	* cgraphclones.c: Likewise.
	* cgraphunit.c: Likewise.
	* combine-stack-adj.c: Likewise.
	* combine.c: Likewise.
	* common/config/i386/i386-common.c: Likewise.
	* config/aarch64/aarch64.c: Likewise.
	* config/alpha/sync.md: Likewise.
	* config/arc/arc.c: Likewise.
	* config/arc/predicates.md: Likewise.
	* config/arm/arm-c.c: Likewise.
	* config/arm/arm.c: Likewise.
	* config/arm/arm.h: Likewise.
	* config/arm/arm.md: Likewise.
	* config/arm/cortex-r4f.md: Likewise.
	* config/csky/csky.c: Likewise.
	* config/csky/csky.h: Likewise.
	* config/darwin-f.c: Likewise.
	* config/epiphany/epiphany.md: Likewise.
	* config/i386/i386.c: Likewise.
	* config/i386/sol2.h: Likewise.
	* config/m68k/m68k.c: Likewise.
	* config/mcore/mcore.h: Likewise.
	* config/microblaze/microblaze.md: Likewise.
	* config/mips/20kc.md: Likewise.
	* config/mips/sb1.md: Likewise.
	* config/nds32/nds32.c: Likewise.
	* config/nds32/predicates.md: Likewise.
	* config/pa/pa.c: Likewise.
	* config/rs6000/e300c2c3.md: Likewise.
	* config/rs6000/rs6000.c: Likewise.
	* config/s390/s390.h: Likewise.
	* config/sh/sh.c: Likewise.
	* config/sh/sh.md: Likewise.
	* config/spu/vmx2spu.h: Likewise.
	* cprop.c: Likewise.
	* dbxout.c: Likewise.
	* df-scan.c: Likewise.
	* doc/cfg.texi: Likewise.
	* doc/extend.texi: Likewise.
	* doc/fragments.texi: Likewise.
	* doc/gty.texi: Likewise.
	* doc/invoke.texi: Likewise.
	* doc/lto.texi: Likewise.
	* doc/md.texi: Likewise.
	* doc/objc.texi: Likewise.
	* doc/rtl.texi: Likewise.
	* doc/tm.texi: Likewise.
	* dse.c: Likewise.
	* emit-rtl.c: Likewise.
	* emit-rtl.h: Likewise.
	* except.c: Likewise.
	* expmed.c: Likewise.
	* expr.c: Likewise.
	* fold-const.c: Likewise.
	* genautomata.c: Likewise.
	* gimple-fold.c: Likewise.
	* hard-reg-set.h: Likewise.
	* ifcvt.c: Likewise.
	* ipa-comdats.c: Likewise.
	* ipa-cp.c: Likewise.
	* ipa-devirt.c: Likewise.
	* ipa-fnsummary.c: Likewise.
	* ipa-icf.c: Likewise.
	* ipa-inline-transform.c: Likewise.
	* ipa-inline.c: Likewise.
	* ipa-polymorphic-call.c: Likewise.
	* ipa-profile.c: Likewise.
	* ipa-prop.c: Likewise.
	* ipa-pure-const.c: Likewise.
	* ipa-reference.c: Likewise.
	* ipa-split.c: Likewise.
	* ipa-visibility.c: Likewise.
	* ipa.c: Likewise.
	* ira-build.c: Likewise.
	* ira-color.c: Likewise.
	* ira-conflicts.c: Likewise.
	* ira-costs.c: Likewise.
	* ira-int.h: Likewise.
	* ira-lives.c: Likewise.
	* ira.c: Likewise.
	* ira.h: Likewise.
	* loop-invariant.c: Likewise.
	* loop-unroll.c: Likewise.
	* lower-subreg.c: Likewise.
	* lra-assigns.c: Likewise.
	* lra-constraints.c: Likewise.
	* lra-eliminations.c: Likewise.
	* lra-lives.c: Likewise.
	* lra-remat.c: Likewise.
	* lra-spills.c: Likewise.
	* lra.c: Likewise.
	* lto-cgraph.c: Likewise.
	* lto-streamer-out.c: Likewise.
	* postreload-gcse.c: Likewise.
	* predict.c: Likewise.
	* profile-count.h: Likewise.
	* profile.c: Likewise.
	* recog.c: Likewise.
	* ree.c: Likewise.
	* reload.c: Likewise.
	* reload1.c: Likewise.
	* reorg.c: Likewise.
	* resource.c: Likewise.
	* rtl.def: Likewise.
	* rtl.h: Likewise.
	* rtlanal.c: Likewise.
	* sched-deps.c: Likewise.
	* sched-ebb.c: Likewise.
	* sched-rgn.c: Likewise.
	* sel-sched-ir.c: Likewise.
	* sel-sched.c: Likewise.
	* shrink-wrap.c: Likewise.
	* simplify-rtx.c: Likewise.
	* symtab.c: Likewise.
	* target.def: Likewise.
	* toplev.c: Likewise.
	* tree-call-cdce.c: Likewise.
	* tree-cfg.c: Likewise.
	* tree-complex.c: Likewise.
	* tree-core.h: Likewise.
	* tree-eh.c: Likewise.
	* tree-inline.c: Likewise.
	* tree-loop-distribution.c: Likewise.
	* tree-nrv.c: Likewise.
	* tree-profile.c: Likewise.
	* tree-sra.c: Likewise.
	* tree-ssa-alias.c: Likewise.
	* tree-ssa-dce.c: Likewise.
	* tree-ssa-dom.c: Likewise.
	* tree-ssa-forwprop.c: Likewise.
	* tree-ssa-loop-im.c: Likewise.
	* tree-ssa-loop-ivcanon.c: Likewise.
	* tree-ssa-loop-ivopts.c: Likewise.
	* tree-ssa-loop-niter.c: Likewise.
	* tree-ssa-phionlycprop.c: Likewise.
	* tree-ssa-phiopt.c: Likewise.
	* tree-ssa-propagate.c: Likewise.
	* tree-ssa-threadedge.c: Likewise.
	* tree-ssa-threadupdate.c: Likewise.
	* tree-ssa-uninit.c: Likewise.
	* tree-ssanames.c: Likewise.
	* tree-streamer-out.c: Likewise.
	* tree.c: Likewise.
	* tree.h: Likewise.
	* vr-values.c: Likewise.

	gcc/ada/
	* exp_ch9.adb: Mechanically replace "can not" with "cannot".
	* libgnat/s-regpat.ads: Likewise.
	* par-ch4.adb: Likewise.
	* set_targ.adb: Likewise.
	* types.ads: Likewise.

	gcc/cp/
	* cp-tree.h: Mechanically replace "can not" with "cannot".
	* parser.c: Likewise.
	* pt.c: Likewise.

	gcc/fortran/
	* class.c: Mechanically replace "can not" with "cannot".
	* decl.c: Likewise.
	* expr.c: Likewise.
	* gfc-internals.texi: Likewise.
	* intrinsic.texi: Likewise.
	* invoke.texi: Likewise.
	* io.c: Likewise.
	* match.c: Likewise.
	* parse.c: Likewise.
	* primary.c: Likewise.
	* resolve.c: Likewise.
	* symbol.c: Likewise.
	* trans-array.c: Likewise.
	* trans-decl.c: Likewise.
	* trans-intrinsic.c: Likewise.
	* trans-stmt.c: Likewise.

	gcc/go/
	* go-backend.c: Mechanically replace "can not" with "cannot".
	* go-gcc.cc: Likewise.

	gcc/lto/
	* lto-partition.c: Mechanically replace "can not" with "cannot".
	* lto-symtab.c: Likewise.
	* lto.c: Likewise.

	gcc/objc/
	* objc-act.c: Mechanically replace "can not" with "cannot".

	libbacktrace/
	* backtrace.h: Mechanically replace "can not" with "cannot".

	libgcc/
	* config/c6x/libunwind.S: Mechanically replace "can not" with
	"cannot".
	* config/tilepro/atomic.h: Likewise.
	* config/vxlib-tls.c: Likewise.
	* generic-morestack-thread.c: Likewise.
	* generic-morestack.c: Likewise.
	* mkmap-symver.awk: Likewise.

	libgfortran/
	* caf/single.c: Mechanically replace "can not" with "cannot".
	* io/unit.c: Likewise.

	libobjc/
	* class.c: Mechanically replace "can not" with "cannot".
	* objc/runtime.h: Likewise.
	* sendmsg.c: Likewise.

	liboffloadmic/
	* include/coi/common/COIResult_common.h: Mechanically replace
	"can not" with "cannot".
	* include/coi/source/COIBuffer_source.h: Likewise.

	libstdc++-v3/
	* include/ext/bitmap_allocator.h: Mechanically replace "can not"
	with "cannot".

From-SVN: r267783
2019-01-09 16:37:45 -05:00
Jakub Jelinek a554497024 Update copyright years.
From-SVN: r267494
2019-01-01 13:31:55 +01:00
Gerald Pfeifer 4b420b27d3 Makefile.am (xcoff_%.c): Use an actual newline instead of \n in sed pattern.
* Makefile.am (xcoff_%.c): Use an actual newline instead of \n
	in sed pattern.
	* Makefile.in: Regenerate.

From-SVN: r267470
2018-12-29 23:22:50 +00:00
Tom de Vries eb33bf0a0a [libbacktrace] Reduce memory usage in build_address_map
In build_address_map we allocate a unit, and then look for addresses in the
unit, which we store in the addrs vector, with the elements pointing to the
unit.  However, if we cannot find addresses in the unit, the allocated unit is
not used.

Fix this by detecting if the allocated unit has been used, and reusing it
otherwise.

Bootstrapped and reg-tested on x86_64.

2018-12-28  Tom de Vries  <tdevries@suse.de>

	* dwarf.c (build_address_map): Reuse unused units.

From-SVN: r267445
2018-12-28 03:43:56 +00:00
Tom de Vries d9aa0961ea [libbacktrace] Simplify memory management in build_address_map
In the main loop in build_address_map, we first read the abbrevs into a local
variable abbrevs, and then allocate the corresponding unit, after which we assign
the abbrevs to the unit.  This results in dedicated free-upon-failure
handling for the variable, and extra code to make sure that free-upon-failure
doesn't trigger once the unit has taken ownership of the abbrevs.

Simplify this by reversing the order of abbrev reading and unit allocation,
and eliminating the abbrevs local variable.

Bootstrapped and reg-tested on x86_64.

2018-12-28  Tom de Vries  <tdevries@suse.de>

	* dwarf.c (build_address_map): Simplify by removing local variable
	abbrevs.

From-SVN: r267444
2018-12-28 03:43:41 +00:00
Ian Lance Taylor 40b8d3b253 [libbacktrace] Fix memory leak in loop in build_address_map
When failing in build_address_map, we free the unit that's currently being
handled in the loop, but the ones that already have been allocated are leaked.

Fix this by keeping track of allocated units in a vector, and releasing them
upon failure.

Also, now that we have a vector of allocated units, move the freeing upon
failure of the abbrevs associated with each unit to build_address_map, and
remove the now redundant call to free_unit_addrs_vector.

Bootstrapped and reg-tested on x86_64.

2018-12-28  Ian Lance Taylor  <iant@golang.org>
	    Tom de Vries  <tdevries@suse.de>

	PR libbacktrace/88063
	* dwarf.c (free_unit_addrs_vector): Remove.
	(build_address_map): Keep track of allocated units in vector.  Free
	allocated units and corresponding abbrevs upon failure.  Remove now
	redundant call to free_unit_addrs_vector.  Free addrs vector upon
	failure.  Free allocated unit vector.

Co-Authored-By: Tom de Vries <tdevries@suse.de>

From-SVN: r267443
2018-12-28 03:43:26 +00:00
Tom de Vries 53a52133a5 [libbacktrace] Fix memory leak in build_address_map
While upon failure in build_address_map we call free_unit_addrs_vector, this
does not actually free the addrs vector, but merely the abbrevs of the units
pointed at by the elements of the addrs vector.

Fix this by adding code to build_address_map to make sure that the addrs vector
is freed upon failure.

Bootstrapped and reg-tested on x86_64.

2018-12-28  Tom de Vries  <tdevries@suse.de>

	* dwarf.c (build_address_map): Free addrs vector upon failure.

From-SVN: r267442
2018-12-28 03:43:15 +00:00
Tom de Vries a37a52e592 [testsuite] Remove bashism from libbacktrace/allocfail.sh
Test-case libbacktrace/allocfail.sh contains bashism "set -o pipefail", which
makes the script fail on ubuntu 18.04, which links /bin/sh to /bin/dash.

Fix this by removing the "set -o pipefail".

Tested by running the test-case with dash on x86_64-linux.

2018-12-14  Tom de Vries  <tdevries@suse.de>

	PR testsuite/88491
	* allocfail.sh: Remove "set -o pipefail".

From-SVN: r267127
2018-12-14 09:43:41 +00:00
Tom de Vries d665cd9b13 [libbacktrace] Add allocfail.sh test-case
Add test-case that forces alloc.c functions to fail, and check whether fail
handling is robust.

This is the test-case for "[libbacktrace] Fix segfault upon allocation
failure".  Without that patch, this test-case fails like this:
...
allocfail.sh: line 71: 26041 Segmentation fault      (core dumped) \
  ./allocfail $i > /dev/null 2>&1
Unallowed fail found: 13
FAIL allocfail.sh (exit status: 1)
...

This is a seperate patch because the test-case is nontrivial.

Bootstrapped and reg-tested on x86_64.

2018-12-12  Tom de Vries  <tdevries@suse.de>

	* Makefile.am (TESTS): Add allocfail.sh.
	(check_PROGRAMS): Add allocfail.
	* Makefile.in: Regenerate.
	* instrumented_alloc.c: New file.  Redefine malloc and realloc.
	Include alloc.c.
	* allocfail.c: New file.
	* allocfail.sh: New file.

From-SVN: r267054
2018-12-12 13:50:51 +00:00
Tom de Vries 187b9e1dc5 [libbacktrace] Add tests for unused formats
When building libbacktrace, we typically use elf.c, and don't build pecoff.c,
xcoff.c or unknown.c.

Add testcases that use unused format to ensure that we also build and
test those on a typical development setup.

Bootstrapped and reg-tested on x86_64.

2018-11-30  Tom de Vries  <tdevries@suse.de>

	* Makefile.am (check_PROGRAMS): Add test_elf, test_xcoff_32,
	test_xcoff_64, test_pecoff and test_unknown.
	* Makefile.in: Regenerate.
	* test_format.c: New file.

From-SVN: r266668
2018-11-30 15:33:23 +00:00
Tom de Vries 9b7d1a9741 [libbacktrace] Test check_PROGRAMS without mmap
When building libbacktrace, we typically use mmapio.c and mmap.c, and don't
build read.c and alloc.c.

Add testcases that use read.c and alloc.c to ensure that we also build and
test those on a typical development setup.

Bootstrapped and reg-tested on x86_64.

2018-11-30  Tom de Vries  <tdevries@suse.de>

	* Makefile.am : Add _with_alloc version for each test in
	check_PROGRAMS.
	* Makefile.in: Regenerate.

From-SVN: r266667
2018-11-30 15:33:12 +00:00
Tom de Vries 518a3a2106 [libbacktrace] Factor out backtrace_vector_free
Factor out new function backtrace_vector_free.

Bootstrapped and reg-tested on x86_64.

2018-11-30  Tom de Vries  <tdevries@suse.de>

	* internal.h (backtrace_vector_free): New static inline fuction,
	factored out of ...
	* dwarf.c (read_line_info): ... here.

From-SVN: r266658
2018-11-30 08:43:50 +00:00
Tom de Vries 18c742b5f0 [libbacktrace] Fix segfault upon allocation failure
If the allocation of abbrevs->abbrevs in read_abbrevs fails, then
abbrevs->num_abbrevs remains nonzero, and consequently free_abbrevs will
segfault when accessing abbrevs->abbrevs.

Fix this by setting abbrevs->num_abbrevs only after abbrevs->abbrevs
allocation has succeeded.

Bootstrapped and reg-tested on x86_64.

2018-11-28  Tom de Vries  <tdevries@suse.de>

	* dwarf.c (read_abbrevs): Fix handling of abbrevs->abbrevs allocation
	failure.

From-SVN: r266562
2018-11-28 14:06:23 +00:00
Tom de Vries 6d760a0197 [libbacktrace] Don't point to released memory in backtrace_vector_release
When backtrace_vector_release is called with vec.size == 0, it releases the
memory pointed at by vec.base.

Set vec.base set to NULL if vec.size == 0 to ensure we don't point to released
memory.

Bootstrapped and reg-tested on x86_64.

2018-11-27  Tom de Vries  <tdevries@suse.de>

	* mmap.c (backtrace_vector_release): Same.
	* unittest.c (test1): Add check.

From-SVN: r266505
2018-11-27 08:26:04 +00:00
Tom de Vries 0c155f24a9 [libbacktrace] Avoid realloc with size == 0 in backtrace_vector_release
As of C17, realloc with size 0 is marked as an obsolescent feature.

Fix this in backtrace_vector_release by using free instead.

Bootstrapped and reg-tested on x86_64.

2018-11-27  Tom de Vries  <tdevries@suse.de>

	* alloc.c (backtrace_vector_release): Handle vec->size == 0 using free
	instead of realloc.
	* Makefile.am (check_PROGRAMS): Add unittest.
	* Makefile.in: Regenerate.
	* unittest.c: New file.

From-SVN: r266504
2018-11-27 08:25:52 +00:00
Tom de Vries 292592c5da [libbacktrace] Factor out read_initial_length
Factor out new function read_initial_length in dwarf.c.

Bootstrapped and reg-tested on x86_64.

2018-11-22  Tom de Vries  <tdevries@suse.de>

	* dwarf.c (read_initial_length): Factor out of ...
	(build_address_map, read_line_info): ... here.

From-SVN: r266361
2018-11-22 00:06:27 +00:00
Tom de Vries 171125708a [libbacktrace] Factor out read_string
Factor out new function read_string in dwarf.c.

Bootstrapped and reg-tested on x86_64.

2018-11-21  Tom de Vries  <tdevries@suse.de>

	* dwarf.c (read_string): Factor out of ...
	(read_attribute, read_line_header, read_line_program): ... here.

From-SVN: r266339
2018-11-21 08:31:04 +00:00
Joseph Myers 22e0527251 Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856).
This patch updates GCC to use autoconf 2.69 and automake 1.15.1.
(That's not the latest automake version, but it's the one used by
binutils-gdb, with which consistency is desirable, and in any case
seems a useful incremental update that should make a future update to
1.16.1 easier.)

The changes are generally similar to the binutils-gdb ones, and are
copied from there where shared files and directories are involved
(there are some further changes to such shared directories, however,
which I'd expect to apply to binutils-gdb once this patch is in GCC).
Largely, obsolete AC_PREREQ calls are removed, while many
AC_LANG_SOURCE calls are added to avoid warnings from aclocal and
autoconf.  Multilib support is no longer included in core automake,
meaning that multilib.am needs copying from automake's contrib
directory into the GCC source tree.  Autoconf 2.69 has Go support, so
local copies of that support are removed.  I hope the D support will
soon be submitted to upstream autoconf so the local copy of that can
be removed in a future update.  Changes to how automake generates
runtest calls mean quotes are removed from RUNTEST definitions in five
lib*/testsuite/Makefile.am files (libatomic, libgomp, libitm,
libphobos, libvtv; some others have RUNTEST definitions without
quotes, which are still OK); libgo and libphobos also get
-Wno-override added to AM_INIT_AUTOMAKE so those overrides of RUNTEST
do not generate automake warnings.

Note that the regeneration did not include regeneration of
fixincludes/config.h.in (attempting such regeneration resulted in all
the USED_FOR_TARGET conditionals disappearing; and I don't see
anything in the fixincludes/ directory that would result in such
conditionals being generated, unlike in the gcc/ directory).  Also
note that libvtv/testsuite/other-tests/Makefile.in was not
regenerated; that directory is not listed as a subdirectory for which
Makefile.in gets regenerated by calling "automake" in libvtv/, so I'm
not sure how it's meant to be regenerated.

While I mostly fixed warnings should running aclocal / automake /
autoconf, there were various such warnings from automake in the
libgfortran, libgo, libgomp, liboffloadmic, libsanitizer, libphobos
directories that I did not fix, preferring to leave those to the
relevant subsystem maintainers.  Specifically, most of those warnings
were of the following form (example from libgfortran):

Makefile.am:48: warning: source file 'caf/single.c' is in a subdirectory,
Makefile.am:48: but option 'subdir-objects' is disabled
automake: warning: possible forward-incompatibility.
automake: At least a source file is in a subdirectory, but the 'subdir-objects'
automake: automake option hasn't been enabled.  For now, the corresponding output
automake: object file(s) will be placed in the top-level directory.  However,
automake: this behaviour will change in future Automake versions: they
will
automake: unconditionally cause object files to be placed in the same subdirectory
automake: of the corresponding sources.
automake: You are advised to start using 'subdir-objects' option throughout your
automake: project, to avoid future incompatibilities.

I think it's best for the relevant maintainers to add subdir-objects
and do any other associated Makefile.am changes needed.  In some cases
the paths in the warnings involved ../; I don't know if that adds any
extra complications to the use of subdir-objects.

I've tested this with native, cross and Canadian cross builds.  The
risk of any OS-specific issues should I hope be rather lower than if a
libtool upgrade were included (we *should* do such an upgrade at some
point, but it's more complicated - it involves identifying all our
local libtool changes to see if any aren't included in the upstream
version we update to, and reverting an upstream libtool patch that's
inappropriate for use in GCC); I think it would be better to get this
update into GCC so that people can test in different configurations
and we can fix any issues found, rather than to try to get more and
more testing done before it goes in.

top level:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* multilib.am: New file.  From automake.

	Merge from binutils-gdb:
	2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>

	* libtool.m4: Use AC_LANG_SOURCE.
	* configure.ac: Remove AC_PREREQ, use AC_LANG_SOURCE.
	* ar-lib: New file.
	* test-driver: New file.
	* configure: Re-generate.

config:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* math.m4, tls.m4: Use AC_LANG_SOURCE.

	Merge from binutils-gdb:
	2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>

	* override.m4 (_GCC_AUTOCONF_VERSION): Bump from 2.64 to 2.69.

fixincludes:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* configure.ac: Remove AC_PREREQ.
	* aclocal.m4, configure: Regenerate.

gcc:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.  Use single
	line for second argument of AC_DEFINE_UNQUOTED.
	* doc/install.texi (Tools/packages necessary for modifying GCC):
	Update to autoconf 2.69 and automake 1.15.1.
	* aclocal.m4, config.in, configure: Regenerate.

gnattools:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* configure.ac: Remove AC_PREREQ.
	* configure: Regenerate.

gotools:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* config/go.m4: Remove file.
	* Makefile.am (ACLOCAL_AMFLAGS): Do not use -I ./config.
	* configure.ac:  Remove AC_PREREQ.  Do not include config/go.m4.
	* Makefile.in, aclocal.m4, configure: Regenerate.

intl:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	Merge from binutils-gdb:
	2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>

	* configure.ac: Add AC_USE_SYSTEM_EXTENSIONS, remove AC_PREREQ.
	* configure: Re-generate.
	* config.h.in: Re-generate.
	* aclocal.m4: Re-generate.

libada:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* configure.ac: Remove AC_PREREQ.
	* configure: Regenerate.

libatomic:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* Makefile.am: Include multilib.am.
	* acinclude.m4: Use AC_LANG_SOURCE.
	* configure.ac: Remove AC_PREREQ.
	* testsuite/Makefile.am (RUNTEST): Remove quotes.
	* Makefile.in, aclocal.m4, configure, testsuite/Makefile.in:
	Regenerate.

libbacktrace:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* Makefile.am: Include multilib.am.
	* configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.
	* Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.

libcc1:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* configure.ac: Remove AC_PREREQ.
	* Makefile.in, aclocal.m4, configure: Regenerate.

libcpp:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.
	* aclocal.m4, config.in, configure: Regenerate.

libdecnumber:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	Merge from binutils-gdb:
	2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>

	* configure.ac: Remove AC_PREREQ.
	* configure: Re-generate.
	* aclocal.m4.

libffi:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* Makefile.am: Include multilib.am.
	(AUTOMAKE_OPTIONS): Add info-in-builddir.
	(CLEANFILES): Remove doc/libffi.info.
	* configure.ac: Remove AC_PREREQ.
	* Makefile.in, aclocal.m4, configure, fficonfig.h.in,
	include/Makefile.in, man/Makefile.in, testsuite/Makefile.in:
	Regenerate.

libgcc:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.
	* configure: Regenerate.

libgfortran:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* Makefile.am: Include multilib.am.
	* configure.ac: Remove AC_PREREQ.
	* Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.

libgo [logically part of this change but omitted from the commit]:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* Makefile.am: Include multilib.am.
	* config/go.m4: Remove file.
	* config/libtool.m4: Use AC_LANG_SOURCE.
	* configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.  Use
	-Wno-override in AM_INIT_AUTOMAKE call.
	* Makefile.in, aclocal.m4, configure, testsuite/Makefile.in:
	Regenerate.

libgomp:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* Makefile.am: Include multilib.am
	(AUTOMAKE_OPTIONS): Add info-in-builddir.
	(CLEANFILES): Remove libgomp.info.
	* configure.ac: Remove AC_PREREQ.
	* testsuite/Makefile.am (RUNTEST): Remove quotes.
	* Makefile.in, aclocal.m4, configure, testsuite/Makefile.in:
	Regenerate.

libhsail-rt:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* configure.ac: Remove AC_PREREQ.
	* Makefile.in, aclocal.m4, configure: Regenerate.

libiberty:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	Merge from binutils-gdb:
	2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>

	* configure.ac: Remove AC_PREREQ.
	* configure: Re-generate.
	* config.in: Re-generate.

libitm:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* Makefile.am: Include multilib.am.
	(AUTOMAKE_OPTIONS): Add info-in-builddir.
	(CLEANFILES): Remove libitm.info.
	* configure.ac: Remove AC_PREREQ.
	* testsuite/Makefile.am (RUNTEST): Remove quotes.
	* Makefile.in, aclocal.m4, configure, testsuite/Makefile.in:
	Regenerate.

libobjc:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* configure.ac: Remove AC_PREREQ.
	* aclocal.m4, config.h.in, configure: Regenerate.

liboffloadmic:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* Makefile.am: Include multilib.am.
	* configure.ac: Remove AC_PREREQ.
	* plugin/Makefile.am: Include multilib.am.
	* plugin/configure.ac: Remove AC_PREREQ.
	* Makefile.in, aclocal.m4, configure, plugin/Makefile.in,
	plugin/aclocal.m4, plugin/configure: Regenerate.

libphobos:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* Makefile.am: Include multilib.am.
	* configure.ac: Remove AC_PREREQ.  Use -Wno-override in
	AM_INIT_AUTOMAKE call.
	* m4/autoconf.m4: Add extra argument to AC_LANG_DEFINE call.
	* m4/druntime/os.m4: Use AC_LANG_SOURCE.
	* testsuite/Makefile.am (RUNTEST): Remove quotes.
	* Makefile.in, aclocal.m4, configure, libdruntime/Makefile.in,
	src/Makefile.in, testsuite/Makefile.in: Regenerate.

libquadmath:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* Makefile.am: Include multilib.am.
	(AUTOMAKE_OPTIONS): Remove 1.8.  Add info-in-builddir.
	(all-local): Define outside conditional code.
	(CLEANFILES): Remove libquadmath.info.
	* configure.ac: Remove AC_PREREQ.
	* Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.

libsanitizer:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* Makefile.am: Include multilib.am.
	* configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.
	* Makefile.in, aclocal.m4, asan/Makefile.in, configure,
	interception/Makefile.in, libbacktrace/Makefile.in,
	lsan/Makefile.in, sanitizer_common/Makefile.in, tsan/Makefile.in,
	ubsan/Makefile.in: Regenerate.

libssp:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* Makefile.am: Include multilib.am.
	(AUTOMAKE_OPTIONS): Remove 1.9.5.
	* configure.ac: Remove AC_PREREQ.  Quote argument to
	AC_RUN_IFELSE.
	* Makefile.in, aclocal.m4, configure: Regenerate.

libstdc++-v3:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* Makefile.am: Include multilib.am.
	* configure.ac: Remove AC_PREREQ.
	* Makefile.in, aclocal.m4, configure, doc/Makefile.in,
	include/Makefile.in, libsupc++/Makefile.in, po/Makefile.in,
	python/Makefile.in, src/Makefile.in, src/c++11/Makefile.in,
	src/c++17/Makefile.in, src/c++98/Makefile.in,
	src/filesystem/Makefile.in, testsuite/Makefile.in: Regenerate.

libvtv:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* Makefile.am: Include multilib.am.
	* configure.ac: Remove AC_PREREQ.
	* testsuite/Makefile.am (RUNTEST): Remove quotes.
	* Makefile.in, aclocal.m4, configure, testsuite/Makefile.in:
	Regenerate.

lto-plugin:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.
	* Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.

zlib:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* Makefile.am: Include multilib.am.

	Merge from binutils-gdb:
	2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>

	* configure.ac: Modernize AC_INIT call, remove AC_PREREQ.
	* Makefile.am (AUTOMAKE_OPTIONS): Remove 1.8, cygnus, add foreign.
	* Makefile.in: Re-generate.
	* aclocal.m4: Re-generate.
	* configure: Re-generate.

From-SVN: r265695
2018-10-31 17:03:16 +00:00
Ian Lance Taylor a2a86641b7 re PR libbacktrace/87529 (libbacktrace API forces users to have memory leaks)
PR libbacktrace/87529
	* backtrace.h: Document that backtrace_create_state should be
	called only once.

From-SVN: r264871
2018-10-05 14:09:07 +00:00
Martin Liska 92a285c1a7 Replace 8 spaces with a tabular in ChangeLog files.
From-SVN: r263886
2018-08-27 14:04:23 +00:00
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
Tony Reix ca9a1314ec xcoff.c (struct xcoff_line, [...]): Remove.
* xcoff.c (struct xcoff_line, struct xcoff_line_vector): Remove.
	(struct xcoff_func, struct xcoff_func_vector): New structs.
	(xcoff_syminfo): Drop leading dot from symbol name.
	(xcoff_line_compare, xcoff_line_search): Remove.
	(xcoff_func_compare, xcoff_func_search): New static functions.
	(xcoff_lookup_pc): Search function table.
	(xcoff_add_line, xcoff_process_linenos): Remove.
	(xcoff_initialize_fileline): Build function table.

From-SVN: r263238
2018-08-01 21:55:05 +00:00
Denis Khalikov 1ac6620a52 re PR other/86198 (Libbacktrace does not properly work with ".note.gnu.build-id" section)
libbacktrace/

2018-06-21 Denis Khalikov <d.khalikov@partner.samsung.com>

	PR other/86198
	* elf.c (elf_add): Increase ".note.gnu.build-id" section size
	checking up to 36 bytes.

From-SVN: r261832
2018-06-21 08:42:53 +03: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
Ian Lance Taylor 21070494d8 backtrace.c: Revert last two changes.
* backtrace.c: Revert last two changes.  Don't call mmap
	directly.

From-SVN: r259440
2018-04-17 17:58:05 +00:00
Ian Lance Taylor c36af1b4da backtrace.c: Include backtrace-supported.h before checking BACKTRACE_USES_MALLOC.
* backtrace.c: Include backtrace-supported.h before checking
	BACKTRACE_USES_MALLOC.

From-SVN: r259439
2018-04-17 17:29:27 +00:00
Ian Lance Taylor 83a658ca0b backtrace.c (backtrace_full): When testing whether we can allocate memory...
* backtrace.c (backtrace_full): When testing whether we can
	allocate memory, call mmap directly, and munmap the memory.

Fixes https://github.com/ianlancetaylor/libbacktrace/issues/13 .

From-SVN: r259434
2018-04-17 13:59:38 +00:00
Jakub Jelinek c5c4b2ae6e re PR other/85161 (Test case failures in libbacktrace on powerpc64 BE starting with r253456)
PR other/85161
	* elf.c (elf_zlib_fetch): Fix up predefined macro names in test for
	big endian, only use 32-bit loads if endianity macros are predefined
	and indicate big or little endian.

From-SVN: r259096
2018-04-04 19:18:14 +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
Jakub Jelinek bcc23586c5 re PR other/82368 (with r253275 several new test cases in libbacktrace fail)
PR other/82368
	* elf.c (SHT_PROGBITS): Undefine and define.

From-SVN: r257685
2018-02-15 12:32:27 +01:00
Jakub Jelinek da07141fd7 re PR other/82368 (with r253275 several new test cases in libbacktrace fail)
PR other/82368
	* elf.c (EM_PPC64, EF_PPC64_ABI): Undefine and define.
	(struct elf_ppc64_opd_data): New type.
	(elf_initialize_syminfo): Add opd argument, handle symbols
	pointing into the PowerPC64 ELFv1 .opd section.
	(elf_add): Read .opd section on PowerPC64 ELFv1, pass pointer
	to structure with .opd data to elf_initialize_syminfo.

From-SVN: r257658
2018-02-14 15:19:36 +01:00
Ian Lance Taylor 65d0b85990 elf.c (elf_add): Close descriptor if we use a debugfile.
* elf.c (elf_add): Close descriptor if we use a debugfile.
	* btest.c (check_open_files): New static function.
	(main): Call check_open_files.

From-SVN: r257275
2018-01-31 23:23:21 +00:00
Ian Lance Taylor 96f7c2a94a elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the desired CRC is zero.
* elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the
	desired CRC is zero.
	(elf_add): Don't clear *found_sym and *found_dwarf if debuginfo.

From-SVN: r257062
2018-01-25 18:14:04 +00:00
Ian Lance Taylor a794e494c6 * pecoff.c (coff_add): Only release syms_view if it is valid.
From-SVN: r257053
2018-01-25 15:38:41 +00:00
Ian Lance Taylor 45f3ab193d * pecoff.c (coff_add): Another memcpy -> coff_read4 fix.
From-SVN: r257052
2018-01-25 15:33:36 +00:00
Ian Lance Taylor 017707ce06 * pecoff.c (coff_add): Use coff_read4, not memcpy.
From-SVN: r257040
2018-01-25 02:42:26 +00:00
Ian Lance Taylor 3fe3c7d749 re PR other/68239 (libbacktrace allocation is sometimes very slow)
PR other/68239
	* mmap.c (backtrace_free_locked): Don't put more than 16 entries
	on the free list.

From-SVN: r257039
2018-01-25 02:24:45 +00:00
Tony Reix 47c699f52a xcoff.c (xcoff_incl_compare): New function.
* xcoff.c (xcoff_incl_compare): New function.
	(xcoff_incl_search): New function.
	(xcoff_process_linenos): Use bsearch to find include file.
	(xcoff_initialize_fileline): Sort include file information.

From-SVN: r256895
2018-01-19 17:45:24 +00:00
Ian Lance Taylor 566588f1a2 elf.c (codes): Fix size to be 288.
* elf.c (codes) [GENERATE_FIXED_HUFFMAN_TABLE]: Fix size to be
	288.
	(main) [GENERATE_FIXED_HUFFMAN_TABLE]: Pass 288 to
	elf_zlib_inflate_table.  Generate elf_zlib_default_dist_table.
	(elf_zlib_default_table): Update.
	(elf_zlib_default_dist_table): New static array.
	(elf_zlib_inflate): Use elf_zlib_default_dist_table for dist table
	for block type 1.
	* ztest.c (struct zlib_test): Add uncompressed_len.
	(tests): Initialize uncompressed_len field.  Add new test case.
	(test_samples): Use uncompressed_len field.

From-SVN: r256776
2018-01-17 01:39:05 +00:00
Jakub Jelinek 85ec4feb11 Update copyright years.
From-SVN: r256169
2018-01-03 11:03:58 +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 549d24e9f7 ztest.c (test_large): Pass unsigned long *, not size_t *, to zlib uncompress function.
* ztest.c (test_large): Pass unsigned long *, not size_t *, to
	zlib uncompress function.

From-SVN: r253491
2017-10-06 13:37:20 +00:00
Ian Lance Taylor a978e26b83 elf.c (elf_zlib_fetch): Change pval argument to uint64_t *.
* elf.c (elf_zlib_fetch): Change pval argument to uint64_t *.
	Read a four byte integer.
	(elf_zlib_inflate): Change val to uint64_t.  Align pin to a 32-bit
	boundary before ever calling elf_zlib_fetch.
	* ztest.c (test_large): Simplify print statements a bit.

From-SVN: r253456
2017-10-05 16:39:38 +00: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
Tony Reix e90c74f598 xcoff.c: Initial support for DWARF debug sections in XCOFF.
* xcoff.c: Initial support for DWARF debug sections in XCOFF.
	(STYP_DWARF, SSUBTYP_DW*): Define.
	(enum dwarf_section): Define.
	(struct dwsect_info): Define.
	(xcoff_add): Look for DWARF sections, pass them to
	backtrace_dwarf_add.

From-SVN: r253297
2017-09-29 16:37:39 +00: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 f0de45420d re PR go/82284 (go -version segfaults on big endian architectures)
PR go/82284
	* elf.c (backtrace_initialize): Set pd.exe_filename.

From-SVN: r253078
2017-09-21 18:44:39 +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
Steve Ellcey 29788f9070 re PR other/81096 (test case ttest in libbacktrace fails starting with its introduction in r249111)
2017-09-12  Steve Ellcey  <sellcey@cavium.com>

	PR other/81096
	* Makefile.am (ttest_CFLAGS): Add $(AM_CFLAGS)
	* Makefile.in: Regenerate.

From-SVN: r252038
2017-09-12 17:00:00 +00:00
Steve Ellcey 917a804c61 re PR other/81096 (test case ttest in libbacktrace fails starting with its introduction in r249111)
2017-09-12  Steve Ellcey  <sellcey@cavium.com>

	PR other/81096
	* libbacktrace/Makefile.in
	(HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS): Add $(AM_CFLAGS)

From-SVN: r252035
2017-09-12 16:33:31 +00:00
David Edelsohn 8a0e622411 Add PR number.
From-SVN: r250825
2017-08-02 08:45:55 -04:00
David Edelsohn 2e6af1b892 * xcoff.c (xcoff_process_linenos): Initialize incl to NULL.
From-SVN: r250824
2017-08-02 08:44:54 -04:00
Tony Reix afce7debdc * xcoff.c: Don't leak a file descriptor if an archive is malformed.
From-SVN: r250684
2017-07-28 18:52:13 +00:00
Rainer Orth cf311b0355 Fix pid_t printing
* fileline.c (fileline_initialize): Print pid_t as long.

From-SVN: r250675
2017-07-28 16:26:39 +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
Than McIntosh 281161d16b dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
* dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
	(read_line_header): Don't allocate dirs if dirs_count == 0.
	* edtest.c: New file.
	* edtest2.c: New file.
	* Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
	(check_PROGRAMS): Add edtest.
	(edtest2_build.c, gen_edtest2_build): New targets.
	* Makefile.in: Rebuild.

From-SVN: r248295
2017-05-19 16:07:24 +00:00
Sam Thursfield 121eb024c8 btest.c (test5): Replace #ifdef guard with 'unused' attribute to fix compile warning when...
* btest.c (test5): Replace #ifdef guard with 'unused' attribute
       to fix compile warning when BACKTRACE_SUPPORTED isn't defined.

From-SVN: r245977
2017-03-08 14:21:21 +00:00
Jakub Jelinek cbe34bb5ed Update copyright years.
From-SVN: r243994
2017-01-01 13:07:43 +01: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
Carlos Liam 84ebf639b8 * all: Remove meaningless trailing whitespace.
From-SVN: r240084
2016-09-11 13:44:07 +00:00
Uros Bizjak 28644f75a9 re PR target/71161 (Lots of ASAN and libgo runtime FAILs after r236090)
PR target/71161
	* elf.c (phdr_callback) [__i386__]: Add
	__attribute__((__force_align_arg_pointer__)).

From-SVN: r236397
2016-05-18 16:40:54 +02:00
Max Ostapenko 26ac52dba5 elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to avoid possible crash.
libbacktrace/

2016-03-02  Maxim Ostapenko  <m.ostapenko@partner.samsung.com>

	* elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
	avoid possible crash.
	(elf_add): Don't set *fileline_fn to elf_nodebug value in case of
	missing debug info anymore.

From-SVN: r233911
2016-03-02 18:32:55 +02:00
John David Anglin 09b08e17f5 mmap.c (MAP_FAILED): Define if not defined.
* mmap.c (MAP_FAILED): Define if not defined.

From-SVN: r233196
2016-02-06 22:27:34 +00:00